[Intel-gfx] [PATCH 5/8] drm/i915/display: Do not set any power wells when there is no display

Lucas De Marchi lucas.demarchi at intel.com
Fri Nov 6 22:55:28 UTC 2020


From: José Roberto de Souza <jose.souza at intel.com>

Power wells are only part of display block and not necessary when
we don't have display.

Cc: Jani Nikula <jani.nikula at intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 689922480661..19a3c93c5489 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -4567,6 +4567,11 @@ __set_power_wells(struct i915_power_domains *power_domains,
 	int power_well_count = 0;
 	int i, plt_idx = 0;
 
+	if (!HAS_DISPLAY(i915)) {
+		power_domains->power_well_count = 0;
+		return 0;
+	}
+
 	for (i = 0; i < power_well_descs_sz; i++)
 		if (!(BIT_ULL(power_well_descs[i].id) & skip_mask))
 			power_well_count++;
-- 
2.29.0



More information about the Intel-gfx mailing list