From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCHv3 29/30] drm/omap: use drm_atomic_helper_shutdown() Date: Wed, 29 Mar 2017 12:08:19 +0300 Message-ID: <22bc7111-ece5-5fb4-5a23-016d6612c61a@ti.com> References: <1490706496-4959-1-git-send-email-tomi.valkeinen@ti.com> <1490706496-4959-30-git-send-email-tomi.valkeinen@ti.com> <7170884.JmdPD2UAPW@avalon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1244540516==" Return-path: Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id D62056E179 for ; Wed, 29 Mar 2017 09:08:24 +0000 (UTC) In-Reply-To: <7170884.JmdPD2UAPW@avalon> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Laurent Pinchart Cc: Jyri Sarha , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1244540516== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c3CCXWUiifRnLHJFoLkAAcWmTWLpfVkEr" --c3CCXWUiifRnLHJFoLkAAcWmTWLpfVkEr Content-Type: multipart/mixed; boundary="VVtxafqw4MrkMl1vrXKip7Wk8C3SErQrO"; protected-headers="v1" From: Tomi Valkeinen To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, Jyri Sarha , Daniel Vetter Message-ID: <22bc7111-ece5-5fb4-5a23-016d6612c61a@ti.com> Subject: Re: [PATCHv3 29/30] drm/omap: use drm_atomic_helper_shutdown() References: <1490706496-4959-1-git-send-email-tomi.valkeinen@ti.com> <1490706496-4959-30-git-send-email-tomi.valkeinen@ti.com> <7170884.JmdPD2UAPW@avalon> In-Reply-To: <7170884.JmdPD2UAPW@avalon> --VVtxafqw4MrkMl1vrXKip7Wk8C3SErQrO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 29/03/17 11:49, Laurent Pinchart wrote: > Hi Tomi, >=20 > Thank you for the patch. >=20 > On Tuesday 28 Mar 2017 16:08:15 Tomi Valkeinen wrote: >> Use drm_atomic_helper_shutdown() to ensure that all crtcs are disabled= >> when unloading the driver. >> >> Signed-off-by: Tomi Valkeinen >> Cc: Daniel Vetter >> >> --- >> drivers/gpu/drm/omapdrm/omap_drv.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c >> b/drivers/gpu/drm/omapdrm/omap_drv.c index ad8d16cf819c..7b917c0c1a27 >> 100644 >> --- a/drivers/gpu/drm/omapdrm/omap_drv.c >> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c >> @@ -865,6 +865,8 @@ static int pdev_remove(struct platform_device *pde= v) >> if (priv->fbdev) >> omap_fbdev_free(ddev); >> >> + drm_atomic_helper_shutdown(ddev); >> + >=20 > Can the hardware still be enabled at this point ? If pdev_remove() is c= alled=20 > we shouldn't have any application holding the device open (otherwise we= 'll=20 > crash miserably), and the fbdev compatibility layer is disabled on the = > previous line. The hw is disabled before drm_atomic_helper_shutdown() is called only if you have fbdev. And fbdev on all the connectors. If that's not the case, we need drm_atomic_helper_shutdown() to disable the hw. Tomi --VVtxafqw4MrkMl1vrXKip7Wk8C3SErQrO-- --c3CCXWUiifRnLHJFoLkAAcWmTWLpfVkEr 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 iQIcBAEBCAAGBQJY23mDAAoJEPo9qoy8lh71PAIQAKKuS1VLPxQ4LvN2WoKJDKfQ REAxuGzLYWbYhfOO7i9i+xS9aylf+KikJiTNGTaflH7tkkoAz6uLzdbwgxBSIAKK DOCaiMYWGbECq0OMeFulhdlOdyh48xe+/ONpjAXMbvwtwBguYm6+8rpw4nQLEd69 n6VF7V5pYKWF7h+EO/kk1czmGdyWYvBbd4Jt/9xQRnaGaMaxPV2EvPcKOVSa1YNG 2FT89qvAVtHVRMPZ6UY9k97caoRWKKA9ZpAWnhRNjAxKl+Q597b+uoxRaMlsPel3 wwN6D9FOHQ6eLbyRrOoP/29KQC+aUFvEopAmWz+vNhjdXvxffKl4TnM0hcIWgtLz 8UMKrTaeTsQsCPiW64UHkiw1oPYVLF7h58ta4SzRvceXM+soembsraVJWE1dgb0o Gyh5mLsY9qJxNjbx2TeOc6RBJL+sMl/OZ9OLa1nRD5UCLakvJfPwiDv6p1IU/kO9 ynYrg+97zUkxOyAC3vApyN8C64yJoUm4e57xTs1KD6Nms+g3/iQ21uakfD/Qj7A+ pX5N4cDUu5PbBP3a7PPumU6ru+TZCD400E+97I5TbZ48CSnsQ1Q3C2J04lZGc/k9 C2KUfnw+h8HTb3vqavGdrRL4PrM2dli465NnpQNeiwKAtjpimFFT3SPU22yJrK08 i04WV6jZWnVoQpLfbcwh =cU5b -----END PGP SIGNATURE----- --c3CCXWUiifRnLHJFoLkAAcWmTWLpfVkEr-- --===============1244540516== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1244540516==--