[Intel-gfx] [PATCH] drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
Daniel Vetter
daniel at ffwll.ch
Wed Feb 21 18:36:08 UTC 2018
On Wed, Feb 21, 2018 at 04:23:31PM +0100, Maarten Lankhorst wrote:
> After we acquired all generic modeset locks in drm_modeset_lock_all, it's
> unsafe acquire any other so just mark acquisition as done.
>
> Atomic drivers shouldn't use drm_modeset_lock_all.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Also, I'm pretty much expecting to regret this like all the other
ww_acquire_done patches I've acked, but where's the fun in not trying :-)
Cheers, Daniel
> ---
> drivers/gpu/drm/drm_modeset_lock.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> index 963e23db0fe7..8a5100685875 100644
> --- a/drivers/gpu/drm/drm_modeset_lock.c
> +++ b/drivers/gpu/drm/drm_modeset_lock.c
> @@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
> kfree(ctx);
> return;
> }
> + ww_acquire_done(&ctx->ww_ctx);
>
> WARN_ON(config->acquire_ctx);
>
> --
> 2.16.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list