drm/modeset: Prime modeset lock vs dma_resv
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 19 Nov 2019 21:08:42 +0000 (22:08 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 21 Nov 2019 10:03:31 +0000 (11:03 +0100)
commit2c51419e8c06f6b8b1b91892688b17dd9a7f6e39
treee9344a662434885fcd48ae09524fba094e68f36b
parent7819c4607fb077bfc7b0074382d0cfef35ef17c0
drm/modeset: Prime modeset lock vs dma_resv

It's kinda really hard to get this wrong on a driver with both display
and dma_resv locking. But who ever knows, so better to make sure that
really all drivers nest these the same way.

For actual lock semantics the acquire context nesting doesn't matter.
But to teach lockdep what's going on with ww_mutex the acquire ctx is
a fake lockdep lock, hence from a lockdep pov it does matter. That's
why I figured better to include it.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191119210844.16947-2-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_mode_config.c