[Intel-gfx] [PATCH 1/2] 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 e28bd101ae1b ("drm: rename null fence to stub fence in syncobj v2") which neglected its RCU protection. Fixes: e28bd101ae1b ("drm: rename null fence to stub fence in syncobj v2") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/drm_syncobj.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index 497729202bfe..e254f97fed7d 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -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, }; -- 2.19.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/2] 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. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_syncobj.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index 497729202bfe..e254f97fed7d 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -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, }; -- 2.19.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm: Use default dma_fence hooks where possible for null syncobj
On Tue, Sep 18, 2018 at 11:07:19AM +0100, Chris Wilson wrote: > 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. > > Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/drm_syncobj.c | 11 --- > 1 file changed, 11 deletions(-) > > diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c > index 497729202bfe..e254f97fed7d 100644 > --- a/drivers/gpu/drm/drm_syncobj.c > +++ b/drivers/gpu/drm/drm_syncobj.c > @@ -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, > }; > > > -- > 2.19.0 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx