[ILK] No reclocking on Ironlake
System architecture: x86_64 Kernel version: 6.1.0 + 6.0.x Linux distribution: Arch Machine: dell e4310
GPU doesn't reclock. Reclocking fails in __gen5_rps_set
messaging "gpu busy, RCS change rejected"
.
intel_ips module was always disabled during tests - it yields garbage values for the power consumption of the gpu on my system and prevents reclocking.
cat /sys/kernel/debug/dri/0/i915_frequency_info
and glmark2 was used to check reclocking.
The second chunk in the following patch fixes reclocking on my system. The first chunk seems to be the right way to initialize efficient_freq.
index 7bb967034..d5123b7a7 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -299,9 +299,9 @@ static void gen5_rps_init(struct intel_rps *rps)
drm_dbg(&i915->drm, "fmax: %d, fmin: %d, fstart: %d\n",
fmax, fmin, fstart);
- rps->min_freq = fmax;
- rps->efficient_freq = fstart;
- rps->max_freq = fmin;
+ rps->min_freq = fmax;
+ rps->efficient_freq = fmin - fstart;
+ rps->max_freq = fmin;
}
static unsigned long
@@ -447,6 +477,10 @@ static int __gen5_rps_set(struct intel_rps *rps, u8 val)
rgvswctl |= MEMCTL_CMD_STS;
intel_uncore_write16(uncore, MEMSWCTL, rgvswctl);
+ if (wait_for_atomic((intel_uncore_read16(uncore, MEMSWCTL) &
+ MEMCTL_CMD_STS) == 0, 10))
+ printk("stuck trying to change perf mode\n");
+
return 0;
}