Skip to content

Commit

Permalink
drm/i915/gem: Mark up sw-fence notify function
Browse files Browse the repository at this point in the history
The sw-fence notify function requires to be at least 4-byte aligned so
that we can use the low bits in the function pointer for internal fence
flags. Make it so.

References: https://gitlab.freedesktop.org/drm/intel/issues/1433
Fixes: 42fb60d ("drm/i915/gem: Don't leak non-persistent requests on changing engines")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200311221739.30375-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Mar 11, 2020
1 parent 1aae306 commit c02aac2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/gem/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ static void kill_context(struct i915_gem_context *ctx)
kill_stale_engines(ctx);
}

static int engines_notify(struct i915_sw_fence *fence,
enum i915_sw_fence_notify state)
static int __i915_sw_fence_call
engines_notify(struct i915_sw_fence *fence, enum i915_sw_fence_notify state)
{
struct i915_gem_engines *engines =
container_of(fence, typeof(*engines), fence);
Expand Down

0 comments on commit c02aac2

Please sign in to comment.