[PATCH 1/3] wip: drm/i915/display: Handle fused off display correctly
José Roberto de Souza
jose.souza at intel.com
Fri Oct 11 15:12:41 UTC 2019
If all pipes are fused off it means that display is disabled, similar
like we handle for GEN 7 and 8 right above.
On GEN 9 the bit 31 is "Internal Graphics Disable" and on newer GENs
it has another function, probably on GEN 9 when bit 31 is set all
the 3 pipes disable bit are set, so we can unify the handling.
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_device_info.c | 14 ++++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 0fb9030b89f1..5598b8636b29 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -7643,6 +7643,7 @@ enum {
#define CNL_DDI_CLOCK_REG_ACCESS_ON (1 << 7)
#define SKL_DFSM _MMIO(0x51000)
+#define SKL_DFSM_INTERNAL_DISPLAY_DISABLE (1 << 30)
#define SKL_DFSM_CDCLK_LIMIT_MASK (3 << 23)
#define SKL_DFSM_CDCLK_LIMIT_675 (0 << 23)
#define SKL_DFSM_CDCLK_LIMIT_540 (1 << 23)
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 85e480bdc673..eef12e48b339 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -972,15 +972,21 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
enabled_mask &= ~BIT(PIPE_D);
/*
- * At least one pipe should be enabled and if there are
- * disabled pipes, they should be the last ones, with no holes
- * in the mask.
+ * If there are disabled pipes, they should be the last ones,
+ * with no holes in the mask.
*/
- if (enabled_mask == 0 || !is_power_of_2(enabled_mask + 1))
+ if (enabled_mask && !is_power_of_2(enabled_mask + 1))
DRM_ERROR("invalid pipe fuse configuration: enabled_mask=0x%x\n",
enabled_mask);
else
info->pipe_mask = enabled_mask;
+
+ if ((IS_GEN9(dev_priv) && !IS_GEMINILAKE(dev_priv)) &&
+ (dfsm & SKL_DFSM_INTERNAL_DISPLAY_DISABLE))
+ i915_modparams.disable_display = true;
+
+ if (!enabled_mask)
+ i915_modparams.disable_display = true;
}
/* Initialize slice/subslice/EU info */
--
2.23.0
More information about the Intel-gfx-trybot
mailing list