summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-09-19 12:21:11 -0700
committerLucas De Marchi <lucas.demarchi@intel.com>2023-09-21 07:39:48 -0700
commit8dde2e68a55533a047423b7ac378c637eab468ef (patch)
tree943b12f26517b652f8d01b5fbcdd108acaf97561
parent212cf016d974d351c252d760a9d42d02b3954830 (diff)
downloadlinux-stable-8dde2e68a55533a047423b7ac378c637eab468ef.tar.gz
linux-stable-8dde2e68a55533a047423b7ac378c637eab468ef.tar.bz2
linux-stable-8dde2e68a55533a047423b7ac378c637eab468ef.zip
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: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230919192128.2045154-5-lucas.demarchi@intel.com
-rw-r--r--drivers/gpu/drm/i915/soc/intel_pch.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/soc/intel_pch.c b/drivers/gpu/drm/i915/soc/intel_pch.c
index 19a8f27c404e..dfffdfa50b97 100644
--- a/drivers/gpu/drm/i915/soc/intel_pch.c
+++ b/drivers/gpu/drm/i915/soc/intel_pch.c
@@ -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;
}
/*