Commit 8dde2e68 authored by Lucas De Marchi's avatar Lucas De Marchi

drm/i915: Re-order if/else ladder in intel_detect_pch()

Follow the convention of checking the last platform first and reword the
comment to convey there are more platforms than just DG1.
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919192128.2045154-5-lucas.demarchi@intel.com
parent 212cf016
......@@ -218,13 +218,16 @@ void intel_detect_pch(struct drm_i915_private *dev_priv)
unsigned short id;
enum intel_pch pch_type;
/* DG1 has south engine display on the same PCI device */
if (IS_DG1(dev_priv)) {
dev_priv->pch_type = PCH_DG1;
return;
} else if (IS_DG2(dev_priv)) {
/*
* South display engine on the same PCI device: just assign the fake
* PCH.
*/
if (IS_DG2(dev_priv)) {
dev_priv->pch_type = PCH_DG2;
return;
} else if (IS_DG1(dev_priv)) {
dev_priv->pch_type = PCH_DG1;
return;
}
/*
......
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