[PATCH] drm/atomic: Introduce drm_atomic_helper_shutdown

Tomi Valkeinen tomi.valkeinen at ti.com
Mon Mar 27 07:15:12 UTC 2017


On 21/03/17 18:41, Daniel Vetter wrote:
> The trouble here is that it does multiple atomic commits under one
> drm_modeset_lock_all, which breaks the behind-the-scenes acquire
> context magic that function pulls off. It's much better to have one
> overall atomic commit. That we still have multiple atomic commits
> prevents us from adding some pretty useful debug checks to the atomic
> machinery.
> 
> Hence it is really a bad idea to call the legacy
> drm_crtc_force_disable_all() function. There's 2 atomic drivers using
> this still, nouveau and tinydrm. To fix this, introduce a new
> drm_atomic_helper_shutdown() by extracting the code from i915.
> 
> While at it improve kernel-doc and catch future offenders by
> sprinkling a WARN_ON into the legacy function. We should probably move
> those into the legacy modeset helpers, too ...
> 
> v2: Make it compile on arm drivers too (Noralf).
> 
> v3: Correct kerneldoc to point at _disable_all().
> 
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Acked-by: Noralf Trønnes <noralf at tronnes.org>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Noralf Trønnes <noralf at tronnes.org>
> Cc: Ben Skeggs <bskeggs at redhat.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>

Tested-by: Tomi Valkeinen <tomi.valkeinen at ti.com>

As a side note, I find it a bit odd that when fbdev is disabled, the
crtcs stays enabled even when DRM userspace app quits. Or is that just
omapdrm behavior? I presume not, as this shutdown on unload would not be
needed otherwise.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170327/26f84294/attachment.sig>


More information about the dri-devel mailing list