[PATCH 00/11] drm/i915/bios: Rework BDB block handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Several changes to our BDB block handling:

1)
The current way of trusting the version checks to avoid out of
bounds accesses to the BDB blocks is fragile. We might just get
the version check wrong, or the VBT may be corrupted/malicious.
So instead of doing blind accesses into the original data let's
make a copy of each block with a gauranteed minimum size.

2)
The LFP data table pointer stuff is a horrible mess currently.
Let's make that sensible by verifying the pointers ahead of
time, which allows us to trust them 100% when we acually
parse the actual data block.

3)
There's more stuff at the tail end of the LFP data block we
need to parse. The variable size of the fp_timing table makes
that a bit awkward, but with the pointer validation in place
it's not too horrible.

4)
Some modern machines (seen it on TGL here) no longer include
the LFP data table pointers block (41) in the VBT. In order to
keep the rest of the code working as is we must therefore
generate the pointers block from scratch.

Ville Syrjälä (11):
  drm/i915/bios: Extract struct lvds_lfp_data_ptr_table
  drm/i915/bios: Make copies of VBT data blocks
  drm/i915/bios: Use the copy of the LFP data table always
  drm/i915/bios: Validate LFP data table pointers
  drm/i915/bios: Trust the LFP data pointers
  drm/i915/bios: Validate the panel_name table
  drm/i915/bios: Reorder panel DTD parsing
  drm/i915/bios: Generate LFP data table pointers if the VBT lacks them
  drm/i915/bios: Get access to the tail end of the LFP data block
  drm/i915/bios: Parse the seamless DRRS min refresh rate
  drm/i915: Respect VBT seamless DRRS min refresh rate

 drivers/gpu/drm/i915/display/intel_bios.c     | 540 +++++++++++++++---
 drivers/gpu/drm/i915/display/intel_panel.c    |  10 +-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h |  35 +-
 drivers/gpu/drm/i915/i915_drv.h               |   2 +
 4 files changed, 489 insertions(+), 98 deletions(-)

-- 
2.34.1




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux