From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH v2 3/6] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop() Date: Thu, 16 Jun 2016 12:25:13 +0300 Message-ID: <57627079.5040800@ti.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1885640319==" Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [198.47.19.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id C742E6E9E6 for ; Thu, 16 Jun 2016 09:25:22 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Jyri Sarha , dri-devel@lists.freedesktop.org Cc: bcousson@baylibre.com, laurent.pinchart@ideasonboard.com List-Id: dri-devel@lists.freedesktop.org --===============1885640319== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="A7DtRt0G16ouVbVE9XJHacaMj7KVIt5Ws" --A7DtRt0G16ouVbVE9XJHacaMj7KVIt5Ws Content-Type: multipart/mixed; boundary="26f84E4WgvWFFC2bNLD5od8ekq3vR00K3" From: Tomi Valkeinen To: Jyri Sarha , dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, daniel@ffwll.ch, laurent.pinchart@ideasonboard.com, robdclark@gmail.com, bcousson@baylibre.com Message-ID: <57627079.5040800@ti.com> Subject: Re: [PATCH v2 3/6] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop() References: In-Reply-To: --26f84E4WgvWFFC2bNLD5od8ekq3vR00K3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 15/06/16 11:39, Jyri Sarha wrote: > Move wait queue waiting of LCDC_FRAME_DONE IRQ from tilcdc_crtc_dpms() > into stop() function. You could mention the reason for this, which is just a cleanup here (I presume). > Signed-off-by: Jyri Sarha > --- > drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 31 ++++++++++++++++------------= --- > 1 file changed, 16 insertions(+), 15 deletions(-) >=20 > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/til= cdc/tilcdc_crtc.c > index 1343717..cfa1a4e 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c > @@ -113,9 +113,25 @@ static void start(struct drm_crtc *crtc) > =20 > static void stop(struct drm_crtc *crtc) > { > + struct tilcdc_crtc *tilcdc_crtc =3D to_tilcdc_crtc(crtc); > struct drm_device *dev =3D crtc->dev; > + struct tilcdc_drm_private *priv =3D dev->dev_private; > =20 > + tilcdc_crtc->frame_done =3D false; > tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE); > + > + /* > + * if necessary wait for framedone irq which will still come > + * before putting things to sleep.. > + */ > + if (priv->rev =3D=3D 2) { > + int ret =3D wait_event_timeout(tilcdc_crtc->frame_done_wq, > + tilcdc_crtc->frame_done, > + msecs_to_jiffies(50)); Not part of this patch, but I think the timeout could be increased quite a bit. It's never supposed to happen. And while video timings with 50ms frames are not common, I don't see that as impossible either. Of course, optimally the timeout would be calculated from the video timings, which shouldn't be too difficult either... Anyway, as I said, not part of this patch. Tomi --26f84E4WgvWFFC2bNLD5od8ekq3vR00K3-- --A7DtRt0G16ouVbVE9XJHacaMj7KVIt5Ws 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 iQIcBAEBCAAGBQJXYnB6AAoJEPo9qoy8lh71OGgP/3gSCr1sTRoXmcoIxCqUb38g 74I4hAsEIb+L2ceXU7ZM1GCQR+0G+behYI5n8xrsh3cJSYD8tI62oJ851FBJ3n2U qAuXywpGEKwMq8lNYWHYN7vPmCAj3RwLeIElUJE5pd8czWES+5kiHqyH0JPCpThm vNiZEwM1KPwhB1jE+XzuXp7mCEhxZvAKg380qynZeISEMANfIdxIzpFzVsTgMvHS VynzIfrxKT0+OKps9BEh2Z8gQsVqet3CHzi3Tiqah1gloMZp/LkdwFlDtFWhrMc3 JbSDLVHAk/AUpUWamq7YcqJXlQijBKB9qWCF4SsQ7QMADiJFy7npERNKtKL+HYuH dxEN9kJnoZC5kNWC74f+r2Eu8RqtIJdT+yBSQDU2HosnkhAGmeg0tg/ctc0WYOtV zRkXpqPTZTeLmcl4aczXQeToPLpxqX6fkq2NCgzvAKsIzBeXLxGtlqlKj/BSE0OR XIV4UeTqyh19RDzUBQCHQTcBa/tI4NxeyhJngTyYHdo+BlqSWxVM/FHpT4mkNJPx ZILu6dZwXIKlgLWHVvmvyORWqb9tlOsnC07zGoHZ92/M/GbkG97zQGWo5s9pIlFz Nr/LgXjJ3Pc5hLRIBrDV2CafzsptR+fHJOaY1fK4pQ3R2OpxQxb01AiUaBW8Pplk M3KTEo0rEjq8HJahEyNc =yKFm -----END PGP SIGNATURE----- --A7DtRt0G16ouVbVE9XJHacaMj7KVIt5Ws-- --===============1885640319== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1885640319==--