Commit 07ba0a82 authored by Jani Nikula's avatar Jani Nikula

drm/i915: fix PCH_NOP setting for non-PCH platforms

Setting PCH type to PCH_NOP before checking whether we actually have a
PCH ends up returning true for HAS_PCH_SPLIT() on all non-PCH split
platforms. Fix this by using PCH_NOP only for platforms that actually
have a PCH.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180608123330.31003-6-jani.nikula@intel.com
parent 13d0464b
...@@ -248,14 +248,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) ...@@ -248,14 +248,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)
{ {
struct pci_dev *pch = NULL; struct pci_dev *pch = NULL;
/* In all current cases, num_pipes is equivalent to the PCH_NOP setting
* (which really amounts to a PCH but no South Display).
*/
if (INTEL_INFO(dev_priv)->num_pipes == 0) {
dev_priv->pch_type = PCH_NOP;
return;
}
/* /*
* The reason to probe ISA bridge instead of Dev31:Fun0 is to * The reason to probe ISA bridge instead of Dev31:Fun0 is to
* make graphics device passthrough work easy for VMM, that only * make graphics device passthrough work easy for VMM, that only
...@@ -295,6 +287,17 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) ...@@ -295,6 +287,17 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)
break; break;
} }
} }
/*
* Use PCH_NOP (PCH but no South Display) for PCH platforms without
* display.
*/
if (pch && INTEL_INFO(dev_priv)->num_pipes == 0) {
DRM_DEBUG_KMS("Display disabled, reverting to NOP PCH\n");
dev_priv->pch_type = PCH_NOP;
dev_priv->pch_id = 0;
}
if (!pch) if (!pch)
DRM_DEBUG_KMS("No PCH found.\n"); DRM_DEBUG_KMS("No PCH found.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment