[Intel-gfx] [PATCH 04/13] drm/i915: one request per batchbuffer is enough

Daniel Vetter daniel.vetter at ffwll.ch
Thu Feb 4 22:05:04 CET 2010


Now that the flushing list house-keeping is also done in i915_gem_flush
we can drop one unnecessary call to i915_add_request.

With this, the cpu has to potentially wait a tad bit longer for the gpu
when doing gtt access. Usually this means software fallbacks, i.e.
that's a worst-case, anyway.

Also two small cosmetic fixes, while I was looking at the code.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/i915/i915_gem.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b78b0e5..7301f09 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2900,7 +2900,6 @@ i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj, int write)
 int
 i915_gem_object_set_to_display_plane(struct drm_gem_object *obj)
 {
-	struct drm_device *dev = obj->dev;
 	struct drm_i915_gem_object *obj_priv = obj->driver_private;
 	uint32_t old_write_domain, old_read_domains;
 	int ret;
@@ -3534,7 +3533,7 @@ i915_dispatch_gem_execbuffer(struct drm_device *dev,
 			OUT_RING(MI_BATCH_BUFFER);
 			OUT_RING(exec_start | MI_BATCH_NON_SECURE);
 			OUT_RING(exec_start + exec_len - 4);
-			OUT_RING(0);
+			OUT_RING(MI_NOOP);
 			ADVANCE_LP_RING();
 		} else {
 			BEGIN_LP_RING(2);
@@ -3926,8 +3925,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
 		i915_gem_flush(dev,
 			       dev->invalidate_domains,
 			       dev->flush_domains);
-		if (dev->flush_domains & I915_GEM_GPU_DOMAINS)
-			(void)i915_add_request(dev, file_priv, 0);
 	}
 
 	for (i = 0; i < args->buffer_count; i++) {
-- 
1.6.6.1




More information about the Intel-gfx mailing list