From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 10/13] drm/irq: Add drm_crtc_vblank_count_and_time() Date: Thu, 13 Aug 2015 11:12:37 +0200 Message-ID: <20150813091235.GA21842@ulmo> References: <1439391635-29166-1-git-send-email-thierry.reding@gmail.com> <1439391635-29166-10-git-send-email-thierry.reding@gmail.com> <20150812153508.GM17734@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1434592345==" Return-path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by gabe.freedesktop.org (Postfix) with ESMTPS id F40C26E067 for ; Thu, 13 Aug 2015 02:13:32 -0700 (PDT) Received: by wicne3 with SMTP id ne3so250714402wic.1 for ; Thu, 13 Aug 2015 02:13:31 -0700 (PDT) In-Reply-To: <20150812153508.GM17734@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Daniel Vetter , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1434592345== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 12, 2015 at 05:35:08PM +0200, Daniel Vetter wrote: > On Wed, Aug 12, 2015 at 05:00:32PM +0200, Thierry Reding wrote: > > From: Thierry Reding > >=20 > > This function is the KMS native variant of drm_vblank_count_and_time(). > > It takes a struct drm_crtc * instead of a struct drm_device * and an > > index of the CRTC. > >=20 > > Eventually the goal is to access vblank data through the CRTC only so > > that the per-CRTC data can be moved to struct drm_crtc. > >=20 > > Signed-off-by: Thierry Reding >=20 > We seem to not use this anywhere outside for drm_irq.c, so maybe just drop > the kerneldoc and EXPORT_SYMBOL? The actual comment starting with "Fecthes > the "cooked" vblank ..." should imo be kept. There don't seem to be any users of this, so I guess we can ignore this for now. Thierry > > --- > > drivers/gpu/drm/drm_irq.c | 23 +++++++++++++++++++++++ > > include/drm/drmP.h | 2 ++ > > 2 files changed, 25 insertions(+) > >=20 > > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > > index f42459b2862d..904914d8f1f1 100644 > > --- a/drivers/gpu/drm/drm_irq.c > > +++ b/drivers/gpu/drm/drm_irq.c > > @@ -913,6 +913,8 @@ EXPORT_SYMBOL(drm_crtc_vblank_count); > > * vblank events since the system was booted, including lost events du= e to > > * modesetting activity. Returns corresponding system timestamp of the= time > > * of the vblank interval that corresponds to the current vblank count= er value. > > + * > > + * This is the legacy version of drm_crtc_vblank_count_and_time(). > > */ > > u32 drm_vblank_count_and_time(struct drm_device *dev, unsigned int pip= e, > > struct timeval *vblanktime) > > @@ -939,6 +941,27 @@ u32 drm_vblank_count_and_time(struct drm_device *d= ev, unsigned int pipe, > > } > > EXPORT_SYMBOL(drm_vblank_count_and_time); > > =20 > > +/** > > + * drm_crtc_vblank_count_and_time - retrieve "cooked" vblank counter v= alue > > + * and the system timestamp corresponding to that vblank counter v= alue > > + * @crtc: which counter to retrieve > > + * @vblanktime: Pointer to struct timeval to receive the vblank timest= amp. > > + * > > + * Fetches the "cooked" vblank count value that represents the number = of > > + * vblank events since the system was booted, including lost events du= e to > > + * modesetting activity. Returns corresponding system timestamp of the= time > > + * of the vblank interval that corresponds to the current vblank count= er value. > > + * > > + * This is the native KMS version of drm_vblank_count_and_time(). > > + */ > > +u32 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc, > > + struct timeval *vblanktime) > > +{ > > + return drm_vblank_count_and_time(crtc->dev, drm_crtc_index(crtc), > > + vblanktime); > > +} > > +EXPORT_SYMBOL(drm_crtc_vblank_count_and_time); > > + > > static void send_vblank_event(struct drm_device *dev, > > struct drm_pending_vblank_event *e, > > unsigned long seq, struct timeval *now) > > diff --git a/include/drm/drmP.h b/include/drm/drmP.h > > index 020afa343dff..7cd480614035 100644 > > --- a/include/drm/drmP.h > > +++ b/include/drm/drmP.h > > @@ -927,6 +927,8 @@ extern u32 drm_vblank_count(struct drm_device *dev,= int pipe); > > extern u32 drm_crtc_vblank_count(struct drm_crtc *crtc); > > extern u32 drm_vblank_count_and_time(struct drm_device *dev, unsigned = int pipe, > > struct timeval *vblanktime); > > +extern u32 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc, > > + struct timeval *vblanktime); > > extern void drm_send_vblank_event(struct drm_device *dev, unsigned int= pipe, > > struct drm_pending_vblank_event *e); > > extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc, > > --=20 > > 2.4.5 > >=20 >=20 > --=20 > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVzF+DAAoJEN0jrNd/PrOhHKgP/iMGLA5WMyFfTV0bV1TvlJB9 0evf4e5Y+4Y1PsZ5l2mDDOFaafGQZnuoW8TT2mUpg9fAlVcElINkdjzJWWLAK3rt 9Uds5ZBPW0cbnMKR/BzGCFQM6P2FJ68jl2QEmj4q3aH8Hsm6/6isS7fUE9IEO4SS 4yNJjVa+r5kSjffXo8i5L7bU4uYlGAoPOlsc6ZwSJ0IIATtzxF/CnB7fw8GIGGRT uWWMOn82oXs24udxAlzXBMyjdrnQtQBVxc9KRTzR7yY1HkJYnYEXJ+sgQDYwIFpN M33wicyk1svm0EdQWmU5KLfvK7uIxw0Bc3R1ZTyWxR1JmfxhO6tQqXhlBqHRHXfY NV1iHH5b4a0nJk8ZZmYMmDaisKFYLTA8Rv3SGhDYl/1vd/adYBRzdPZbnDf5vWi9 Et1ZLg9BF6Uap8RM6cW6SYdvKfNqImUz4/1su1mRtEFtTuHckzHNEqqFPT+3Z9nC kI7NtgbZdNIpWAR2FP1GTBU8j/QOCmcNY/G4RqfwBMP1YzNJjcAtOYP9x6tJ54/A H6x0k2xPzLZEIcxa1bqkwD3uOd7h/v/0MOtWJ31fVnU3Lmk8NLsuP54W85n0+K39 bCZwy0xN2eBGz+RDrIXk74lHYxtnzFuHaPG/8Crl8kz6VGpWYs5E0jWIbXQp/Qyz xn8NWMaHvkC9S+mPsBUJ =7LRS -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb-- --===============1434592345== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1434592345==--