]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/bios: bump expected child device size
authorJani Nikula <jani.nikula@intel.com>
Mon, 26 Feb 2024 17:58:52 +0000 (19:58 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 29 Feb 2024 13:26:13 +0000 (15:26 +0200)
VBT versions since 256 have an extra byte for EFP index.

v2: Update BUILD_BUG_ON() (Matt)

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

index fe52c06271ef0588647b4cd68b3bee5689747f29..f967ab406e353d51d44df4e522a839abc77c1554 100644 (file)
@@ -2740,11 +2740,13 @@ parse_general_definitions(struct drm_i915_private *i915)
                expected_size = 37;
        } else if (i915->display.vbt.version <= 215) {
                expected_size = 38;
-       } else if (i915->display.vbt.version <= 250) {
+       } else if (i915->display.vbt.version <= 255) {
                expected_size = 39;
+       } else if (i915->display.vbt.version <= 256) {
+               expected_size = 40;
        } else {
                expected_size = sizeof(*child);
-               BUILD_BUG_ON(sizeof(*child) < 39);
+               BUILD_BUG_ON(sizeof(*child) < 40);
                drm_dbg(&i915->drm,
                        "Expected child device config size for VBT version %u not known; assuming %u\n",
                        i915->display.vbt.version, expected_size);
index a9f44abfc9fc283da886724d9d2447c4b8ad59f4..648934fcd123c314333755a53adead10e8cdc179 100644 (file)
@@ -485,6 +485,7 @@ struct child_device_config {
        u8 hdmi_iboost_level:4;                                 /* 196+ */
        u8 dp_max_link_rate:3;                                  /* 216+ */
        u8 dp_max_link_rate_reserved:5;                         /* 216+ */
+       u8 efp_index;                                           /* 256+ */
 } __packed;
 
 struct bdb_general_definitions {