[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 23:18:35 UTC 2020
On Fri, Nov 06, 2020 at 02:55:28PM -0800, Lucas De Marchi wrote:
>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;
>+ }
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 at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list