Commit aa0c45fd authored by Alan Cox's avatar Alan Cox Committed by Dave Airlie

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: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 1b223c9e
...@@ -142,6 +142,12 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv) ...@@ -142,6 +142,12 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
memcpy(vbt, vbt_virtual, sizeof(*vbt)); memcpy(vbt, vbt_virtual, sizeof(*vbt));
iounmap(vbt_virtual); /* Free virtual address space */ 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); dev_dbg(dev->dev, "GCT revision is %x\n", vbt->revision);
switch (vbt->revision) { switch (vbt->revision) {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <asm/mrst.h> #include <asm/mrst.h>
#include <asm/intel_scu_ipc.h> #include <asm/intel_scu_ipc.h>
#include "mid_bios.h" #include "mid_bios.h"
#include "intel_bios.h"
static int oaktrail_output_init(struct drm_device *dev) static int oaktrail_output_init(struct drm_device *dev)
{ {
...@@ -456,9 +457,24 @@ static int oaktrail_power_up(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) static void oaktrail_teardown(struct drm_device *dev)
{ {
oaktrail_hdmi_teardown(dev); oaktrail_hdmi_teardown(dev);
if (vbt->size == 0)
psb_intel_destroy_bios(dev);
} }
const struct psb_ops oaktrail_chip_ops = { const struct psb_ops oaktrail_chip_ops = {
...@@ -468,7 +484,7 @@ const struct psb_ops oaktrail_chip_ops = { ...@@ -468,7 +484,7 @@ const struct psb_ops oaktrail_chip_ops = {
.crtcs = 2, .crtcs = 2,
.sgx_offset = MRST_SGX_OFFSET, .sgx_offset = MRST_SGX_OFFSET,
.chip_setup = mid_chip_setup, .chip_setup = oaktrail_chip_setup,
.chip_teardown = oaktrail_teardown, .chip_teardown = oaktrail_teardown,
.crtc_helper = &oaktrail_helper_funcs, .crtc_helper = &oaktrail_helper_funcs,
.crtc_funcs = &psb_intel_crtc_funcs, .crtc_funcs = &psb_intel_crtc_funcs,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment