[PATCH 1/3] Revert "drm/i915/opregion: Fix opregion setup during system resume on platforms without display"

Imre Deak imre.deak at intel.com
Mon Mar 13 15:48:09 UTC 2023


This reverts commit c4a1e57b3544bd3d0252cf4e1d73d9a317de0923.
---
 drivers/gpu/drm/i915/display/intel_opregion.c | 32 +++++--------------
 1 file changed, 8 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
index b7973a05d022d..8124c491a7aa9 100644
--- a/drivers/gpu/drm/i915/display/intel_opregion.c
+++ b/drivers/gpu/drm/i915/display/intel_opregion.c
@@ -1159,10 +1159,13 @@ void intel_opregion_register(struct drm_i915_private *i915)
 	intel_opregion_resume(i915);
 }
 
-static void intel_opregion_resume_display(struct drm_i915_private *i915)
+void intel_opregion_resume(struct drm_i915_private *i915)
 {
 	struct intel_opregion *opregion = &i915->display.opregion;
 
+	if (!opregion->header)
+		return;
+
 	if (opregion->acpi) {
 		intel_didl_outputs(i915);
 		intel_setup_cadls(i915);
@@ -1183,24 +1186,18 @@ static void intel_opregion_resume_display(struct drm_i915_private *i915)
 
 	/* Some platforms abuse the _DSM to enable MUX */
 	intel_dsm_get_bios_data_funcs_supported(i915);
+
+	intel_opregion_notify_adapter(i915, PCI_D0);
 }
 
-void intel_opregion_resume(struct drm_i915_private *i915)
+void intel_opregion_suspend(struct drm_i915_private *i915, pci_power_t state)
 {
 	struct intel_opregion *opregion = &i915->display.opregion;
 
 	if (!opregion->header)
 		return;
 
-	if (HAS_DISPLAY(i915))
-		intel_opregion_resume_display(i915);
-
-	intel_opregion_notify_adapter(i915, PCI_D0);
-}
-
-static void intel_opregion_suspend_display(struct drm_i915_private *i915)
-{
-	struct intel_opregion *opregion = &i915->display.opregion;
+	intel_opregion_notify_adapter(i915, state);
 
 	if (opregion->asle)
 		opregion->asle->ardy = ASLE_ARDY_NOT_READY;
@@ -1211,19 +1208,6 @@ static void intel_opregion_suspend_display(struct drm_i915_private *i915)
 		opregion->acpi->drdy = 0;
 }
 
-void intel_opregion_suspend(struct drm_i915_private *i915, pci_power_t state)
-{
-	struct intel_opregion *opregion = &i915->display.opregion;
-
-	if (!opregion->header)
-		return;
-
-	intel_opregion_notify_adapter(i915, state);
-
-	if (HAS_DISPLAY(i915))
-		intel_opregion_suspend_display(i915);
-}
-
 void intel_opregion_unregister(struct drm_i915_private *i915)
 {
 	struct intel_opregion *opregion = &i915->display.opregion;
-- 
2.37.1



More information about the Intel-gfx-trybot mailing list