[Intel-gfx] [PATCH] drm/i915/icl: local_clock returns an u64

Michel Thierry michel.thierry at intel.com
Thu Mar 1 18:07:03 UTC 2018


So change timeout_ts and use time_after64 in gen11_gt_engine_intr.

Fixes: 51951ae7ed00 ("drm/i915/icl: Interrupt handling").
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com> (long time ago)
Signed-off-by: Michel Thierry <michel.thierry at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Oscar Mateo <oscar.mateo at intel.com>
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index eacb08034776..45f10db757e2 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2813,7 +2813,7 @@ gen11_gt_engine_intr(struct drm_i915_private * const i915,
 		     const unsigned int bank, const unsigned int bit)
 {
 	void __iomem * const regs = i915->regs;
-	u32 timeout_ts;
+	u64 timeout_ts;
 	u32 ident;
 
 	raw_reg_write(regs, GEN11_IIR_REG_SELECTOR(bank), BIT(bit));
@@ -2826,7 +2826,7 @@ gen11_gt_engine_intr(struct drm_i915_private * const i915,
 	do {
 		ident = raw_reg_read(regs, GEN11_INTR_IDENTITY_REG(bank));
 	} while (!(ident & GEN11_INTR_DATA_VALID) &&
-		 !time_after32(local_clock() >> 10, timeout_ts));
+		 !time_after64(local_clock() >> 10, timeout_ts));
 
 	if (unlikely(!(ident & GEN11_INTR_DATA_VALID))) {
 		DRM_ERROR("INTR_IDENTITY_REG%u:%u 0x%08x not valid!\n",
-- 
2.16.2



More information about the Intel-gfx mailing list