]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/bios: handle MIPI Sequence Block v3+ gracefully
authorJani Nikula <jani.nikula@intel.com>
Thu, 17 Sep 2015 13:42:07 +0000 (16:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:19 +0000 (14:43 -0700)
commiteea5a642208204cc2999d1f03f5db7177c40159a
tree428aeae2bc3516444327a85826079070fda9fb97
parent83777bf17d3bc20ef777e18aa3391eb3f5b11043
drm/i915/bios: handle MIPI Sequence Block v3+ gracefully

commit cd67d226ebd909d239d2c6e5a6abd6e2a338d1cd upstream.

The VBT MIPI Sequence Block version 3 has forward incompatible changes:

First, the block size in the header has been specified reserved, and the
actual size is a separate 32-bit value within the block. The current
find_section() function to will only look at the size in the block
header, and, depending on what's in that now reserved size field,
continue looking for other sections in the wrong place.

Fix this by taking the new block size field into account. This will
ensure that the lookups for other sections will work properly, as long
as the new 32-bit size does not go beyond the opregion VBT mailbox size.

Second, the contents of the block have been completely
changed. Gracefully refuse parsing the yet unknown data version.

Cc: Deepak M <m.deepak@intel.com>
Reviewed-by: Deepak M <m.deepak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/intel_bios.c