Skip to content
Commit fdddf8c3 authored by Lukasz Majczak's avatar Lukasz Majczak Committed by Jani Nikula
Browse files

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: d381baad ("drm/i915/vbt: Fix backlight parsing for VBT 234+")

Tested-by: default avatarLukasz Majczak <lma@semihalf.com>
Signed-off-by: default avatarLukasz Majczak <lma@semihalf.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210930134606.227234-1-lma@semihalf.com


(cherry picked from commit 4378daf5)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent a532cde3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment