intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT
@ 2016-12-25 10:19 Hans de Goede
  2016-12-27 10:58 ` Jani Nikula
  2017-02-06  7:04 ` Jani Nikula
  0 siblings, 2 replies; 13+ messages in thread
From: Hans de Goede @ 2016-12-25 10:19 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, Ville Syrjälä
  Cc: Hans de Goede, intel-gfx, stable, dri-devel

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.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Note even with this fixed the panel still does not work with 4.9,
but it does with drm-intel-next-queued :) I believe the missing bit in
4.9 is the "drm/915: Parsing the missed out DTD fields from the VBT"
commit, but I've not verified this.
---
 drivers/gpu/drm/i915/intel_opregion.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index f4429f6..eff35ae 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -982,7 +982,9 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv)
 			opregion->vbt_size = vbt_size;
 		} else {
 			vbt = base + OPREGION_VBT_OFFSET;
-			vbt_size = OPREGION_ASLE_EXT_OFFSET - OPREGION_VBT_OFFSET;
+			vbt_size = (mboxes & MBOX_ASLE_EXT) ?
+				OPREGION_ASLE_EXT_OFFSET : OPREGION_SIZE;
+			vbt_size -= OPREGION_VBT_OFFSET;
 			if (intel_bios_is_valid_vbt(vbt, vbt_size)) {
 				DRM_DEBUG_KMS("Found valid VBT in ACPI OpRegion (Mailbox #4)\n");
 				opregion->vbt = vbt;
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-02-10 12:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-25 10:19 [PATCH] drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT Hans de Goede
2016-12-27 10:58 ` Jani Nikula
2016-12-31 16:00   ` Hans de Goede
2017-01-20  8:07     ` Hans de Goede
2017-01-20  8:16       ` Jani Nikula
2017-01-23 10:36       ` Jani Nikula
2017-01-23 16:04         ` Hans de Goede
2017-01-24 13:33           ` Jani Nikula
2017-02-04 13:51           ` Hans de Goede
2017-02-06  6:55             ` Jani Nikula
2017-02-06  7:04 ` Jani Nikula
2017-02-10 10:52   ` Hans de Goede
2017-02-10 12:21     ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).