diff options
author | Alan Cox <alan@linux.intel.com> | 2012-07-16 12:52:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-16 12:20:33 -0400 |
commit | 166973e506231c496b4427760bcb5a9860422850 (patch) | |
tree | ba09cdbe84f3ab072addf95834e3971317d99b7f /drivers/gpu/drm/gma500 | |
parent | f507598b06ab00fb46495ccdeeb3ef9c1dc43dee (diff) |
gma500: move the ASLE enable
Otherwise we end up getting the masks wrong, can get events before we
are doing power control and other ungood things. Again this is a
regression fix where the ordering of handling was disturbed by other
work, and the user experience on some boxes is a blank screen.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/opregion.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/opregion.h | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_drv.c | 1 |
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/drm/gma500/opregion.c b/drivers/gpu/drm/gma500/opregion.c index 4f186eca3a30..c430bd424681 100644 --- a/drivers/gpu/drm/gma500/opregion.c +++ b/drivers/gpu/drm/gma500/opregion.c | |||
@@ -144,6 +144,8 @@ struct opregion_asle { | |||
144 | 144 | ||
145 | #define ASLE_CBLV_VALID (1<<31) | 145 | #define ASLE_CBLV_VALID (1<<31) |
146 | 146 | ||
147 | static struct psb_intel_opregion *system_opregion; | ||
148 | |||
147 | static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) | 149 | static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) |
148 | { | 150 | { |
149 | struct drm_psb_private *dev_priv = dev->dev_private; | 151 | struct drm_psb_private *dev_priv = dev->dev_private; |
@@ -205,7 +207,7 @@ void psb_intel_opregion_enable_asle(struct drm_device *dev) | |||
205 | struct drm_psb_private *dev_priv = dev->dev_private; | 207 | struct drm_psb_private *dev_priv = dev->dev_private; |
206 | struct opregion_asle *asle = dev_priv->opregion.asle; | 208 | struct opregion_asle *asle = dev_priv->opregion.asle; |
207 | 209 | ||
208 | if (asle) { | 210 | if (asle && system_opregion ) { |
209 | /* Don't do this on Medfield or other non PC like devices, they | 211 | /* Don't do this on Medfield or other non PC like devices, they |
210 | use the bit for something different altogether */ | 212 | use the bit for something different altogether */ |
211 | psb_enable_pipestat(dev_priv, 0, PIPE_LEGACY_BLC_EVENT_ENABLE); | 213 | psb_enable_pipestat(dev_priv, 0, PIPE_LEGACY_BLC_EVENT_ENABLE); |
@@ -221,7 +223,6 @@ void psb_intel_opregion_enable_asle(struct drm_device *dev) | |||
221 | #define ACPI_EV_LID (1<<1) | 223 | #define ACPI_EV_LID (1<<1) |
222 | #define ACPI_EV_DOCK (1<<2) | 224 | #define ACPI_EV_DOCK (1<<2) |
223 | 225 | ||
224 | static struct psb_intel_opregion *system_opregion; | ||
225 | 226 | ||
226 | static int psb_intel_opregion_video_event(struct notifier_block *nb, | 227 | static int psb_intel_opregion_video_event(struct notifier_block *nb, |
227 | unsigned long val, void *data) | 228 | unsigned long val, void *data) |
@@ -266,9 +267,6 @@ void psb_intel_opregion_init(struct drm_device *dev) | |||
266 | system_opregion = opregion; | 267 | system_opregion = opregion; |
267 | register_acpi_notifier(&psb_intel_opregion_notifier); | 268 | register_acpi_notifier(&psb_intel_opregion_notifier); |
268 | } | 269 | } |
269 | |||
270 | if (opregion->asle) | ||
271 | psb_intel_opregion_enable_asle(dev); | ||
272 | } | 270 | } |
273 | 271 | ||
274 | void psb_intel_opregion_fini(struct drm_device *dev) | 272 | void psb_intel_opregion_fini(struct drm_device *dev) |
diff --git a/drivers/gpu/drm/gma500/opregion.h b/drivers/gpu/drm/gma500/opregion.h index 72dc6b921265..4a90f8b0e16c 100644 --- a/drivers/gpu/drm/gma500/opregion.h +++ b/drivers/gpu/drm/gma500/opregion.h | |||
@@ -27,6 +27,7 @@ extern void psb_intel_opregion_asle_intr(struct drm_device *dev); | |||
27 | extern void psb_intel_opregion_init(struct drm_device *dev); | 27 | extern void psb_intel_opregion_init(struct drm_device *dev); |
28 | extern void psb_intel_opregion_fini(struct drm_device *dev); | 28 | extern void psb_intel_opregion_fini(struct drm_device *dev); |
29 | extern int psb_intel_opregion_setup(struct drm_device *dev); | 29 | extern int psb_intel_opregion_setup(struct drm_device *dev); |
30 | extern void psb_intel_opregion_enable_asle(struct drm_device *dev); | ||
30 | 31 | ||
31 | #else | 32 | #else |
32 | 33 | ||
@@ -46,4 +47,8 @@ extern inline int psb_intel_opregion_setup(struct drm_device *dev) | |||
46 | { | 47 | { |
47 | return 0; | 48 | return 0; |
48 | } | 49 | } |
50 | |||
51 | extern inline void psb_intel_opregion_enable_asle(struct drm_device *dev) | ||
52 | { | ||
53 | } | ||
49 | #endif | 54 | #endif |
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index caba6e08693c..a8858a907f47 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c | |||
@@ -374,6 +374,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset) | |||
374 | 374 | ||
375 | if (ret) | 375 | if (ret) |
376 | return ret; | 376 | return ret; |
377 | psb_intel_opregion_enable_asle(dev); | ||
377 | #if 0 | 378 | #if 0 |
378 | /*enable runtime pm at last*/ | 379 | /*enable runtime pm at last*/ |
379 | pm_runtime_enable(&dev->pdev->dev); | 380 | pm_runtime_enable(&dev->pdev->dev); |