From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH 10/23] drm: omapdrm: Use atomic state instead of local device state Date: Tue, 10 May 2016 16:24:11 +0300 Message-ID: <5731E0FB.2080907@ti.com> References: <1461702945-14185-1-git-send-email-laurent.pinchart@ideasonboard.com> <1461702945-14185-11-git-send-email-laurent.pinchart@ideasonboard.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0880665679==" Return-path: Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by gabe.freedesktop.org (Postfix) with ESMTPS id B523F6E64A for ; Tue, 10 May 2016 13:24:17 +0000 (UTC) In-Reply-To: <1461702945-14185-11-git-send-email-laurent.pinchart@ideasonboard.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0880665679== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kMtsA9IRW3BOigV297e2nKsCvdiuKOoi7" --kMtsA9IRW3BOigV297e2nKsCvdiuKOoi7 Content-Type: multipart/mixed; boundary="dvUeJJawQgIcmmRUAfXK7TLOL2FB040ue" From: Tomi Valkeinen To: Laurent Pinchart , dri-devel@lists.freedesktop.org Cc: Rob Clark Message-ID: <5731E0FB.2080907@ti.com> Subject: Re: [PATCH 10/23] drm: omapdrm: Use atomic state instead of local device state References: <1461702945-14185-1-git-send-email-laurent.pinchart@ideasonboard.com> <1461702945-14185-11-git-send-email-laurent.pinchart@ideasonboard.com> In-Reply-To: <1461702945-14185-11-git-send-email-laurent.pinchart@ideasonboard.com> --dvUeJJawQgIcmmRUAfXK7TLOL2FB040ue Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 26/04/16 23:35, Laurent Pinchart wrote: > Instead of conditioning planes update based on the hardware device > state, use the CRTC state stored in the atomic state. This reduces the > dependency from the DRM layer to the DSS layer. >=20 > Signed-off-by: Laurent Pinchart > --- > drivers/gpu/drm/omapdrm/omap_crtc.c | 23 ++++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omap= drm/omap_crtc.c > index 6359d7933b93..4c56d6a68390 100644 > --- a/drivers/gpu/drm/omapdrm/omap_crtc.c > +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c > @@ -381,18 +381,23 @@ static void omap_crtc_atomic_flush(struct drm_crt= c *crtc, > =20 > WARN_ON(omap_crtc->vblank_irq.registered); > =20 > - if (dispc_mgr_is_enabled(omap_crtc->channel)) { > + /* > + * Only flush the CRTC if it is currently active. CRTCs that require = a > + * mode set are disabled prior plane updates and enabled afterwards. > + * They are thus not active, regardless of what their state report. > + */ > + if (!crtc->state->active || drm_atomic_crtc_needs_modeset(crtc->state= )) > + return; If the DRM core doesn't track whether a CRTC HW is enabled at the moment, maybe omapdrm should? I guess the above works, but that if() makes me a bit uneasy, as it's not really obvious, and the logic behind it could possibly change later... A "if (crtc->is_hw_enabled)" would be much more readable. Tomi --dvUeJJawQgIcmmRUAfXK7TLOL2FB040ue-- --kMtsA9IRW3BOigV297e2nKsCvdiuKOoi7 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 iQIcBAEBCAAGBQJXMeD7AAoJEPo9qoy8lh71A40QAIC25q4bFZwH011TwArGhbKa R1MpDqzSO375e5xDI+sbS3mSOZxsKwRE7+54qFfsOQW2uSFBDgETNjOUNTHHwJ3f 3TqthDOFgq6HVD/5pnr/cmdLcnwOKvKcg462yoWiqOJg53ZUZZ3lOzn19hglbt17 IwI0Pw7fhMmbVs6krP9yB5TEG47SBKu1e6qOCxFO/NefaJ0BxgS+R0447f0ppHdo eZL9HB63TAqi+tK6tecaaTerT8ALd16fLHOfHls7WyDAGkB8Awg/Vu6bgHt15RyR S0tNhlHqnvY3CHPislmcnfB+ytCSqcFM9vF2o2oO9eMLAPwDfpCZjv62WcgtUQog 4HhOCGv0vnKP1RTHAlI8/eSz6WjCykPrknHAQT+Xq78ogZnF6csdGlH4Ps0DMxE4 l2kqTCpM640b8pCf5c1vCXjyE3EoXkwEvevEC98wqy91sGx27ZyzjgIAHx+dE7iO QVD7QIcXoj9CYKZfl/REy+25Q0v62Rq25yrNyEhwQtNNgzBA6kphxDlK90s6bLOn Cquxis5uGrwwbMQHeegaclwhco7I9OjjG0uuSMaJnTGofASSM2zLSib082EyA5bD NvBOtuQv000R85jpeV2U6UNNyYIcbgZWoS36Kx0hnKBBa+lc6II6dcAngfDe+7vd J6isEWmN+tGIenR7jkKX =nkyK -----END PGP SIGNATURE----- --kMtsA9IRW3BOigV297e2nKsCvdiuKOoi7-- --===============0880665679== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0880665679==--