diff options
| author | Dave Airlie <airlied@redhat.com> | 2016-12-09 12:29:10 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2016-12-09 12:29:10 +1000 |
| commit | acc5ddd972793d6ec7e51a9543f24b7e932134dc (patch) | |
| tree | 2d972ba062846279b04126191a4d0e4985441721 /drivers/gpu/drm/drm_crtc.c | |
| parent | bfd5be0f9e0cdcaafaeaa1d59fbcfb5bacb1105a (diff) | |
| parent | 72a93e8dd52c9feea42f1258d555e6070680a347 (diff) | |
| download | blackbird-op-linux-acc5ddd972793d6ec7e51a9543f24b7e932134dc.tar.gz blackbird-op-linux-acc5ddd972793d6ec7e51a9543f24b7e932134dc.zip | |
Merge tag 'drm-misc-next-2016-12-08' of git://anongit.freedesktop.org/git/drm-misc into drm-next
Another pile of misc stuff, final one for 4.10. If there's some serious
bugfix still I'll send you a pull for drm-misc-next-fixes (like we do with
intel), otherwise this is it and next pull next year for 4.11.
Most interesting bits are probably Chris' fb helper fixes against mst
hotplug oopses.
* tag 'drm-misc-next-2016-12-08' of git://anongit.freedesktop.org/git/drm-misc: (22 commits)
drm: Take ownership of the dmabuf->obj when exporting
drm: Allow CAP_PRIME on !MODESET
drm/fence: add drm_crtc_create_fence()
drm/bridge: analogix: Don't return -EINVAL when panel doesn't support PSR
drm/atomic: doc: remove old comment about nonblocking commits
drm: Don't block the kworker waiting for mode_config.mutex in output_poll()
drm: Return -ENOTSUPP when called for KMS cap with a non-KMS driver
drm/amdgpu: don't add files at control minor debugfs directory
drm: allow changing DPMS mode
drm/qxl: fix use of uninitialized variable
drm/qxl: Don't register debugfs for control minors
drm/radeon: don't add files at control minor debugfs directory
drm/vmwgfx: Switch to mode_cmd2
drm/vgem: Use ww_mutex_(un)lock even with a NULL context
drm: Make the connector .detect() callback optional
drm/bridge: tc358767: don't warn if display side ASSR enable fails
drm: Initialise drm_mm.head_node.allocated
drm: Fix locking cargo-cult in encoder/plane init/cleanup
drm/doc: Fix indenting in drm_modeset_lock.c comment
drm: Protect fb_helper list manipulation with a mutex
...
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
| -rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 90931e039731..e75f62cd8a65 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -152,6 +152,8 @@ static void drm_crtc_crc_fini(struct drm_crtc *crtc) #endif } +static const struct dma_fence_ops drm_crtc_fence_ops; + static struct drm_crtc *fence_to_crtc(struct dma_fence *fence) { BUG_ON(fence->ops != &drm_crtc_fence_ops); @@ -177,13 +179,27 @@ static bool drm_crtc_fence_enable_signaling(struct dma_fence *fence) return true; } -const struct dma_fence_ops drm_crtc_fence_ops = { +static const struct dma_fence_ops drm_crtc_fence_ops = { .get_driver_name = drm_crtc_fence_get_driver_name, .get_timeline_name = drm_crtc_fence_get_timeline_name, .enable_signaling = drm_crtc_fence_enable_signaling, .wait = dma_fence_default_wait, }; +struct dma_fence *drm_crtc_create_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; +} + /** * drm_crtc_init_with_planes - Initialise a new CRTC object with * specified primary and cursor planes. |

