*/
static bool ips_gpu_busy(struct ips_driver *ips)
{
- return false;
+ if (!ips->gpu_turbo_enabled)
+ return false;
+
+ return ips->gpu_busy();
}
/**
avg = cpu ? ips->ctv2_avg_temp : ips->ctv1_avg_temp;
if (avg > (ips->limits->core_temp_limit * 100))
ret = true;
- if (ips->cpu_avg_power > ips->core_power_limit)
+ if (ips->cpu_avg_power > ips->core_power_limit * 100)
ret = true;
spin_unlock_irqrestore(&ips->turbo_status_lock, flags);
spin_lock_irqsave(&ips->turbo_status_lock, flags);
if (ips->mch_avg_temp > (ips->limits->mch_temp_limit * 100))
ret = true;
+ if (ips->mch_avg_power > ips->mch_power_limit)
+ ret = true;
spin_unlock_irqrestore(&ips->turbo_status_lock, flags);
return ret;
ips_disable_gpu_turbo(ips);
/* We're outside our comfort zone, crank them down */
- if (!mcp_exceeded(ips)) {
+ if (mcp_exceeded(ips)) {
ips_cpu_lower(ips);
ips_gpu_lower(ips);
goto sleep;
ret = ((val * slope + 0x40) >> 7) + offset;
-
- return ret;
+ return 0; /* MCH temp reporting buggy */
}
static u16 read_ptv(struct ips_driver *ips)
if (trc & TRC_CORE2_EN)
ips->second_cpu = true;
- if (!ips_get_i915_syms(ips)) {
- dev_err(&dev->dev, "failed to get i915 symbols, graphics turbo disabled\n");
- ips->gpu_turbo_enabled = false;
- } else {
- dev_dbg(&dev->dev, "graphics turbo enabled\n");
- ips->gpu_turbo_enabled = true;
- }
-
update_turbo_limits(ips);
dev_dbg(&dev->dev, "max cpu power clamp: %dW\n",
ips->mcp_power_limit / 10);
if (thm_readl(THM_PSC) & PSP_PBRT)
ips->poll_turbo_status = true;
+ if (!ips_get_i915_syms(ips)) {
+ dev_err(&dev->dev, "failed to get i915 symbols, graphics turbo disabled\n");
+ ips->gpu_turbo_enabled = false;
+ } else {
+ dev_dbg(&dev->dev, "graphics turbo enabled\n");
+ ips->gpu_turbo_enabled = true;
+ }
+
/*
* Check PLATFORM_INFO MSR to make sure this chip is
* turbo capable.