On Fri, Nov 06, 2020 at 02:55:28PM -0800, Lucas De Marchi wrote:
From: José Roberto de Souza <jose.souza@xxxxxxxxx> Power wells are only part of display block and not necessary when we don't have display. Cc: Jani Nikula <jani.nikula@xxxxxxxxx> Signed-off-by: José Roberto de Souza <jose.souza@xxxxxxxxx> Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx> --- 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; + }
so I sent this to get some discussion going, but I think this is out of place. __set_power_wells() is ultimately called only by intel_power_domains_init() From that function, I think we may want to initialize power_domains->lock to make the calls outside display/ to work, but that should be it. We could just have this check and return on top of intel_power_domains_init(). Lucas De Marchi
+ 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 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx