From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH 2/2] drm/omapdrm: Move commit_modeset_enables() before commit_planes() Date: Mon, 30 Jan 2017 10:50:51 +0200 Message-ID: References: <799e17732ff6218ba6ea2287397faf24b7660918.1485510281.git.jsarha@ti.com> <3304132.PaFDjGLX31@avalon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1400826678==" Return-path: Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D0F76E38F for ; Mon, 30 Jan 2017 08:50:59 +0000 (UTC) In-Reply-To: <3304132.PaFDjGLX31@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 , Jyri Sarha Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1400826678== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="keB5aDGrT1VrRBdCfMxolXwDPf4MxaWLP" --keB5aDGrT1VrRBdCfMxolXwDPf4MxaWLP Content-Type: multipart/mixed; boundary="5vhC27NnSj93TdaDaNAFE72RHJJsuM6dc"; protected-headers="v1" From: Tomi Valkeinen To: Laurent Pinchart , Jyri Sarha Cc: dri-devel@lists.freedesktop.org, airlied@linux.ie, daniel@ffwll.ch Message-ID: Subject: Re: [PATCH 2/2] drm/omapdrm: Move commit_modeset_enables() before commit_planes() References: <799e17732ff6218ba6ea2287397faf24b7660918.1485510281.git.jsarha@ti.com> <3304132.PaFDjGLX31@avalon> In-Reply-To: <3304132.PaFDjGLX31@avalon> --5vhC27NnSj93TdaDaNAFE72RHJJsuM6dc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 28/01/17 18:17, Laurent Pinchart wrote: > Hi Jyri, >=20 > Thank you for the patch. >=20 > On Friday 27 Jan 2017 12:04:55 Jyri Sarha wrote: >> Move drm_atomic_helper_commit_modeset_enables() call to before >> drm_atomic_helper_commit_planes() call and have a >> omap_atomic_wait_for_completion() call after both. >> >> With the current dss dispc implementation we have to enable the new >> modeset before we can commit planes. The dispc ovl configuration >> relies on the video mode configuration been written into the HW when >> the ovl configuration is calculated. >> >> This approach is not ideal because after a mode change the plane >> update is executed only after the first vblank interrupt. The dispc >> implementation should be fixed so that it is able use uncommitted drm >> state information. information. >> >> Signed-off-by: Jyri Sarha >> --- >> drivers/gpu/drm/omapdrm/omap_drv.c | 16 +++++++++++++++- >> 1 file changed, 15 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c >> b/drivers/gpu/drm/omapdrm/omap_drv.c index 5e55f1b..8c15735 100644 >> --- a/drivers/gpu/drm/omapdrm/omap_drv.c >> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c >> @@ -96,8 +96,22 @@ static void omap_atomic_complete(struct >> omap_atomic_state_commit *commit) dispc_runtime_get(); >> >> drm_atomic_helper_commit_modeset_disables(dev, old_state); >> - drm_atomic_helper_commit_planes(dev, old_state, 0); >> + >> + /* With the current dss dispc implementation we have to enable >> + * the new modeset before we can commit planes. The dispc ovl >> + * configuration relies on the video mode configuration been >> + * written into the HW when the ovl configuration is >> + * calculated. >> + * >> + * This approach is not ideal because after a mode change the >> + * plane update is executed only after the first vblank >> + * interrupt. The dispc implementation should be fixed so that >> + * it is able use uncommitted drm state information. >=20 > Any chance you could fix the dispc implementation ? ;-) Otherwise, coul= d you=20 Dispc change is on our todo, but the size of the change won't fit into "fix" definition =3D). There's a lot of state that the dispc side is looking at, which at the moment doesn't come from drm side. Tomi --5vhC27NnSj93TdaDaNAFE72RHJJsuM6dc-- --keB5aDGrT1VrRBdCfMxolXwDPf4MxaWLP 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 iQIcBAEBCAAGBQJYjv5rAAoJEPo9qoy8lh716S4P/A214rRoxpw6OJ5NyH74rfUS 938Z561a2IS1wlB3vC23e2ad5lz+VUiLGWHI7pfLQymCNTDWUxz+TjCZk8m/JWn9 J039NWr43kvt+HdG1mbRwi/gdN4/gNQQlclF4cjGaN//T59hgd2zauhBGAAWlVAs kGiT/KF+KFlEZRmLezw9piQyVT51EnkK+Hpllq1xFygQkbibaTHKVzvBYvf5g0o2 GnomcT5pOXSIqWpXmyiy655pUNBg3KhrqaNloULiyku+EJm4tFUEqy+DuI/41zMq kl0q4+L3ZJu7eRhkMwUiWPHHirebMkaP5HkCLZarz/bbGDFhaHCHyrLrJ500gPl0 FqsqC8X93qsaTgbXshZO5wY2sOr57+BNwkjE6WA1XDn3DA5pTPlczrY0zYxPL6BS i4jQ8cYF74yh7eNxI9IKKYv/qcUiFp2/+iBf5XiyCY3CLE1w5gZp0KUuOydjFEtc nVE74bZ/D2uiVA4bszDOT/GrOjNXPWeur+K2BEbO9ozqq/z3TFgTus+wo4T9KqbH mysjmWhFoBR4iSeUaGOcMd7ub0LSXbsYEW2W+2MmUL8NEYEmpdoC8Jyiw/3rvcmk bZLBXiOBP8yGdX7j54GLEOuGY+EyKMiiTlGrK7Yfb09d3/PuIpPDG+HhcOvsiupx ExzowMqID4r6QyAcMlfL =J2tm -----END PGP SIGNATURE----- --keB5aDGrT1VrRBdCfMxolXwDPf4MxaWLP-- --===============1400826678== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1400826678==--