From: Tomi Valkeinen Subject: Re: [PATCH] drm/atomic: Introduce drm_atomic_helper_shutdown Date: Mon, 27 Mar 2017 10:15:12 +0300 Message-ID: <95f9a5b3-603d-b1b5-8d58-2f1447a572cb@ti.com> References: <20170321152610.27203-1-daniel.vetter@ffwll.ch> <20170321164149.31531-1-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0152722701==" Return-path: In-Reply-To: <20170321164149.31531-1-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter , Intel Graphics Development Cc: Daniel Vetter , Ben Skeggs , DRI Development List-Id: dri-devel@lists.freedesktop.org --===============0152722701== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HK95InDNHUs0THIqqAWjMQaTXclJPxsX6" --HK95InDNHUs0THIqqAWjMQaTXclJPxsX6 Content-Type: multipart/mixed; boundary="hjpMCF4PKTbbPGC566igdadv1H8PbHA0W"; protected-headers="v1" From: Tomi Valkeinen To: Daniel Vetter , Intel Graphics Development Cc: DRI Development , Ben Skeggs , Daniel Vetter Message-ID: <95f9a5b3-603d-b1b5-8d58-2f1447a572cb@ti.com> Subject: Re: [PATCH] drm/atomic: Introduce drm_atomic_helper_shutdown References: <20170321152610.27203-1-daniel.vetter@ffwll.ch> <20170321164149.31531-1-daniel.vetter@ffwll.ch> In-Reply-To: <20170321164149.31531-1-daniel.vetter@ffwll.ch> --hjpMCF4PKTbbPGC566igdadv1H8PbHA0W Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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 ... >=20 > v2: Make it compile on arm drivers too (Noralf). >=20 > v3: Correct kerneldoc to point at _disable_all(). >=20 > Reviewed-by: Maarten Lankhorst > Acked-by: Noralf Tr=C3=B8nnes > Cc: Maarten Lankhorst > Cc: Noralf Tr=C3=B8nnes > Cc: Ben Skeggs > Signed-off-by: Daniel Vetter Tested-by: Tomi Valkeinen 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 --hjpMCF4PKTbbPGC566igdadv1H8PbHA0W-- --HK95InDNHUs0THIqqAWjMQaTXclJPxsX6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY2LwAAAoJEPo9qoy8lh71uv8P/Rb1TKKrYIZUgmm9kAP1Zz4f SyIlGPpqjEjIZ/lLJ7pQ1J9gi+P+KRPZT8IvvHop9+DpbMRgEScb1f8cCjseqr2N zoFJVU5eoXdbhLls+ypvbyUkEBG54XSSNLP0/9V8aFVdzgrtC8FQkz7r7h22gKoi t2d5ASYkzzjb1vdZvXHLff9vqGdyJTybe9jSjW2MMnqpYaI7rltN992jQnkaSWR5 /dYUhQgiqp0D3fESf7a32kq/JJYt2KUT0SvmiuzYRVcj4Q5oTCVywktTg7OeLZVv CaaXIbYgdDyf6cq2zMfc/KtW6U8uEK1S0Aiovjcu28s2RHcPy6ZJNS1noT8KAYjM Y1uniWJPNNT9vR3WWxHy8osL8CFme3SGnEXXsbbNlgthQ2d+Gx3h7C2WRD+K5ioY RGo5gZw7R9Vkoo8TzGsT/Fq44bGOeAaJuwS95Jfab+CjLta74STwUuQP//oDzHUo XpqIwNJKaUfEddrPGzdrrx4EnZ/b3X/syfxGAkSLQ3Awg5gDYFVQpHUrS6sT9luL 66vaR3nLQAuXc60il+YzUN2OKsWx3n4rz9snCA6Fybqx5o+bC5Uy+LjAaZcDTjU2 TvNlMgzJZ6EV6+w8+EMyZQ6E4xTN3i0Uplc/WgslKdMwM9xeqOuBiZ2ruS7+KFk1 5lKg2YGgcfAwSoBdZE/V =nBu2 -----END PGP SIGNATURE----- --HK95InDNHUs0THIqqAWjMQaTXclJPxsX6-- --===============0152722701== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0152722701==--