Skip to contentSkip to conversation

drm/tilcdc: restore correct display mode and contents on pm resume

PATCH In review Felipe Balbi 2 participants 3 messages Mar 3, 2014 – Apr 24, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tilcdc: restore correct display mode and contents on pm resume

From: Darren Etheridge <[email protected]>

On resume the screen contents were not being restored properly. Looking at other DRM drivers it seems a call to drm_helper_resume_force_mode() is needed in the resume handler to force restoration of the mode and framebuffer data.

---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +7 -0
index 171a820..1a5ddfa 100644
@@ -563,6 +563,13 @@ static int tilcdc_pm_resume(struct device *dev)
 		if (registers[i].save && (priv->rev >= registers[i].rev))
 			tilcdc_write(ddev, registers[i].reg, priv->saved_register[n++]);
 
+	/*
+	 * if this call isn't here, the display is blank on return from
+	 * suspend.  With this call here the contents of the framebuffer
+	 * during suspend are restored correctly.
+	 */
+	drm_helper_resume_force_mode(ddev);
+
 	drm_kms_helper_poll_enable(ddev);
 
 	return 0;
Signature · 1 line
1.9.0
#1 lore raw
Quoted 7 lines · Felipe Balbi

From: Darren Etheridge <[email protected]>

On resume the screen contents were not being restored properly. Looking at other DRM drivers it seems a call to drm_helper_resume_force_mode() is needed in the resume handler to force restoration of the mode and framebuffer data.

ping

Quoted 30 lines
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +7 -0
index 171a820..1a5ddfa 100644
@@ -563,6 +563,13 @@ static int tilcdc_pm_resume(struct device *dev)
 		if (registers[i].save && (priv->rev >= registers[i].rev))
 			tilcdc_write(ddev, registers[i].reg, priv->saved_register[n++]);
 
+	/*
+	 * if this call isn't here, the display is blank on return from
+	 * suspend.  With this call here the contents of the framebuffer
+	 * during suspend are restored correctly.
+	 */
+	drm_helper_resume_force_mode(ddev);
+
 	drm_kms_helper_poll_enable(ddev);
 
 	return 0;
Signature · 7 lines
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Signature · 1 line
balbi
Reviewed-by on v1 1/1
#2 lore raw
In reply to Felipe Balbi
Quoted 7 lines · Felipe Balbi

From: Darren Etheridge <[email protected]>

On resume the screen contents were not being restored properly. Looking at other DRM drivers it seems a call to drm_helper_resume_force_mode() is needed in the resume handler to force restoration of the mode and framebuffer data.

Quoted 25 lines
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +7 -1
index 171a820..1a5ddfa 100644
@@ -563,6 +563,13 @@ static int tilcdc_pm_resume(struct device *dev)
                if (registers[i].save && (priv->rev >= registers[i].rev))
                        tilcdc_write(ddev, registers[i].reg, priv->saved_register[n++]);
 
+       /*
+        * if this call isn't here, the display is blank on return from
+        * suspend.  With this call here the contents of the framebuffer
+        * during suspend are restored correctly.
+        */
+       drm_helper_resume_force_mode(ddev);
+
        drm_kms_helper_poll_enable(ddev);
 
        return 0;
--

1.9.0