summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2016-12-06 18:47:17 +0100
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2016-12-07 14:16:55 +0100
commit35f8cc3b9a92c661e5331d64fdfdedb518891d5c (patch)
tree4c79cc04e49363fb7614318f9cc390c45e92e6c7 /drivers/gpu/drm/drm_atomic.c
parentdrm/bridge: analogix: Don't return -EINVAL when panel doesn't support PSR (diff)
downloadlinux-35f8cc3b9a92c661e5331d64fdfdedb518891d5c.tar.xz
linux-35f8cc3b9a92c661e5331d64fdfdedb518891d5c.zip
drm/fence: add drm_crtc_create_fence()
Instead of dealing with crtc details inside drm_atomic.c we should just export a function that creates a new crtc fence for us and use that. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1481046437-18778-1-git-send-email-gustavo@padovan.org
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 19d7bcb88217..72fa5b20baf1 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1864,20 +1864,6 @@ EXPORT_SYMBOL(drm_atomic_clean_old_fb);
* helpers and for the DRM event handling for existing userspace.
*/
-static struct dma_fence *get_crtc_fence(struct drm_crtc *crtc)
-{
- struct dma_fence *fence;
-
- fence = kzalloc(sizeof(*fence), GFP_KERNEL);
- if (!fence)
- return NULL;
-
- dma_fence_init(fence, &drm_crtc_fence_ops, &crtc->fence_lock,
- crtc->fence_context, ++crtc->fence_seqno);
-
- return fence;
-}
-
struct drm_out_fence_state {
s64 __user *out_fence_ptr;
struct sync_file *sync_file;
@@ -1959,7 +1945,7 @@ static int prepare_crtc_signaling(struct drm_device *dev,
f[*num_fences].out_fence_ptr = fence_ptr;
*fence_state = f;
- fence = get_crtc_fence(crtc);
+ fence = drm_crtc_create_fence(crtc);
if (!fence)
return -ENOMEM;