drm/i915/opregion: let user specify override VBT via firmware load
authorJani Nikula <jani.nikula@intel.com>
Thu, 17 Aug 2017 11:52:09 +0000 (14:52 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 17 Aug 2017 13:34:54 +0000 (16:34 +0300)
commitab3595bc4ff328ec90d20714f8e2674f3abfa2cd
treed376bb589edba6da51798dfaecb8b855c1ddd564
parenta029fa4d758f6a0a0f53c8f226d446206f32373f
drm/i915/opregion: let user specify override VBT via firmware load

Sometimes it would be most enlightening to debug systems by replacing
the VBT to be used. For example, in the referenced bug the BIOS provides
different VBT depending on the boot mode (UEFI vs. legacy). It would be
interesting to try the failing boot mode with the VBT from the working
boot, and see if that makes a difference.

Add a module parameter to load the VBT using the firmware loader, not
unlike the EDID firmware mechanism.

As a starting point for experimenting, one can pick up the BIOS provided
VBT from /sys/kernel/debug/dri/0/i915_opregion/i915_vbt.

v2: clarify firmware load return value check (Bob)

v3: kfree the loaded firmware blob

References: https://bugs.freedesktop.org/show_bug.cgi?id=97822#c83
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170817115209.25912-1-jani.nikula@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/i915_params.h
drivers/gpu/drm/i915/intel_opregion.c