|
@@ -1218,7 +1218,8 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
|
|
|
rpcurup, GT_PM_INTERVAL_TO_US(dev_priv, rpcurup));
|
|
|
seq_printf(m, "RP PREV UP: %d (%dus)\n",
|
|
|
rpprevup, GT_PM_INTERVAL_TO_US(dev_priv, rpprevup));
|
|
|
- seq_printf(m, "Up threshold: %d%%\n", rps->up_threshold);
|
|
|
+ seq_printf(m, "Up threshold: %d%%\n",
|
|
|
+ rps->power.up_threshold);
|
|
|
|
|
|
seq_printf(m, "RP CUR DOWN EI: %d (%dus)\n",
|
|
|
rpdownei, GT_PM_INTERVAL_TO_US(dev_priv, rpdownei));
|
|
@@ -1226,7 +1227,8 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
|
|
|
rpcurdown, GT_PM_INTERVAL_TO_US(dev_priv, rpcurdown));
|
|
|
seq_printf(m, "RP PREV DOWN: %d (%dus)\n",
|
|
|
rpprevdown, GT_PM_INTERVAL_TO_US(dev_priv, rpprevdown));
|
|
|
- seq_printf(m, "Down threshold: %d%%\n", rps->down_threshold);
|
|
|
+ seq_printf(m, "Down threshold: %d%%\n",
|
|
|
+ rps->power.down_threshold);
|
|
|
|
|
|
max_freq = (IS_GEN9_LP(dev_priv) ? rp_state_cap >> 0 :
|
|
|
rp_state_cap >> 16) & 0xff;
|
|
@@ -2218,6 +2220,7 @@ static int i915_rps_boost_info(struct seq_file *m, void *data)
|
|
|
seq_printf(m, "CPU waiting? %d\n", count_irq_waiters(dev_priv));
|
|
|
seq_printf(m, "Boosts outstanding? %d\n",
|
|
|
atomic_read(&rps->num_waiters));
|
|
|
+ seq_printf(m, "Interactive? %d\n", READ_ONCE(rps->power.interactive));
|
|
|
seq_printf(m, "Frequency requested %d\n",
|
|
|
intel_gpu_freq(dev_priv, rps->cur_freq));
|
|
|
seq_printf(m, " min hard:%d, soft:%d; max soft:%d, hard:%d\n",
|
|
@@ -2261,13 +2264,13 @@ static int i915_rps_boost_info(struct seq_file *m, void *data)
|
|
|
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
|
|
|
|
|
|
seq_printf(m, "\nRPS Autotuning (current \"%s\" window):\n",
|
|
|
- rps_power_to_str(rps->power));
|
|
|
+ rps_power_to_str(rps->power.mode));
|
|
|
seq_printf(m, " Avg. up: %d%% [above threshold? %d%%]\n",
|
|
|
rpup && rpupei ? 100 * rpup / rpupei : 0,
|
|
|
- rps->up_threshold);
|
|
|
+ rps->power.up_threshold);
|
|
|
seq_printf(m, " Avg. down: %d%% [below threshold? %d%%]\n",
|
|
|
rpdown && rpdownei ? 100 * rpdown / rpdownei : 0,
|
|
|
- rps->down_threshold);
|
|
|
+ rps->power.down_threshold);
|
|
|
} else {
|
|
|
seq_puts(m, "\nRPS Autotuning inactive\n");
|
|
|
}
|
|
@@ -2606,13 +2609,22 @@ static int i915_psr_sink_status_show(struct seq_file *m, void *data)
|
|
|
"sink internal error",
|
|
|
};
|
|
|
struct drm_connector *connector = m->private;
|
|
|
+ struct drm_i915_private *dev_priv = to_i915(connector->dev);
|
|
|
struct intel_dp *intel_dp =
|
|
|
enc_to_intel_dp(&intel_attached_encoder(connector)->base);
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ if (!CAN_PSR(dev_priv)) {
|
|
|
+ seq_puts(m, "PSR Unsupported\n");
|
|
|
+ return -ENODEV;
|
|
|
+ }
|
|
|
|
|
|
if (connector->status != connector_status_connected)
|
|
|
return -ENODEV;
|
|
|
|
|
|
- if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_STATUS, &val) == 1) {
|
|
|
+ ret = drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_STATUS, &val);
|
|
|
+
|
|
|
+ if (ret == 1) {
|
|
|
const char *str = "unknown";
|
|
|
|
|
|
val &= DP_PSR_SINK_STATE_MASK;
|
|
@@ -2620,7 +2632,7 @@ static int i915_psr_sink_status_show(struct seq_file *m, void *data)
|
|
|
str = sink_status[val];
|
|
|
seq_printf(m, "Sink PSR status: 0x%x [%s]\n", val, str);
|
|
|
} else {
|
|
|
- DRM_ERROR("dpcd read (at %u) failed\n", DP_PSR_STATUS);
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
return 0;
|