lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170102125912.22305-5-tomeu.vizoso@collabora.com>
Date:   Mon,  2 Jan 2017 13:59:12 +0100
From:   Tomeu Vizoso <tomeu.vizoso@...labora.com>
To:     linux-kernel@...r.kernel.org
Cc:     Ville Syrjälä 
        <ville.syrjala@...ux.intel.com>, Sean Paul <seanpaul@...omium.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Emil Velikov <emil.l.velikov@...il.com>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Tomeu Vizoso <tomeu.vizoso@...labora.com>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        David Airlie <airlied@...ux.ie>
Subject: [PATCH v14 4/4] drm/i915: Put "cooked" vlank counters in frame CRC lines

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@...labora.com>
Reviewed-by: Emil Velikov <emil.velikov@...labora.com>
Reviewed-by: Robert Foss <robert.foss@...labora.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 24b7620c1005..c0e3d1c1b4f0 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1557,7 +1557,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) {
@@ -1612,8 +1611,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->base, true, frame, crcs);
+		ret = drm_crtc_add_crc_entry(&crtc->base, true,
+					     drm_accurate_vblank_count(&crtc->base),
+					     crcs);
 		if (!ret)
 			wake_up_interruptible(&crtc->base.crc.wq);
 	}
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ