OSDN Git Service

drm/i915/bios: Validate the panel_name table
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 5 Apr 2022 17:33:54 +0000 (20:33 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 12 Apr 2022 06:18:19 +0000 (09:18 +0300)
commit5ab58d6996d7befd3273379100f45214d7f58790
treec610536a579585199e7844fd131b4777c5e8e16b
parent58b2e3829ec6558d6d0edf709579b82550ecea61
drm/i915/bios: Validate the panel_name table

In addition to the fp_timing,dvo_timing,panel_pnp_id tables
there also exists a panel_name table. Unlike the others this
is just one offset+table_size even though there are still 16
actual panel_names in the data block.

The panel_name table made its first appearance somewhere
around VBT version 156-163. The exact version is not known.
But we don't need to know that since we can just check whether
the pointers block has enough room for it or not.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220405173410.11436-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_bios.c
drivers/gpu/drm/i915/display/intel_vbt_defs.h