From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: "Keith Packard" <keithp@keithp.com>,
"Michel Dänzer" <michel@daenzer.net>,
dri-devel@lists.freedesktop.org,
"Dhinakaran Pandiyan" <dhinakaran.pandiyan@intel.com>,
rodrigo.vivi@intel.com
Subject: [PATCH 2/5] drm/vblank: Fix data type width for drm_crtc_arm_vblank_event()
Date: Fri, 12 Jan 2018 13:57:04 -0800 [thread overview]
Message-ID: <20180112215707.3084-2-dhinakaran.pandiyan@intel.com> (raw)
In-Reply-To: <20180112215707.3084-1-dhinakaran.pandiyan@intel.com>
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.
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-01-12 21:57 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 ` Dhinakaran Pandiyan [this message]
2018-01-19 7:39 ` [PATCH 2/5] drm/vblank: Fix data type width for drm_crtc_arm_vblank_event() Rodrigo Vivi
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=20180112215707.3084-2-dhinakaran.pandiyan@intel.com \
--to=dhinakaran.pandiyan@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=keithp@keithp.com \
--cc=michel@daenzer.net \
--cc=rodrigo.vivi@intel.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