Commit 6607e024 authored by Alan Cox's avatar Alan Cox Committed by Dave Airlie

gma500: Fix crash on D2700MUD and various other boards

The recent changes led to the lid timer code being run on various devices.
It does no harm on most but isn't needed. It also calls unconditionally
into the Poulsbo backlight code which goes bang on Cedartrail.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f9aa76a8
...@@ -352,8 +352,17 @@ static int psb_chip_setup(struct drm_device *dev) ...@@ -352,8 +352,17 @@ static int psb_chip_setup(struct drm_device *dev)
return 0; return 0;
} }
/* Not exactly an erratum more an irritation */
static int psb_chip_errata(struct drm_device *dev)
{
struct drm_psb_private *dev_priv = dev->dev_private;
psb_lid_timer_init(dev_priv);
}
static void psb_chip_teardown(struct drm_device *dev) static void psb_chip_teardown(struct drm_device *dev)
{ {
struct drm_psb_private *dev_priv = dev->dev_private;
psb_lid_timer_takedown(dev_priv);
gma_intel_teardown_gmbus(dev); gma_intel_teardown_gmbus(dev);
} }
...@@ -367,6 +376,7 @@ const struct psb_ops psb_chip_ops = { ...@@ -367,6 +376,7 @@ const struct psb_ops psb_chip_ops = {
.sgx_offset = PSB_SGX_OFFSET, .sgx_offset = PSB_SGX_OFFSET,
.chip_setup = psb_chip_setup, .chip_setup = psb_chip_setup,
.chip_teardown = psb_chip_teardown, .chip_teardown = psb_chip_teardown,
.errata = psb_chip_errata,
.crtc_helper = &psb_intel_helper_funcs, .crtc_helper = &psb_intel_helper_funcs,
.crtc_funcs = &psb_intel_crtc_funcs, .crtc_funcs = &psb_intel_crtc_funcs,
......
...@@ -208,11 +208,11 @@ static int psb_driver_unload(struct drm_device *dev) ...@@ -208,11 +208,11 @@ static int psb_driver_unload(struct drm_device *dev)
psb_modeset_cleanup(dev); psb_modeset_cleanup(dev);
if (dev_priv) { if (dev_priv) {
psb_intel_opregion_fini(dev);
psb_lid_timer_takedown(dev_priv);
if (dev_priv->ops->chip_teardown) if (dev_priv->ops->chip_teardown)
dev_priv->ops->chip_teardown(dev); dev_priv->ops->chip_teardown(dev);
psb_intel_opregion_fini(dev);
psb_do_takedown(dev); psb_do_takedown(dev);
...@@ -336,8 +336,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset) ...@@ -336,8 +336,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
PSB_WSGX32(0x30000000, PSB_CR_BIF_3D_REQ_BASE); PSB_WSGX32(0x30000000, PSB_CR_BIF_3D_REQ_BASE);
acpi_video_register(); acpi_video_register();
if (dev_priv->opregion.lid_state)
psb_lid_timer_init(dev_priv);
ret = drm_vblank_init(dev, dev_priv->num_pipe); ret = drm_vblank_init(dev, dev_priv->num_pipe);
if (ret) if (ret)
......
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