[Mesa-dev] [PATCH 19/53] i965/drm: Drop cliprects and dr4 from execbuf variants.

Kenneth Graunke kenneth at whitecape.org
Wed Apr 5 00:10:09 UTC 2017


Legacy DRI1 leftovers.
---
 src/mesa/drivers/dri/i965/brw_bufmgr.h        |  9 ++-------
 src/mesa/drivers/dri/i965/intel_batchbuffer.c |  2 +-
 src/mesa/drivers/dri/i965/intel_bufmgr_gem.c  | 25 +++++++++----------------
 src/mesa/drivers/dri/i965/intel_screen.c      |  1 -
 4 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h
index 7418b14de0e..84e29fbc168 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -42,8 +42,6 @@
 extern "C" {
 #endif
 
-struct drm_clip_rect;
-
 typedef struct _drm_bacon_bufmgr drm_bacon_bufmgr;
 typedef struct _drm_bacon_context drm_bacon_context;
 typedef struct _drm_bacon_bo drm_bacon_bo;
@@ -198,13 +196,10 @@ void drm_bacon_bo_wait_rendering(drm_bacon_bo *bo);
 void drm_bacon_bufmgr_destroy(drm_bacon_bufmgr *bufmgr);
 
 /** Executes the command buffer pointed to by bo. */
-int drm_bacon_bo_exec(drm_bacon_bo *bo, int used,
-		      struct drm_clip_rect *cliprects, int num_cliprects, int DR4);
+int drm_bacon_bo_exec(drm_bacon_bo *bo, int used);
 
 /** Executes the command buffer pointed to by bo on the selected ring buffer */
-int drm_bacon_bo_mrb_exec(drm_bacon_bo *bo, int used,
-			struct drm_clip_rect *cliprects, int num_cliprects, int DR4,
-			unsigned int flags);
+int drm_bacon_bo_mrb_exec(drm_bacon_bo *bo, int used, unsigned int flags);
 int drm_bacon_bufmgr_check_aperture_space(drm_bacon_bo ** bo_array, int count);
 
 /**
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index b1104286578..c35d9ca5bda 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -488,7 +488,7 @@ do_flush_locked(struct brw_context *brw, int in_fence_fd, int *out_fence_fd)
             assert(in_fence_fd == -1);
             assert(out_fence_fd == NULL);
             ret = drm_bacon_bo_mrb_exec(batch->bo, 4 * USED_BATCH(*batch),
-                                        NULL, 0, 0, flags);
+                                        flags);
 	 } else {
 	    ret = drm_bacon_gem_bo_fence_exec(batch->bo, brw->hw_ctx,
                                                 4 * USED_BATCH(*batch),
diff --git a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
index 964bdf19dc8..be587ca9282 100644
--- a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
+++ b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
@@ -2000,7 +2000,6 @@ drm_bacon_update_buffer_offsets2 (drm_bacon_bufmgr_gem *bufmgr_gem)
 
 static int
 do_exec2(drm_bacon_bo *bo, int used, drm_bacon_context *ctx,
-	 drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
 	 int in_fence, int *out_fence,
 	 unsigned int flags)
 {
@@ -2046,10 +2045,10 @@ do_exec2(drm_bacon_bo *bo, int used, drm_bacon_context *ctx,
 	execbuf.buffer_count = bufmgr_gem->exec_count;
 	execbuf.batch_start_offset = 0;
 	execbuf.batch_len = used;
-	execbuf.cliprects_ptr = (uintptr_t)cliprects;
-	execbuf.num_cliprects = num_cliprects;
+	execbuf.cliprects_ptr = 0;
+	execbuf.num_cliprects = 0;
 	execbuf.DR1 = 0;
-	execbuf.DR4 = DR4;
+	execbuf.DR4 = 0;
 	execbuf.flags = flags;
 	if (ctx == NULL)
 		i915_execbuffer2_set_context_id(execbuf, 0);
@@ -2108,28 +2107,22 @@ skip_execution:
 }
 
 int
-drm_bacon_bo_exec(drm_bacon_bo *bo, int used,
-		  drm_clip_rect_t *cliprects, int num_cliprects,
-		  int DR4)
+drm_bacon_bo_exec(drm_bacon_bo *bo, int used)
 {
-	return do_exec2(bo, used, NULL, cliprects, num_cliprects, DR4,
-			-1, NULL, I915_EXEC_RENDER);
+	return do_exec2(bo, used, NULL, -1, NULL, I915_EXEC_RENDER);
 }
 
 int
-drm_bacon_bo_mrb_exec(drm_bacon_bo *bo, int used,
-		      drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
-		      unsigned int flags)
+drm_bacon_bo_mrb_exec(drm_bacon_bo *bo, int used, unsigned int flags)
 {
-	return do_exec2(bo, used, NULL, cliprects, num_cliprects, DR4,
-			-1, NULL, flags);
+	return do_exec2(bo, used, NULL, -1, NULL, flags);
 }
 
 int
 drm_bacon_gem_bo_context_exec(drm_bacon_bo *bo, drm_bacon_context *ctx,
 			      int used, unsigned int flags)
 {
-	return do_exec2(bo, used, ctx, NULL, 0, 0, -1, NULL, flags);
+	return do_exec2(bo, used, ctx, -1, NULL, flags);
 }
 
 int
@@ -2140,7 +2133,7 @@ drm_bacon_gem_bo_fence_exec(drm_bacon_bo *bo,
 			    int *out_fence,
 			    unsigned int flags)
 {
-	return do_exec2(bo, used, ctx, NULL, 0, 0, in_fence, out_fence, flags);
+	return do_exec2(bo, used, ctx, in_fence, out_fence, flags);
 }
 
 static int
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 7dfcb3b9106..3801dc60397 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1410,7 +1410,6 @@ intel_detect_pipelined_register(struct intel_screen *screen,
    *batch++ = MI_BATCH_BUFFER_END;
 
    drm_bacon_bo_mrb_exec(bo, ALIGN((char *)batch - (char *)bo->virtual, 8),
-                         NULL, 0, 0,
                          I915_EXEC_RENDER);
 
    /* Check whether the value got written. */
-- 
2.12.1



More information about the mesa-dev mailing list