diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-02-14 11:12:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-14 22:02:51 -0400 |
commit | ff3bcdc9b5f00809a18cc1a3ea42a72e00b1a895 (patch) | |
tree | fcdf0aba29c4833de567213e7be5f5ac11ca54fb /drivers/gpu/drm | |
parent | 686ea5862eb61e070881c221271f6563cb74a7f0 (diff) |
drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT
commit 998d75730b40afc218c059d811869abe9676b305 upstream.
If there is no OPREGION_ASLE_EXT then a VBT stored in mailbox #4 may
use the ASLE_EXT parts of the opregion. Adjust the vbt_size calculation
for a vbt in mailbox #4 for this.
This fixes the driver not finding the VBT on a jumper ezpad mini3
cherrytrail tablet and on a ACER SW5_017 machine.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1487088758-30050-1-git-send-email-jani.nikula@intel.com
(cherry picked from commit dfb65e71ea2c1d97ac373cc0587dc60b3307581a)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_opregion.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c index 7acbbbf97833..4534e4cadccf 100644 --- a/drivers/gpu/drm/i915/intel_opregion.c +++ b/drivers/gpu/drm/i915/intel_opregion.c | |||
@@ -1031,7 +1031,18 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv) | |||
1031 | opregion->vbt_size = vbt_size; | 1031 | opregion->vbt_size = vbt_size; |
1032 | } else { | 1032 | } else { |
1033 | vbt = base + OPREGION_VBT_OFFSET; | 1033 | vbt = base + OPREGION_VBT_OFFSET; |
1034 | vbt_size = OPREGION_ASLE_EXT_OFFSET - OPREGION_VBT_OFFSET; | 1034 | /* |
1035 | * The VBT specification says that if the ASLE ext | ||
1036 | * mailbox is not used its area is reserved, but | ||
1037 | * on some CHT boards the VBT extends into the | ||
1038 | * ASLE ext area. Allow this even though it is | ||
1039 | * against the spec, so we do not end up rejecting | ||
1040 | * the VBT on those boards (and end up not finding the | ||
1041 | * LCD panel because of this). | ||
1042 | */ | ||
1043 | vbt_size = (mboxes & MBOX_ASLE_EXT) ? | ||
1044 | OPREGION_ASLE_EXT_OFFSET : OPREGION_SIZE; | ||
1045 | vbt_size -= OPREGION_VBT_OFFSET; | ||
1035 | if (intel_bios_is_valid_vbt(vbt, vbt_size)) { | 1046 | if (intel_bios_is_valid_vbt(vbt, vbt_size)) { |
1036 | DRM_DEBUG_KMS("Found valid VBT in ACPI OpRegion (Mailbox #4)\n"); | 1047 | DRM_DEBUG_KMS("Found valid VBT in ACPI OpRegion (Mailbox #4)\n"); |
1037 | opregion->vbt = vbt; | 1048 | opregion->vbt = vbt; |