drm/i915/vbt: Fix backlight parsing for VBT 234+
authorJosé Roberto de Souza <jose.souza@intel.com>
Thu, 8 Oct 2020 21:19:30 +0000 (14:19 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Fri, 9 Oct 2020 21:09:52 +0000 (14:09 -0700)
commitd381baad29b43511a7fc34c64402ef65029ab281
tree87310c0a0c6daaa860bc01eb9367d43b31539685
parent63b9d9aa8582f13ad265abbf15681e690cfa2109
drm/i915/vbt: Fix backlight parsing for VBT 234+

Child min_brightness is obsolete from VBT 234+, instead the new
min_brightness field in the main structure should be used.

This new field is 16 bits wide, so backlight_precision_bits is needed
to check if value needs to be scaled down but it is only available in
VBT 236+ so working around it by using the also new backlight_level
in the main struct.

v2:
- missed that backlight_data->level is also obsolete

v3:
- s/backlight/brightness to better match specification
- using u16 to specify brightness level instead of a u32 : 16

BSpec: 20149
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201008211932.24989-1-jose.souza@intel.com
drivers/gpu/drm/i915/display/intel_bios.c
drivers/gpu/drm/i915/display/intel_vbt_defs.h