[Intel-gfx] [PATCH] drm/i915/bios: set default backlight controller index
Ville Syrjälä
ville.syrjala at linux.intel.com
Tue Feb 7 11:36:18 UTC 2023
On Tue, Feb 07, 2023 at 01:16:26PM +0200, Jani Nikula wrote:
> With backlight controller set to -1 in intel_panel_init_alloc() to
> distinguish uninitialized values, and controller later being set only if
> it's present in VBT, we can end up with -1 for the controller:
>
> [drm:intel_bios_init_panel [i915]] VBT backlight PWM modulation
> frequency 200 Hz, active high, min brightness 0, level 255,
> controller 4294967295
>
> There's no harm if it happens on platforms that ignore controller due to
> only one backlight controller being present, like on VLV above, but play
> it safe.
>
> Fixes: bf38bba3e7d6 ("drm/i915: Try to use the correct power sequencer intiially on bxt/glk")
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index e6ca51232dcf..ad833069f59c 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1033,6 +1033,7 @@ parse_lfp_backlight(struct drm_i915_private *i915,
> }
>
> panel->vbt.backlight.type = INTEL_BACKLIGHT_DISPLAY_DDI;
> + panel->vbt.backlight.controller = 0;
> if (i915->display.vbt.version >= 191) {
> size_t exp_size;
Ah right, older VBT didnt have this so we leave it untouched.
Zeroing in that case seems like the right thing to do.
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list