dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/8] drm/irq: Add drm_crtc_vblank_count()
Date: Tue, 16 Dec 2014 22:03:38 +0100	[thread overview]
Message-ID: <20141216210338.GC2711@phenom.ffwll.local> (raw)
In-Reply-To: <1418746515-24773-4-git-send-email-thierry.reding@gmail.com>

On Tue, Dec 16, 2014 at 05:15:10PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> This function is the KMS native variant of drm_vblank_count(). It takes
> a struct drm_crtc * instead of a struct drm_device * and an index of the
> CRTC.
> 
> 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.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

On the first 3 patches:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>


> ---
>  drivers/gpu/drm/drm_irq.c | 21 +++++++++++++++++++++
>  include/drm/drmP.h        |  1 +
>  2 files changed, 22 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index f7f1b579526e..75647e7f012b 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -830,6 +830,8 @@ drm_get_last_vbltimestamp(struct drm_device *dev, int crtc,
>   * vblank events since the system was booted, including lost events due to
>   * modesetting activity.
>   *
> + * This is the legacy version of drm_crtc_vblank_count().
> + *
>   * Returns:
>   * The software vblank counter.
>   */
> @@ -844,6 +846,25 @@ u32 drm_vblank_count(struct drm_device *dev, int crtc)
>  EXPORT_SYMBOL(drm_vblank_count);
>  
>  /**
> + * drm_crtc_vblank_count - retrieve "cooked" vblank counter value
> + * @crtc: which counter to retrieve
> + *
> + * Fetches the "cooked" vblank count value that represents the number of
> + * vblank events since the system was booted, including lost events due to
> + * modesetting activity.
> + *
> + * This is the native KMS version of drm_vblank_count().
> + *
> + * Returns:
> + * The software vblank counter.
> + */
> +u32 drm_crtc_vblank_count(struct drm_crtc *crtc)
> +{
> +	return drm_vblank_count(crtc->dev, drm_crtc_index(crtc));
> +}
> +EXPORT_SYMBOL(drm_crtc_vblank_count);
> +
> +/**
>   * drm_vblank_count_and_time - retrieve "cooked" vblank counter value
>   * and the system timestamp corresponding to that vblank counter value.
>   *
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index f1f7f15ce0f3..e1b2e8b98af7 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -901,6 +901,7 @@ extern int drm_vblank_init(struct drm_device *dev, 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 crtc);
> +extern u32 drm_crtc_vblank_count(struct drm_crtc *crtc);
>  extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc,
>  				     struct timeval *vblanktime);
>  extern void drm_send_vblank_event(struct drm_device *dev, int crtc,
> -- 
> 2.1.3
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-12-16 21:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 16:15 [PATCH 0/8] drm/tegra: Fixes for v3.19-rc1 Thierry Reding
2014-12-16 16:15 ` [PATCH 1/8] drm/irq: Add drm_crtc_send_vblank_event() Thierry Reding
2014-12-16 16:15 ` [PATCH 2/8] drm/irq: Add drm_crtc_handle_vblank() Thierry Reding
2014-12-16 16:15 ` [PATCH 3/8] drm/irq: Add drm_crtc_vblank_count() Thierry Reding
2014-12-16 21:03   ` Daniel Vetter [this message]
2014-12-16 16:15 ` [PATCH 4/8] drm/tegra: dc: Consistently use the same pipe Thierry Reding
2014-12-16 16:15 ` [PATCH 5/8] drm/tegra: dc: Fix a potential race on page-flip completion Thierry Reding
2014-12-18 13:45   ` Alexandre Courbot
2014-12-16 16:15 ` [PATCH 6/8] drm/cache: Implement drm_clflush_*() for ARM Thierry Reding
2014-12-16 16:15 ` [PATCH 7/8] drm/tegra: gem: Flush buffer objects upon allocation Thierry Reding
2014-12-16 16:15 ` [PATCH 8/8] drm/tegra: gem: Use the proper size for GEM objects Thierry Reding
2014-12-16 18:38 ` [PATCH 0/8] drm/tegra: Fixes for v3.19-rc1 Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141216210338.GC2711@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gnurou@gmail.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox