[gma500] Fix screen blackouts
Guillaume Clément
gclement at baobob.org
Fri Apr 20 15:12:08 PDT 2012
Hello,
Since linux-3.3 I have been experiencing screen "blackouts" with the
gma500_gfx driver. My laptop display would turn off and on again frequently.
After activating the drm.debug=255 kernel option, the logs showed this during
the blackout :
[ 166.940676] [drm:psb_intel_sdvo_read_response], SDVOB: R: (Target not
specified)... failed
It appears that, for some reason, psb_intel_sdvo_read_reponse fails with
status "Target not specified" during the polling for outputs. The driver then
assumes the DPMS output is to be turned off and does so. Then the DPMS display
is turned on again at the next poll.
The staging driver (which worked with my card) called psb_intel_sdvo_read_byte
until the status is successful. Now the driver fails if one of the returned
status is neither pending nor success.
It looks my card can return "target not specified" instead of pending. By
considering "target not specified" like pending and waiting for another byte,
everything works fine again.
To sum things up :
Some Poulsbo cards seem to incorrectly report
SDVO_CMD_STATUS_TARGET_NOT_SPECIFIED instead of SDVO_CMD_STATUS_PENDING which
causes the display to be turned off.
Signed-by: Guillaume Clement <gclement at baobob.org>
Acked-by: Alan Cox <alan at linux.intel.com>
---
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index 36330ca..b3858bc 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -498,7 +498,9 @@ static bool psb_intel_sdvo_read_response(struct
psb_intel_sdvo *psb_intel_sdvo,
&status))
goto log_fail;
- while (status == SDVO_CMD_STATUS_PENDING && retry--) {
+ while ((status == SDVO_CMD_STATUS_PENDING
+ || status == SDVO_CMD_STATUS_TARGET_NOT_SPECIFIED)
+ && retry--) {
udelay(15);
if (!psb_intel_sdvo_read_byte(psb_intel_sdvo,
SDVO_I2C_CMD_STATUS,
More information about the dri-devel
mailing list