diff mbox

[2/6] drm/i915: Set PCH as NOP if display is disabled

Message ID 20180716223841.5081-2-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Souza, Jose July 16, 2018, 10:38 p.m. UTC
num_pipes is set to 0 if disable_display is set inside
intel_device_info_runtime_init() but when that happen PCH will
already be set in intel_detect_pch().

i915_driver_load()
	i915_driver_init_early()
		...
		intel_detect_pch()
		...
	...
	i915_driver_init_hw()
		intel_device_info_runtime_init()

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3834bd758a2e..99792039176f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -287,7 +287,8 @@  static void intel_detect_pch(struct drm_i915_private *dev_priv)
 	 * Use PCH_NOP (PCH but no South Display) for PCH platforms without
 	 * display.
 	 */
-	if (pch && INTEL_INFO(dev_priv)->num_pipes == 0) {
+	if (pch && ((INTEL_INFO(dev_priv)->num_pipes == 0) ||
+	    i915_modparams.disable_display)) {
 		DRM_DEBUG_KMS("Display disabled, reverting to NOP PCH\n");
 		dev_priv->pch_type = PCH_NOP;
 		dev_priv->pch_id = 0;