All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Micro-optimise i915_request_retire()
@ 2018-05-02 17:21 Chris Wilson
  2018-05-02 18:09 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2018-05-02 17:21 UTC (permalink / raw)
  To: intel-gfx

I caught the compiler emitting the if(!NULL) guard at the start of
dma_fence_put(); on the request it should know for certain is already
non-NULL. Mark up the function as non-null and tell the compiler that
the request pointer doesn't change:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5)
Function                                     old     new   delta
i915_request_retire                         1782    1777      -5

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_request.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 3bcb75742110..d54c99211c8c 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -405,7 +405,8 @@ static void __retire_engine_upto(struct intel_engine_cs *engine,
 	} while (tmp != rq);
 }
 
-static void i915_request_retire(struct i915_request *request)
+__attribute__((nonnull))
+static void i915_request_retire(struct i915_request * const request)
 {
 	struct i915_gem_active *active, *next;
 
-- 
2.17.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-03 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 17:21 [PATCH] drm/i915: Micro-optimise i915_request_retire() Chris Wilson
2018-05-02 18:09 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-05-03  0:15 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-03 13:59 ` [PATCH] " Joonas Lahtinen
2018-05-03 14:06   ` Chris Wilson
2018-05-03 16:32     ` Tvrtko Ursulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.