summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/mid_bios.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-11-29 22:27:45 (GMT)
committerDave Airlie <airlied@redhat.com>2011-12-06 09:55:41 (GMT)
commitaa0c45fdca0cff3d1ba06578a84c9bc7f29a0960 (patch)
treeed2b380de5668f7b7d8ee87b8433ef2082924ef4 /drivers/gpu/drm/gma500/mid_bios.c
parent1b223c9ebf11e9597820fac57b211709f8ffce26 (diff)
downloadlinux-aa0c45fdca0cff3d1ba06578a84c9bc7f29a0960.tar.xz
gma500: Fix oaktrail probing part 1
The Oaktrail platform does not use the GCT/VBT format that is used by the Moorestowm (non PC legacy) equivalent device. It uses the BIOS tables which means an opregion and the like. The current code uses the wrong table which breaks things like the Fujitsu q550 tablets. Fix the table usage as a first step. The problem was found and diagnosed by Chia-I Wu Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/mid_bios.c')
-rw-r--r--drivers/gpu/drm/gma500/mid_bios.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c
index 018ab46..128e6bb 100644
--- a/drivers/gpu/drm/gma500/mid_bios.c
+++ b/drivers/gpu/drm/gma500/mid_bios.c
@@ -142,6 +142,12 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
memcpy(vbt, vbt_virtual, sizeof(*vbt));
iounmap(vbt_virtual); /* Free virtual address space */
+ /* No matching signature don't process the data */
+ if (memcmp(vbt->signature, "$GCT", 4)) {
+ vbt->size = 0;
+ return;
+ }
+
dev_dbg(dev->dev, "GCT revision is %x\n", vbt->revision);
switch (vbt->revision) {