Commit 43b5d81e authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by Rodrigo Vivi

drm/xe: fix mcr semaphore locking for MTL

in commit 81593af6 ("drm/xe: Convert xe_mmio_wait32 to us so we can
stop using wait_for_us.") the mcr semaphore register read was
accidentally switched from waiting for the register to go to 1 to
waiting for the register to go to 0, so we need to flip it back.
Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 0e34fdb4
...@@ -420,10 +420,11 @@ static void mcr_lock(struct xe_gt *gt) ...@@ -420,10 +420,11 @@ static void mcr_lock(struct xe_gt *gt)
/* /*
* Starting with MTL we also need to grab a semaphore register * Starting with MTL we also need to grab a semaphore register
* to synchronize with external agents (e.g., firmware) that now * to synchronize with external agents (e.g., firmware) that now
* shares the same steering control register. * shares the same steering control register. The semaphore is obtained
* when a read to the relevant register returns 1.
*/ */
if (GRAPHICS_VERx100(xe) >= 1270) if (GRAPHICS_VERx100(xe) >= 1270)
ret = xe_mmio_wait32(gt, STEER_SEMAPHORE, 0, 0x1, 10, NULL, ret = xe_mmio_wait32(gt, STEER_SEMAPHORE, 0x1, 0x1, 10, NULL,
true); true);
drm_WARN_ON_ONCE(&xe->drm, ret == -ETIMEDOUT); drm_WARN_ON_ONCE(&xe->drm, ret == -ETIMEDOUT);
...@@ -431,7 +432,7 @@ static void mcr_lock(struct xe_gt *gt) ...@@ -431,7 +432,7 @@ static void mcr_lock(struct xe_gt *gt)
static void mcr_unlock(struct xe_gt *gt) static void mcr_unlock(struct xe_gt *gt)
{ {
/* Release hardware semaphore */ /* Release hardware semaphore - this is done by writing 1 to the register */
if (GRAPHICS_VERx100(gt_to_xe(gt)) >= 1270) if (GRAPHICS_VERx100(gt_to_xe(gt)) >= 1270)
xe_mmio_write32(gt, STEER_SEMAPHORE, 0x1); xe_mmio_write32(gt, STEER_SEMAPHORE, 0x1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment