1
0
Fork 0

drm: Use default dma_fence hooks where possible for null syncobj

Both the .enable_signaling and .release of the null syncobj fence
can be replaced by the default callbacks for a small reduction in code
size. In particular the default callback for .release was changed in
commit e28bd101ae ("drm: rename null fence to stub fence in syncobj v2")
which neglected its RCU protection.

Fixes: e28bd101ae ("drm: rename null fence to stub fence in syncobj v2")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180920200530.2836-1-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
hifive-unleashed-5.1
Chris Wilson 2018-09-20 21:05:29 +01:00
parent adbc8208e6
commit 1664691a65
1 changed files with 0 additions and 11 deletions

View File

@ -66,20 +66,9 @@ static const char *drm_syncobj_stub_fence_get_name(struct dma_fence *fence)
return "syncobjstub";
}
static bool drm_syncobj_stub_fence_enable_signaling(struct dma_fence *fence)
{
return !dma_fence_is_signaled(fence);
}
static void drm_syncobj_stub_fence_release(struct dma_fence *f)
{
kfree(f);
}
static const struct dma_fence_ops drm_syncobj_stub_fence_ops = {
.get_driver_name = drm_syncobj_stub_fence_get_name,
.get_timeline_name = drm_syncobj_stub_fence_get_name,
.enable_signaling = drm_syncobj_stub_fence_enable_signaling,
.release = drm_syncobj_stub_fence_release,
};