From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 2/2] drm: s/int pipe/unsigned int pipe/ Date: Tue, 6 Oct 2015 11:36:39 +0200 Message-ID: <20151006093638.GB23335@ulmo.nvidia.com> References: <1443620809-28329-1-git-send-email-ville.syrjala@linux.intel.com> <1443620809-28329-2-git-send-email-ville.syrjala@linux.intel.com> <560E81A6.60803@st.com> <20151002131249.GO26517@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1009982225==" Return-path: Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2EA446EA88 for ; Tue, 6 Oct 2015 02:36:51 -0700 (PDT) In-Reply-To: <20151002131249.GO26517@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: Vincent ABRIOU , "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org --===============1009982225== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XOIedfhf+7KOe/yw" Content-Disposition: inline --XOIedfhf+7KOe/yw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 02, 2015 at 04:12:49PM +0300, Ville Syrj=C3=A4l=C3=A4 wrote: > On Fri, Oct 02, 2015 at 03:07:50PM +0200, Vincent ABRIOU wrote: > > Hi, > >=20 > > On 09/30/2015 03:46 PM, ville.syrjala@linux.intel.com wrote: > > > From: Ville Syrj=C3=A4l=C3=A4 > > > > > > Make the 'pipe' argument to drm_vblank_count() unsigned as it is > > > everwhere else. > > > > > > Cc: Vincent Abriou > > > Cc: Thierry Reding > > > Signed-off-by: Ville Syrj=C3=A4l=C3=A4 > > > --- > > > drivers/gpu/drm/drm_irq.c | 2 +- > > > include/drm/drmP.h | 2 +- > > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > > > index 7d70b7c..f24c57c 100644 > > > --- a/drivers/gpu/drm/drm_irq.c > > > +++ b/drivers/gpu/drm/drm_irq.c > > > @@ -876,7 +876,7 @@ drm_get_last_vbltimestamp(struct drm_device *dev,= unsigned int pipe, > > > * Returns: > > > * The software vblank counter. > > > */ > > > -u32 drm_vblank_count(struct drm_device *dev, int pipe) > > > +u32 drm_vblank_count(struct drm_device *dev, unsigned int pipe) > > > { > > > struct drm_vblank_crtc *vblank =3D &dev->vblank[pipe]; > > > > > > diff --git a/include/drm/drmP.h b/include/drm/drmP.h > > > index f563333..8df4de7 100644 > > > --- a/include/drm/drmP.h > > > +++ b/include/drm/drmP.h > > > @@ -928,7 +928,7 @@ extern int drm_irq_uninstall(struct drm_device *d= ev); > > > extern int drm_vblank_init(struct drm_device *dev, unsigned int num= _crtcs); > > > extern int drm_wait_vblank(struct drm_device *dev, void *data, > > > struct drm_file *filp); > > > -extern u32 drm_vblank_count(struct drm_device *dev, int pipe); > > > +extern u32 drm_vblank_count(struct drm_device *dev, unsigned int pip= e); > > > extern u32 drm_crtc_vblank_count(struct drm_crtc *crtc); > > > extern u32 drm_vblank_count_and_time(struct drm_device *dev, unsign= ed int pipe, > > > struct timeval *vblanktime); > > > > >=20 > >=20 > > If you update drm_vblank_count you also need to update=20 > > drm_vblank_no_hw_counter and need to change the u32=20 > > (*get_vblank_counter) prototype. >=20 > No. drm_vblank_count() !=3D .get_vblank_counter() >=20 > >=20 > > Thierry already done the job with "drm/irq: Use unsigned int pipe in=20 > > public API" patch >=20 > Yes I know. Except all the driver hooks still have signed ints. I looked > at changing that, and it looked like quite a bit of work, so probably > a job for coccinelle. I wonder if it has a way to figure out which > functions are plugged into these hooks and do the job entirely > automatically... Actually the above-mentioned patch updated drivers as well, otherwise there would've been tons of warnings from mismatched types. Thierry --XOIedfhf+7KOe/yw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWE5YmAAoJEN0jrNd/PrOhNoUP/ik9FYE4wVxxeyW98MEMKz5r IXLyuL64YdoTYp+Vrl5G4f9YCTsvYJQe8DYZ9FHJKfB8t6vkcFQdzhXWVM8hqq6z JdUh/OLaWl/Z648pY0QhENPflJOsEZTO4GvM11en55b0GFnFsenP5uDmntEzwpoU 89338JecJSXWnBn/2OlM+n2qoL7NPE8ec20u7iIutYzIgdtnDJU+kmO7w9tct3yC cUndFTjV+bmJ+TAl+u6tKWSbInehV3wEcqWL9cjJZj8Uw6pZX5DuP3CVaWmqOiDq 8B2camo3e1P++Gq6kAWSdv+9Y1CWaXqhfOjoojHvyZImEBZxW/6XcJxhe6y3sCaL Ms6eYmYMp+rH/JcJICzY4NnQX1ITCa6sjwts4jU9WmW6gmMAguVUhVwIvAkqXB1o 7K5HCBMDQBaIGf3+qpjBTf6VZUkzEhQ/iXAixxhPo2Q8v4TZ5V1y11HNHxKbvmOl Qs3o89A5EuiVlSrhecmtP8oC4k0ztp5lzx5yfYqvFa+AbeXSCrI7/xSovhGhahBC wKGzFCSiaC1Mt5PXJO70a5+GPVKM61MDbf5bVnZSlGJP0GbAHIrWxtmY8/eJugTW M3MMHXLR93T7r8AWUSvQUkyI7gMyobC3apfD1n7YpRZguyIpju2IUYJvdRMTy3ar mlLPyFnm6wcA8zWEipBA =K6eo -----END PGP SIGNATURE----- --XOIedfhf+7KOe/yw-- --===============1009982225== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1009982225==--