diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-20 05:22:42 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-20 05:22:42 +0000 |
commit | 6d72824e43ac3238bb02a6f181bed8558d5dbebd (patch) | |
tree | c37d5a984a81ae3e68015e488101c066a963d39c /sys/dev | |
parent | 138cb5d6de177e3a3c5c81f818f33dcf55aa2faf (diff) |
drm/i915/bios: Fix parsing backlight BDB data
From Karthikeyan Ramasubramanian
ca82830e453364d192e3c0c92a0f8823f621879c in linux-6.6.y/6.6.3
43b26bdd2ee5cfca80939be910d5b23a50cd7f9d in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915/display/intel_bios.c | 19 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/display/intel_vbt_defs.h | 5 |
2 files changed, 4 insertions, 20 deletions
diff --git a/sys/dev/pci/drm/i915/display/intel_bios.c b/sys/dev/pci/drm/i915/display/intel_bios.c index 5694147a63a..e7dcbcdb388 100644 --- a/sys/dev/pci/drm/i915/display/intel_bios.c +++ b/sys/dev/pci/drm/i915/display/intel_bios.c @@ -1035,22 +1035,11 @@ 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; + const struct lfp_backlight_control_method *method; - if (i915->display.vbt.version >= 236) - exp_size = sizeof(struct bdb_lfp_backlight_data); - else if (i915->display.vbt.version >= 234) - exp_size = EXP_BDB_LFP_BL_DATA_SIZE_REV_234; - else - exp_size = EXP_BDB_LFP_BL_DATA_SIZE_REV_191; - - if (get_blocksize(backlight_data) >= exp_size) { - const struct lfp_backlight_control_method *method; - - method = &backlight_data->backlight_control[panel_type]; - panel->vbt.backlight.type = method->type; - panel->vbt.backlight.controller = method->controller; - } + method = &backlight_data->backlight_control[panel_type]; + panel->vbt.backlight.type = method->type; + panel->vbt.backlight.controller = method->controller; } panel->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz; diff --git a/sys/dev/pci/drm/i915/display/intel_vbt_defs.h b/sys/dev/pci/drm/i915/display/intel_vbt_defs.h index a9f44abfc9f..b50cd0dcabd 100644 --- a/sys/dev/pci/drm/i915/display/intel_vbt_defs.h +++ b/sys/dev/pci/drm/i915/display/intel_vbt_defs.h @@ -897,11 +897,6 @@ struct lfp_brightness_level { u16 reserved; } __packed; -#define EXP_BDB_LFP_BL_DATA_SIZE_REV_191 \ - offsetof(struct bdb_lfp_backlight_data, brightness_level) -#define EXP_BDB_LFP_BL_DATA_SIZE_REV_234 \ - offsetof(struct bdb_lfp_backlight_data, brightness_precision_bits) - struct bdb_lfp_backlight_data { u8 entry_size; struct lfp_backlight_data_entry data[16]; |