[Openchrome-devel] drm-openchrome: 2 commits - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Fri Jan 27 22:04:52 UTC 2017


 drivers/gpu/drm/via/via_drv.h |    2 +-
 drivers/gpu/drm/via/via_ttm.c |   34 +++++++++++++++++++++++-----------
 2 files changed, 24 insertions(+), 12 deletions(-)

New commits:
commit f654963a5063bcc1575f8775bd08185756c26905
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jan 27 16:03:46 2017 -0600

    Version bumped to 3.0.23
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 5cf7549..68e7aa6 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -34,7 +34,7 @@
 
 #define DRIVER_MAJOR		3
 #define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	22
+#define DRIVER_PATCHLEVEL	23
 
 #include <linux/module.h>
 
commit 75d9ee33f305e6bc211476222d00564c33efa033
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jan 27 16:03:15 2017 -0600

    Rewriting via_bo_move
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_ttm.c b/drivers/gpu/drm/via/via_ttm.c
index debc759..d30369b 100644
--- a/drivers/gpu/drm/via/via_ttm.c
+++ b/drivers/gpu/drm/via/via_ttm.c
@@ -450,28 +450,37 @@ static int
 via_bo_move(struct ttm_buffer_object *bo, bool evict, bool interruptible,
 		bool no_wait_gpu, struct ttm_mem_reg *new_mem)
 {
-	struct ttm_mem_reg *old_mem = &bo->mem;
+    struct ttm_mem_reg *old_mem = &bo->mem;
 	int ret = 0;
 
+	DRM_DEBUG("Entered via_bo_move.\n");
+
+    if ((old_mem->mem_type == TTM_PL_SYSTEM) && (!bo->ttm)) {
+        BUG_ON(old_mem->mm_node != NULL);
+        *old_mem = *new_mem;
+        new_mem->mm_node = NULL;
+        goto exit;
+    }
+
 	/* No real memory copy. Just use the new_mem
 	 * directly. */
-	if ((old_mem->mem_type == TTM_PL_SYSTEM &&
-	    (new_mem->mem_type == TTM_PL_TT || !bo->ttm)) ||
-	    (old_mem->mem_type == TTM_PL_TT &&
-	     new_mem->mem_type == TTM_PL_SYSTEM) ||
-	    (new_mem->mem_type == TTM_PL_PRIV0)) {
+	if (((old_mem->mem_type == TTM_PL_SYSTEM)
+	        && (new_mem->mem_type == TTM_PL_TT))
+        || ((old_mem->mem_type == TTM_PL_TT)
+            && (new_mem->mem_type == TTM_PL_SYSTEM))
+	    || (new_mem->mem_type == TTM_PL_PRIV0)) {
 		BUG_ON(old_mem->mm_node != NULL);
 		*old_mem = *new_mem;
 		new_mem->mm_node = NULL;
-		return ret;
+        goto exit;
 	}
 
 	/* Accelerated copy involving the VRAM. */
-	if (old_mem->mem_type == TTM_PL_VRAM &&
-	    new_mem->mem_type == TTM_PL_SYSTEM) {
+	if ((old_mem->mem_type == TTM_PL_VRAM)
+        && (new_mem->mem_type == TTM_PL_SYSTEM)) {
 		ret = via_move_from_vram(bo, interruptible, no_wait_gpu, new_mem);
-	} else if (old_mem->mem_type == TTM_PL_SYSTEM &&
-		   new_mem->mem_type == TTM_PL_VRAM) {
+	} else if ((old_mem->mem_type == TTM_PL_SYSTEM)
+        && (new_mem->mem_type == TTM_PL_VRAM)) {
 		ret = via_move_to_vram(bo, interruptible, no_wait_gpu, new_mem);
 	} else {
 		ret = via_move_blit(bo, evict, no_wait_gpu, new_mem, old_mem);
@@ -480,6 +489,9 @@ via_bo_move(struct ttm_buffer_object *bo, bool evict, bool interruptible,
 	if (ret) {
 		ret = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
 	}
+
+exit:
+    DRM_DEBUG("Exiting via_bo_move.\n");
 	return ret;
 }
 


More information about the Openchrome-devel mailing list