From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Skeggs Subject: Re: [PATCH] drm/nouveau: Use drm_crtc_vblank_off/on Date: Wed, 16 Nov 2016 17:39:31 +1000 Message-ID: <3398ddae-a78f-309c-b115-41807e0a31c3@gmail.com> References: <20161114090255.31595-2-daniel.vetter@ffwll.ch> <20161114114101.21731-1-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0715626092==" Return-path: Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 938916E18E for ; Wed, 16 Nov 2016 07:39:37 +0000 (UTC) Received: by mail-pg0-x243.google.com with SMTP id 3so13990112pgd.0 for ; Tue, 15 Nov 2016 23:39:37 -0800 (PST) Received: from [192.168.0.117] (182-239-210-228.ip.adam.com.au. [182.239.210.228]) by smtp.gmail.com with ESMTPSA id n2sm2410484pfa.75.2016.11.15.23.39.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Nov 2016 23:39:36 -0800 (PST) In-Reply-To: <20161114114101.21731-1-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0715626092== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lh7C1QvFFgAhJl45VG7o9dQdu3UN2l93s" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lh7C1QvFFgAhJl45VG7o9dQdu3UN2l93s Content-Type: multipart/mixed; boundary="DS5S7kXVXWvg1D7ecQUp6mw3SdKAShh9t" From: Ben Skeggs To: dri-devel@lists.freedesktop.org Message-ID: <3398ddae-a78f-309c-b115-41807e0a31c3@gmail.com> Subject: Re: [PATCH] drm/nouveau: Use drm_crtc_vblank_off/on References: <20161114090255.31595-2-daniel.vetter@ffwll.ch> <20161114114101.21731-1-daniel.vetter@ffwll.ch> In-Reply-To: <20161114114101.21731-1-daniel.vetter@ffwll.ch> --DS5S7kXVXWvg1D7ecQUp6mw3SdKAShh9t Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/14/2016 09:41 PM, Daniel Vetter wrote: > With atomic nv50+ is already converted over to them, but the old > display code is still using it. Found in a 2 year old patch I have > lying around to un-export these old helpers! >=20 > v2: Drop the hand-rolled versions from resume/suspend code. Now that > crtc callbacks do this, we don't need a special case for s/r anymore. >=20 > v3: Remove unused variables. >=20 > Cc: Mario Kleiner > Cc: Ben Skeggs > Signed-off-by: Daniel Vetter Reviewed-by: Ben Skeggs > --- > drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++-- > drivers/gpu/drm/nouveau/nouveau_display.c | 11 +---------- > 2 files changed, 3 insertions(+), 12 deletions(-) >=20 > diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/= nouveau/dispnv04/crtc.c > index 0cb7a18cde26..59d1d1c5de5f 100644 > --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c > +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c > @@ -702,7 +702,7 @@ static void nv_crtc_prepare(struct drm_crtc *crtc) > if (nv_two_heads(dev)) > NVSetOwner(dev, nv_crtc->index); > =20 > - drm_vblank_pre_modeset(dev, nv_crtc->index); > + drm_crtc_vblank_off(crtc); > funcs->dpms(crtc, DRM_MODE_DPMS_OFF); > =20 > NVBlankScreen(dev, nv_crtc->index, true); > @@ -734,7 +734,7 @@ static void nv_crtc_commit(struct drm_crtc *crtc) > #endif > =20 > funcs->dpms(crtc, DRM_MODE_DPMS_ON); > - drm_vblank_post_modeset(dev, nv_crtc->index); > + drm_crtc_vblank_on(crtc); > } > =20 > static void nv_crtc_destroy(struct drm_crtc *crtc) > diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/dr= m/nouveau/nouveau_display.c > index 75c90a8da18a..76c342bf047b 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_display.c > +++ b/drivers/gpu/drm/nouveau/nouveau_display.c > @@ -380,15 +380,10 @@ nouveau_display_fini(struct drm_device *dev, bool= suspend) > struct nouveau_display *disp =3D nouveau_display(dev); > struct nouveau_drm *drm =3D nouveau_drm(dev); > struct drm_connector *connector; > - int head; > =20 > if (!suspend) > drm_crtc_force_disable_all(dev); > =20 > - /* Make sure that drm and hw vblank irqs get properly disabled. */ > - for (head =3D 0; head < dev->mode_config.num_crtc; head++) > - drm_vblank_off(dev, head); > - > /* disable flip completion events */ > nvif_notify_put(&drm->flip); > =20 > @@ -723,7 +718,7 @@ nouveau_display_resume(struct drm_device *dev, bool= runtime) > struct nouveau_display *disp =3D nouveau_display(dev); > struct nouveau_drm *drm =3D nouveau_drm(dev); > struct drm_crtc *crtc; > - int ret, head; > + int ret; > =20 > if (dev->mode_config.funcs->atomic_commit) { > nouveau_display_init(dev); > @@ -777,10 +772,6 @@ nouveau_display_resume(struct drm_device *dev, boo= l runtime) > =20 > drm_helper_resume_force_mode(dev); > =20 > - /* Make sure that drm and hw vblank irqs get resumed if needed. */ > - for (head =3D 0; head < dev->mode_config.num_crtc; head++) > - drm_vblank_on(dev, head); > - > list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { > struct nouveau_crtc *nv_crtc =3D nouveau_crtc(crtc); > =20 >=20 --DS5S7kXVXWvg1D7ecQUp6mw3SdKAShh9t-- --lh7C1QvFFgAhJl45VG7o9dQdu3UN2l93s Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYLA0zAAoJEHYLnGJQkpH7K/YQALc02SNCaYIgnSKiNzZT/8Cb IkYevUeMUy/kcx9oARxdOTVBEG8p2s9c82Wtec8IXwuLtRiJvsqHEbtmxfHJKrAf Gj2+XPAz+UTwr6WI0CiI0QK3zlzk9lQWtN8biTyt/fCtBch9yCcYu5IqjwuA7deS yc2QMMaqcYENpqRGWXC2rvHE3riNFeMyCPXWQ1HA88nJ1hMTHqHhQ165P9hG3oYb EBsrTQ60y1sF7ownGepQXRPCQlNYYFDoC7nSLCH/a/HCMgVCf23C9v5qsetk6shx QIKZ0LuiyPRB0I7PfJCJl0sZoWOec1gsI40bD6YWgiMVuwmh8g2T2/ero039NgYa NcLMKfGi6ssS+zChSIvOPHyNjznxBZKiTnVdGPl/UDXqqwYbrhDWPgw0/ZI5k3TA 8LNFjnwBE/90l7G/RvmNeOjq1hugCZp62ME23KdF1HFLStfm0T0Yt96o0WihJc1N WJmjCYd/jj6hBiC4jy/5F2iQALxbHsmZYTBhSRRpB30I54Q1dDWO50TT3Jzze4h9 oJBb49e9Lvg/FeHBOawIyi0P74OOUseaLno+/mizZdNWHm2jJR3yDhVIXlleB7XY vjdkko+EkxJEirmmEzTTMHiWiWPbObumPxVtRRyKijf6O0VBny6gptvGW1d2AbDN 13Ws7H//BVWUFpa6E2oQ =bnJB -----END PGP SIGNATURE----- --lh7C1QvFFgAhJl45VG7o9dQdu3UN2l93s-- --===============0715626092== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0715626092==--