@@ -107,7 +107,15 @@ int live_rc6_manual(void *arg)
ktime_to_ns(dt));
pr_info("GPU consumed %llduW in RC0 and %llduW in RC6\n",
rc0_power, rc6_power);
- if (2 * rc6_power > rc0_power) {
+
+ /*
+ * Condition valid for integrated graphics
+ * On discrete graphics, hwmon reads the energy/power from
+ * discrete soc that includes non-gfx components.
+ * TODO : Measure power of GT for discrete graphics and
+ * modify the condition
+ */
+ if (!IS_DGFX(gt->i915) && (2 * rc6_power > rc0_power)) {
pr_err("GPU leaked energy while in RC6!\n");
err = -EINVAL;
goto out_unlock;