drm/i915: Report the failure to write to the punit
The write to the punit may fail, so propagate the error code back to its callers. Of particular interest are the RPS writes, so add appropriate user error codes and logging. v2: Add DEBUG for failed frequency changes during RPS. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170126101919.13211-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
This commit is contained in:
@@ -1209,7 +1209,10 @@ static void gen6_pm_rps_work(struct work_struct *work)
|
||||
new_delay += adj;
|
||||
new_delay = clamp_t(int, new_delay, min, max);
|
||||
|
||||
intel_set_rps(dev_priv, new_delay);
|
||||
if (intel_set_rps(dev_priv, new_delay)) {
|
||||
DRM_DEBUG_DRIVER("Failed to set new GPU frequency\n");
|
||||
dev_priv->rps.last_adj = 0;
|
||||
}
|
||||
|
||||
mutex_unlock(&dev_priv->rps.hw_lock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user