dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: "Michel Dänzer" <michel@daenzer.net>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/vblank: Fix data type width for drm_crtc_arm_vblank_event()
Date: Thu, 18 Jan 2018 23:39:11 -0800	[thread overview]
Message-ID: <20180119073911.7wnomo3jepwtv2xi@intel.com> (raw)
In-Reply-To: <20180112215707.3084-2-dhinakaran.pandiyan@intel.com>

On Fri, Jan 12, 2018 at 09:57:04PM +0000, Dhinakaran Pandiyan wrote:
> Now that drm_vblank_count() returns all bits of the vblank count, update
> drm_crtc_arm_vblank_event() so that it queues the correct sequence.
> Otherwise, this leads to prolonged waits for a vblank sequence when the
> current count is >=2^32.

This could be probably squashed to the previous patch...
Specially if you apply the Fixes tag.

Anyways, in case you decide to go with 2 patches:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Cc: Keith Packard <keithp@keithp.com>
> Cc: Michel Dänzer <michel@daenzer.net>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/drm_vblank.c | 4 ++--
>  include/drm/drm_vblank.h     | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 768a8e44d99b..f2bf1f5dbaa5 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -292,11 +292,11 @@ static u64 drm_vblank_count(struct drm_device *dev, unsigned int pipe)
>   * This is mostly useful for hardware that can obtain the scanout position, but
>   * doesn't have a hardware frame counter.
>   */
> -u32 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc)
> +u64 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc)
>  {
>  	struct drm_device *dev = crtc->dev;
>  	unsigned int pipe = drm_crtc_index(crtc);
> -	u32 vblank;
> +	u64 vblank;
>  	unsigned long flags;
>  
>  	WARN_ONCE(drm_debug & DRM_UT_VBL && !dev->driver->get_vblank_timestamp,
> diff --git a/include/drm/drm_vblank.h b/include/drm/drm_vblank.h
> index 848b463a0af5..a4c3b0a0a197 100644
> --- a/include/drm/drm_vblank.h
> +++ b/include/drm/drm_vblank.h
> @@ -179,7 +179,7 @@ void drm_crtc_wait_one_vblank(struct drm_crtc *crtc);
>  void drm_crtc_vblank_off(struct drm_crtc *crtc);
>  void drm_crtc_vblank_reset(struct drm_crtc *crtc);
>  void drm_crtc_vblank_on(struct drm_crtc *crtc);
> -u32 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc);
> +u64 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc);
>  
>  bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
>  					   unsigned int pipe, int *max_error,
> -- 
> 2.11.0
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-01-19  7:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 21:57 [PATCH 1/5] drm/vblank: Fix return type for drm_vblank_count() Dhinakaran Pandiyan
2018-01-12 21:57 ` [PATCH 2/5] drm/vblank: Fix data type width for drm_crtc_arm_vblank_event() Dhinakaran Pandiyan
2018-01-19  7:39   ` Rodrigo Vivi [this message]
2018-01-31  6:49   ` Keith Packard
2018-01-12 21:57 ` [PATCH 3/5] drm/vblank: Do not update vblank count if interrupts are already disabled Dhinakaran Pandiyan
2018-01-19  7:47   ` Rodrigo Vivi
2018-01-12 21:57 ` [PATCH 4/5] drm/vblank: Restoring vblank counts after device PM events Dhinakaran Pandiyan
2018-01-19  8:01   ` Rodrigo Vivi
2018-01-19 22:02     ` Pandiyan, Dhinakaran
2018-01-19 22:44       ` [Intel-gfx] " Rodrigo Vivi
2018-01-12 21:57 ` [PATCH 5/5] drm/i915: Estimate and update missed vblanks Dhinakaran Pandiyan
2018-01-15  9:45   ` Daniel Vetter
2018-01-19  7:26   ` Rodrigo Vivi
2018-01-19 21:42     ` [Intel-gfx] " Pandiyan, Dhinakaran
2018-01-19 22:45       ` Rodrigo Vivi
2018-01-15  9:38 ` [PATCH 1/5] drm/vblank: Fix return type for drm_vblank_count() Daniel Vetter
2018-01-16 21:26   ` [Intel-gfx] " Pandiyan, Dhinakaran
2018-01-19  4:53 ` Pandiyan, Dhinakaran
2018-01-19  8:03   ` Rodrigo Vivi
2018-01-19  7:36 ` Rodrigo Vivi
2018-01-19 21:30   ` Pandiyan, Dhinakaran
2018-01-31  6:42 ` Keith Packard

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=20180119073911.7wnomo3jepwtv2xi@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    /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