summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-05-03 12:15:38 -0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-05-10 21:56:31 +0200
commit12d217c795071bfee483158e1397c57e8dc3cb76 (patch)
treea0a17120e474e0a992b985f67ae10b496401ac18
parentff57f1b095e7c3ad0720193cd341d8ac1c781156 (diff)
downloadlwn-12d217c795071bfee483158e1397c57e8dc3cb76.tar.gz
lwn-12d217c795071bfee483158e1397c57e8dc3cb76.zip
drm/i915: clear FPGA_DBG_RM_NOCLAIM when capturing error state
In the error state function we read the registers without checking if the power well is on, so after doing this we have to clear the FPGA_DBG_RM_NOCLAIM bit to prevent the next I915_WRITE from detecting it and printing an error message. The first version of this patch was checking for the power well state and then avoiding reading registers that were off, but the reviewers requested to just read the registers any way and then later clear the FPGA_DBG_RM_NOCLAIM bit. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 260545cc5049..544d766f6ef3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9842,6 +9842,13 @@ intel_display_capture_error_state(struct drm_device *dev)
error->pipe[i].vsync = I915_READ(VSYNC(cpu_transcoder));
}
+ /* In the code above we read the registers without checking if the power
+ * well was on, so here we have to clear the FPGA_DBG_RM_NOCLAIM bit to
+ * prevent the next I915_WRITE from detecting it and printing an error
+ * message. */
+ if (HAS_POWER_WELL(dev))
+ I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
+
return error;
}