]> git.baikalelectronics.ru Git - kernel.git/commit
drm/atomic: Paper over locking WARN in default_state_clear
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 29 Jul 2015 10:51:41 +0000 (12:51 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 11 Aug 2015 10:04:17 +0000 (12:04 +0200)
commitf26152fb438b0046e34cb2fb4f699e10ae281f04
tree25dcd923462a0cccdc2818ed7587d0d13bcab71f
parent69094967ef1f149c6d7394b2c128a30f75e2f30e
drm/atomic: Paper over locking WARN in default_state_clear

In

commit 7c38228f5bdf63a1a8efa5f05563455cea283e29
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Nov 19 18:38:07 2014 +0100

    drm/atomic: Only destroy connector states with connection mutex held

I tried to fix races of atomic commits against connector
hot-unplugging. The idea is to ensure lifetimes by holding the
connection_mutex long enough. That works for synchronous commits, but
not for async ones.

For async atomic commit we really need to fix up connector lifetimes
for real. But that's a much bigger task, so just add more duct-tape:
For cleaning up connector states we currently don't need the connector
itself. So NULL it out and remove the locking check. Of course that
check was to protect the entire sequence, but the modeset itself
should be save since currently DP MST hot-removal does a dpms-off. And
that should synchronize with any outstanding async atomic commit.

Or at least that's my hope, this is all a giant mess.

Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/drm_atomic.c