diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2015-03-24 08:54:19 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-25 13:23:44 -0400 |
commit | 6c826f349587f6c897da9bd224912ca1aee3d9ea (patch) | |
tree | a6945a1ee5c4f9f98e0c22aae3f20de1fce5f968 | |
parent | 1d00dad56b15ed5dab5802143df2bf61d51b6b55 (diff) |
drm/i915: Add fault address to error state for gen8 and gen9
The faulting virtual address is >32bits and has been moved
to different registers. Add to error state and output upper
register first, in the same line for easy reconstruction of
the fault address.
v2: correct gen masking (Michel)
v3: s/TBL/TLB (Ville)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 3 |
3 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index e7ed5b3d133f..0a563cc65801 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -427,6 +427,8 @@ struct drm_i915_error_state { | |||
427 | u32 forcewake; | 427 | u32 forcewake; |
428 | u32 error; /* gen6+ */ | 428 | u32 error; /* gen6+ */ |
429 | u32 err_int; /* gen7 */ | 429 | u32 err_int; /* gen7 */ |
430 | u32 fault_data0; /* gen8, gen9 */ | ||
431 | u32 fault_data1; /* gen8, gen9 */ | ||
430 | u32 done_reg; | 432 | u32 done_reg; |
431 | u32 gac_eco; | 433 | u32 gac_eco; |
432 | u32 gam_ecochk; | 434 | u32 gam_ecochk; |
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 2f7cbd3d5524..1d4e60df8883 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c | |||
@@ -386,6 +386,11 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, | |||
386 | 386 | ||
387 | if (INTEL_INFO(dev)->gen >= 6) { | 387 | if (INTEL_INFO(dev)->gen >= 6) { |
388 | err_printf(m, "ERROR: 0x%08x\n", error->error); | 388 | err_printf(m, "ERROR: 0x%08x\n", error->error); |
389 | |||
390 | if (INTEL_INFO(dev)->gen >= 8) | ||
391 | err_printf(m, "FAULT_TLB_DATA: 0x%08x 0x%08x\n", | ||
392 | error->fault_data1, error->fault_data0); | ||
393 | |||
389 | err_printf(m, "DONE_REG: 0x%08x\n", error->done_reg); | 394 | err_printf(m, "DONE_REG: 0x%08x\n", error->done_reg); |
390 | } | 395 | } |
391 | 396 | ||
@@ -1171,6 +1176,11 @@ static void i915_capture_reg_state(struct drm_i915_private *dev_priv, | |||
1171 | if (IS_GEN7(dev)) | 1176 | if (IS_GEN7(dev)) |
1172 | error->err_int = I915_READ(GEN7_ERR_INT); | 1177 | error->err_int = I915_READ(GEN7_ERR_INT); |
1173 | 1178 | ||
1179 | if (INTEL_INFO(dev)->gen >= 8) { | ||
1180 | error->fault_data0 = I915_READ(GEN8_FAULT_TLB_DATA0); | ||
1181 | error->fault_data1 = I915_READ(GEN8_FAULT_TLB_DATA1); | ||
1182 | } | ||
1183 | |||
1174 | if (IS_GEN6(dev)) { | 1184 | if (IS_GEN6(dev)) { |
1175 | error->forcewake = I915_READ(FORCEWAKE); | 1185 | error->forcewake = I915_READ(FORCEWAKE); |
1176 | error->gab_ctl = I915_READ(GAB_CTL); | 1186 | error->gab_ctl = I915_READ(GAB_CTL); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 5b84ee686f99..b522eb6e59a4 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -1306,6 +1306,9 @@ enum skl_disp_power_wells { | |||
1306 | #define ERR_INT_FIFO_UNDERRUN_A (1<<0) | 1306 | #define ERR_INT_FIFO_UNDERRUN_A (1<<0) |
1307 | #define ERR_INT_FIFO_UNDERRUN(pipe) (1<<(pipe*3)) | 1307 | #define ERR_INT_FIFO_UNDERRUN(pipe) (1<<(pipe*3)) |
1308 | 1308 | ||
1309 | #define GEN8_FAULT_TLB_DATA0 0x04b10 | ||
1310 | #define GEN8_FAULT_TLB_DATA1 0x04b14 | ||
1311 | |||
1309 | #define FPGA_DBG 0x42300 | 1312 | #define FPGA_DBG 0x42300 |
1310 | #define FPGA_DBG_RM_NOCLAIM (1<<31) | 1313 | #define FPGA_DBG_RM_NOCLAIM (1<<31) |
1311 | 1314 | ||