diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-07-26 23:03:52 +0200 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 17:39:15 +0100 |
commit | 063e09af6e1d9a4f26cdd0eb896c19526cb0afd3 (patch) | |
tree | 45f5d92bd4ef69d512ce6d6fef66f5f608f6015f /drivers/gpu/drm/xe/xe_force_wake.c | |
parent | drm/xe: Fix an invalid locking wait context bug (diff) | |
download | linux-063e09af6e1d9a4f26cdd0eb896c19526cb0afd3.tar.xz linux-063e09af6e1d9a4f26cdd0eb896c19526cb0afd3.zip |
drm/xe: Invert mask and val in xe_mmio_wait32.
The order: 'offset, mask, val'; is more common in other
drivers and in special in i915, where any dev could copy
a sequence and end up with unexpected behavior.
Done with coccinelle:
@rule1@
expression gt, reg, val, mask, timeout, out, atomic;
@@
- xe_mmio_wait32(gt, reg, val, mask, timeout, out, atomic)
+ xe_mmio_wait32(gt, reg, mask, val, timeout, out, atomic)
spatch -sp_file mmio.cocci *.c *.h compat-i915-headers/intel_uncore.h \
--in-place
v2: Rebased after changes on xe_guc_mcr usage of xe_mmio_wait32.
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_force_wake.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_force_wake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_force_wake.c b/drivers/gpu/drm/xe/xe_force_wake.c index 7403673d532d..aba0784b608e 100644 --- a/drivers/gpu/drm/xe/xe_force_wake.c +++ b/drivers/gpu/drm/xe/xe_force_wake.c @@ -120,7 +120,7 @@ static void domain_sleep(struct xe_gt *gt, struct xe_force_wake_domain *domain) static int domain_sleep_wait(struct xe_gt *gt, struct xe_force_wake_domain *domain) { - return xe_mmio_wait32(gt, domain->reg_ack, 0, domain->val, + return xe_mmio_wait32(gt, domain->reg_ack, domain->val, 0, XE_FORCE_WAKE_ACK_TIMEOUT_MS * USEC_PER_MSEC, NULL, false); } |