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.velikov@collabora.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 v6 4/4] drm/i915: Put "cooked" vlank counters in frame CRC lines Date: Wed, 7 Sep 2016 12:27:36 +0200 [thread overview] Message-ID: <1473244056-10157-5-git-send-email-tomeu.vizoso@collabora.com> (raw) In-Reply-To: <1473244056-10157-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> --- 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 413667497ce0..32a5f4634d6d 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1489,7 +1489,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) { @@ -1545,8 +1544,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
WARNING: multiple messages have this Message-ID (diff)
From: Tomeu Vizoso <tomeu.vizoso@collabora.com> To: linux-kernel@vger.kernel.org Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Daniel Vetter <daniel.vetter@intel.com>, Emil Velikov <emil.velikov@collabora.com> Subject: [PATCH v6 4/4] drm/i915: Put "cooked" vlank counters in frame CRC lines Date: Wed, 7 Sep 2016 12:27:36 +0200 [thread overview] Message-ID: <1473244056-10157-5-git-send-email-tomeu.vizoso@collabora.com> (raw) In-Reply-To: <1473244056-10157-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> --- 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 413667497ce0..32a5f4634d6d 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1489,7 +1489,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) { @@ -1545,8 +1544,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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-09-07 10:29 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-07 10:27 [PATCH v6 0/4] New debugfs API for capturing CRC of frames Tomeu Vizoso 2016-09-07 10:27 ` Tomeu Vizoso 2016-09-07 10:27 ` [PATCH v6 1/4] drm/i915/debugfs: Move out pipe CRC code Tomeu Vizoso 2016-09-07 10:27 ` Tomeu Vizoso 2016-09-07 10:27 ` [PATCH v6 2/4] drm: Add API for capturing frame CRCs Tomeu Vizoso 2016-09-07 10:27 ` Tomeu Vizoso 2016-09-08 13:24 ` Emil Velikov 2016-09-08 13:24 ` Emil Velikov 2016-09-08 14:49 ` Tomeu Vizoso 2016-09-08 14:49 ` Tomeu Vizoso 2016-09-08 15:08 ` Emil Velikov 2016-09-08 15:08 ` Emil Velikov 2016-09-07 10:27 ` [PATCH v6 3/4] drm/i915: Use new CRC debugfs API Tomeu Vizoso 2016-09-07 10:27 ` Tomeu Vizoso 2016-09-08 13:35 ` [Intel-gfx] " Emil Velikov 2016-09-08 13:35 ` Emil Velikov 2016-09-08 14:47 ` Tomeu Vizoso 2016-09-07 10:27 ` Tomeu Vizoso [this message] 2016-09-07 10:27 ` [PATCH v6 4/4] drm/i915: Put "cooked" vlank counters in frame CRC lines Tomeu Vizoso 2016-09-08 13:38 ` [Intel-gfx] [PATCH v6 0/4] New debugfs API for capturing CRC of frames Emil Velikov
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=1473244056-10157-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.velikov@collabora.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.