Skip to content

Commit edca5a2

Browse files
vsyrjalarodrigovivi
authored andcommitted
drm/i915/bios: Copy the whole MIPI sequence block
Turns out the MIPI sequence block version number and new block size fields are considered part of the block header and are not included in the reported new block size field itself. Bump up the block size appropriately so that we'll copy over the last five bytes of the block as well. For this particular machine those last five bytes included parts of the GPIO op for the backlight on sequence, causing the backlight no longer to turn back on: Sequence 6 - MIPI_SEQ_BACKLIGHT_ON Delay: 20000 us - GPIO index 0, number 0, set 0 (0x00) + GPIO index 1, number 70, set 1 (0x01) Cc: [email protected] Fixes: e163cfb ("drm/i915/bios: Make copies of VBT data blocks") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6652 Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]> (cherry picked from commit a06289f) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 7e18e42 commit edca5a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/i915/display/intel_bios.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,13 @@ init_bdb_block(struct drm_i915_private *i915,
479479

480480
block_size = get_blocksize(block);
481481

482+
/*
483+
* Version number and new block size are considered
484+
* part of the header for MIPI sequenece block v3+.
485+
*/
486+
if (section_id == BDB_MIPI_SEQUENCE && *(const u8 *)block >= 3)
487+
block_size += 5;
488+
482489
entry = kzalloc(struct_size(entry, data, max(min_size, block_size) + 3),
483490
GFP_KERNEL);
484491
if (!entry) {

0 commit comments

Comments
 (0)