]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/bdb: Fix version check
authorLukasz Majczak <lma@semihalf.com>
Thu, 30 Sep 2021 13:46:06 +0000 (15:46 +0200)
committerJosé Roberto de Souza <jose.souza@intel.com>
Thu, 30 Sep 2021 20:50:16 +0000 (13:50 -0700)
commit4fbd36c10ca958400ad3d0ec910da6218d81d159
treee215f7bfc38555fc1814bafef7dab51693d04d8f
parent1843b937c4ce10901c39cfd997f99f59e3deaba6
drm/i915/bdb: Fix version check

With patch "drm/i915/vbt: Fix backlight parsing for VBT 234+"
the size of bdb_lfp_backlight_data structure has been increased,
causing if-statement in the parse_lfp_backlight function
that comapres this structure size to the one retrieved from BDB,
always to fail for older revisions.
This patch calculates expected size of the structure for a given
BDB version and compares it with the value gathered from BDB.
Tested on Chromebook Pixelbook (Nocturne) (reports bdb->version = 221)

Fixes: 11983567ece8 ("drm/i915/vbt: Fix backlight parsing for VBT 234+")
Tested-by: Lukasz Majczak <lma@semihalf.com>
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210930134606.227234-1-lma@semihalf.com
drivers/gpu/drm/i915/display/intel_bios.c
drivers/gpu/drm/i915/display/intel_vbt_defs.h