From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Sean Paul" <seanpaul@chromium.org>,
"Daniel Vetter" <daniel.vetter@intel.com>,
"Emil Velikov" <emil.l.velikov@gmail.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Tomeu Vizoso" <tomeu.vizoso@collabora.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
"David Airlie" <airlied@linux.ie>
Subject: [PATCH v11 4/4] drm/i915: Put "cooked" vlank counters in frame CRC lines
Date: Thu, 6 Oct 2016 17:21:08 +0200 [thread overview]
Message-ID: <1475767268-14379-5-git-send-email-tomeu.vizoso@collabora.com> (raw)
In-Reply-To: <1475767268-14379-1-git-send-email-tomeu.vizoso@collabora.com>
Use drm_accurate_vblank_count so we have the full 32 bit to represent
the frame counter and userspace has a simpler way of knowing when the
counter wraps around.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
---
drivers/gpu/drm/i915/i915_irq.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 1549cc4f88ec..238a353454e9 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1495,7 +1495,6 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
struct drm_driver *driver = dev_priv->drm.driver;
uint32_t crcs[5];
int head, tail, ret;
- u32 frame;
spin_lock(&pipe_crc->lock);
if (pipe_crc->source) {
@@ -1551,8 +1550,9 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
crcs[2] = crc2;
crcs[3] = crc3;
crcs[4] = crc4;
- frame = driver->get_vblank_counter(&dev_priv->drm, pipe);
- ret = drm_crtc_add_crc_entry(crtc, true, frame, crcs);
+ ret = drm_crtc_add_crc_entry(crtc, true,
+ drm_accurate_vblank_count(crtc),
+ crcs);
spin_unlock(&crtc->crc.lock);
if (!ret)
wake_up_interruptible(&crtc->crc.wq);
--
2.7.4
prev parent reply other threads:[~2016-10-06 15:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 15:21 [PATCH v11 0/4] New debugfs API for capturing CRC of frames Tomeu Vizoso
2016-10-06 15:21 ` [PATCH v11 1/4] drm/i915/debugfs: Move out pipe CRC code Tomeu Vizoso
2016-10-06 15:21 ` [PATCH v11 2/4] drm: Add API for capturing frame CRCs Tomeu Vizoso
2016-10-10 11:28 ` Tomeu Vizoso
2016-10-10 13:12 ` Emil Velikov
2016-10-11 10:12 ` Benjamin Gaignard
2016-10-17 14:47 ` Daniel Vetter
2016-10-06 15:21 ` [PATCH v11 3/4] drm/i915: Use new CRC debugfs API Tomeu Vizoso
2016-11-14 10:44 ` Jani Nikula
2016-11-15 7:16 ` [Intel-gfx] " David Weinehall
2016-11-15 8:27 ` Jani Nikula
2016-11-16 12:24 ` Tomeu Vizoso
2016-11-16 12:58 ` Jani Nikula
2016-11-16 14:04 ` Tomeu Vizoso
2016-11-16 14:08 ` Jani Nikula
2016-11-16 14:13 ` Daniel Vetter
2016-10-06 15:21 ` Tomeu Vizoso [this message]
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=1475767268-14379-5-git-send-email-tomeu.vizoso@collabora.com \
--to=tomeu.vizoso@collabora.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seanpaul@chromium.org \
--cc=thierry.reding@gmail.com \
--cc=ville.syrjala@linux.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;
as well as URLs for NNTP newsgroup(s).