From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 06/17] drm/tegra: dc: Add missing call to drm_vblank_on() Date: Tue, 4 Nov 2014 15:08:25 +0100 Message-ID: <20141104140823.GC31200@ulmo> References: <1415006868-318-1-git-send-email-thierry.reding@gmail.com> <1415006868-318-6-git-send-email-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1675880384==" Return-path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTP id E10C46E02E for ; Tue, 4 Nov 2014 06:08:27 -0800 (PST) Received: by mail-wi0-f172.google.com with SMTP id bs8so9483241wib.17 for ; Tue, 04 Nov 2014 06:08:27 -0800 (PST) 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: Sean Paul Cc: dri-devel List-Id: dri-devel@lists.freedesktop.org --===============1675880384== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aT9PWwzfKXlsBJM1" Content-Disposition: inline --aT9PWwzfKXlsBJM1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 03, 2014 at 01:45:56PM -0500, Sean Paul wrote: > On Mon, Nov 3, 2014 at 4:27 AM, Thierry Reding = wrote: > > From: Thierry Reding > > > > When the CRTC is enabled, make sure the VBLANK machinery is enabled. > > Failure to do so will cause drm_vblank_get() to not enable the VBLANK on > > the CRTC and VBLANK-synchronized page-flips won't work. > > > > While at it, get rid of the legacy drm_vblank_pre_modeset() and > > drm_vblank_post_modeset() calls that are replaced by drm_vblank_on() > > and drm_vblank_off(). > > > > Reported-by: Alexandre Courbot > > Signed-off-by: Thierry Reding > > --- > > drivers/gpu/drm/tegra/dc.c | 7 ++----- > > 1 file changed, 2 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c > > index 4a015232e2e8..4da366a4d78a 100644 > > --- a/drivers/gpu/drm/tegra/dc.c > > +++ b/drivers/gpu/drm/tegra/dc.c > > @@ -739,7 +739,6 @@ static const struct drm_crtc_funcs tegra_crtc_funcs= =3D { > > > > static void tegra_crtc_disable(struct drm_crtc *crtc) > > { > > - struct tegra_dc *dc =3D to_tegra_dc(crtc); > > struct drm_device *drm =3D crtc->dev; > > struct drm_plane *plane; > > > > @@ -755,7 +754,7 @@ static void tegra_crtc_disable(struct drm_crtc *crt= c) > > } > > } > > > > - drm_vblank_off(drm, dc->pipe); > > + drm_crtc_vblank_off(crtc); > > } > > > > static bool tegra_crtc_mode_fixup(struct drm_crtc *crtc, > > @@ -844,8 +843,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crt= c, > > u32 value; > > int err; > > > > - drm_vblank_pre_modeset(crtc->dev, dc->pipe); > > - >=20 > Should you replace this with a call to drm_crtc_vblank_off in > prepare()? AFAICT, crtc_funcs->disable() isn't guaranteed to be called > before modeset, and it's unclear to me whether the vblank counter will > be reset in prepare. Done. Thanks, Thierry --aT9PWwzfKXlsBJM1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUWN3XAAoJEN0jrNd/PrOhs+0P/iVEuu/a+KSbwI1G7MOHLnOc bruQlNjLKic8Q5MKJhfIZoFXxgis56a8UEamULfiECLviM2gk/6IDjSQlwKGZo37 Hk/tFaYnnDn1xf6Jtb8rlU9WKZkEg5NHVIGT7v7AfWBBg5ePgqz0vk+c+/aTtscI /DYC9CD7JRTYj7V2WOCO/29BH4CZ6s/E3Dj4zbL3Z3sD/T7IcRAWGkJIE1eCcQTA knen58szGjNdrDoJZSQG3mOAMBdykH21i+yqtKl/Qm4U2ttcl54Z9t8ifW0WVaNd easL0dBqwmurRcQUkkHJr0B0l3fgXO8ROD5fDJxzuzPsc3yEE5nZXxwRZjvc4/ET if7yzOlYMdytRR8TN3eDR2+BvBOmpmNmA7OArmZxuHBGTvloUOl1lRyJdblRchjH kkIFkMKtr552WqfUfbJZfqnIxfIrpTSM/MgNF/U2YZe9GbT2ShxFS2aW4drC/dvM RmmZXFly65HIFnkmZ91GH2fni3xxH54ArTbeNowE4hxQwfEN6wFtITkdtao7R6WK aMYoSV+DzPTv0rxc8VqW5tJkCXg4ZGCHD5curCCt2uwEztQbSvA0KYOuzNIJBIF7 KeFPukPfS0a7CwtEc6QfW+/aOMvy8psJeTb5wPXdTdIRzbEzHn2vdg5+/ytuMztE VT/tJsxose5d8PU5HFwB =/CWY -----END PGP SIGNATURE----- --aT9PWwzfKXlsBJM1-- --===============1675880384== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1675880384==--