summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/oaktrail_device.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-11-29 22:27:45 +0000
committerDave Airlie <airlied@redhat.com>2011-12-06 09:55:41 +0000
commitaa0c45fdca0cff3d1ba06578a84c9bc7f29a0960 (patch)
treeed2b380de5668f7b7d8ee87b8433ef2082924ef4 /drivers/gpu/drm/gma500/oaktrail_device.c
parent1b223c9ebf11e9597820fac57b211709f8ffce26 (diff)
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/oaktrail_device.c')
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_device.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/gma500/oaktrail_device.c b/drivers/gpu/drm/gma500/oaktrail_device.c
index 57ad3ea62be2..c1ffb113958b 100644
--- a/drivers/gpu/drm/gma500/oaktrail_device.c
+++ b/drivers/gpu/drm/gma500/oaktrail_device.c
@@ -29,6 +29,7 @@
#include <asm/mrst.h>
#include <asm/intel_scu_ipc.h>
#include "mid_bios.h"
+#include "intel_bios.h"
static int oaktrail_output_init(struct drm_device *dev)
{
@@ -456,9 +457,24 @@ static int oaktrail_power_up(struct drm_device *dev)
}
+static void oaktrail_chip_setup(struct drm_device *dev)
+{
+ int ret = mid_chip_setup(dev);
+ if (ret < 0)
+ return ret;
+ if (vbt->size == 0) {
+ /* Now pull the BIOS data */
+ gma_intel_opregion_init(dev);
+ psb_intel_init_bios(dev);
+ }
+ return 0;
+}
+
static void oaktrail_teardown(struct drm_device *dev)
{
oaktrail_hdmi_teardown(dev);
+ if (vbt->size == 0)
+ psb_intel_destroy_bios(dev);
}
const struct psb_ops oaktrail_chip_ops = {
@@ -468,7 +484,7 @@ const struct psb_ops oaktrail_chip_ops = {
.crtcs = 2,
.sgx_offset = MRST_SGX_OFFSET,
- .chip_setup = mid_chip_setup,
+ .chip_setup = oaktrail_chip_setup,
.chip_teardown = oaktrail_teardown,
.crtc_helper = &oaktrail_helper_funcs,
.crtc_funcs = &psb_intel_crtc_funcs,