aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
diff options
context:
space:
mode:
authorSylvain Rochet <sylvain.rochet@finsecur.com>2015-03-12 19:47:19 +0100
committerBoris Brezillon <boris.brezillon@free-electrons.com>2015-03-16 16:10:42 +0100
commitf026eb6e031f704fad991fdeb76c40d7c4a301bd (patch)
tree9e757b381a444d11bbe365362d723c2cdff679d3 /drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
parentMerge tag 'topic/drm-misc-2015-03-10' of git://anongit.freedesktop.org/drm-intel into drm-next (diff)
downloadlinux-dev-f026eb6e031f704fad991fdeb76c40d7c4a301bd.tar.xz
linux-dev-f026eb6e031f704fad991fdeb76c40d7c4a301bd.zip
drm: atmel-hlcdc: use appropriate enabled flag in suspend/resume
Unfortunately we used the enabled flag in struct drm_crtc instead of the enabled flag in struct atmel_hlcdc_crtc. This obviously leads to discrepancies on crtc enable state. This patch fixes the issue by using the struct atmel_hlcdc_crtc enabled flag in PM support. Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c')
-rw-r--r--drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index c4bb1f9f95c6..60b0c13d7ff5 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -569,14 +569,8 @@ static int atmel_hlcdc_dc_drm_suspend(struct device *dev)
return 0;
drm_modeset_lock_all(drm_dev);
- list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head) {
- struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
- if (crtc->enabled) {
- crtc_funcs->disable(crtc);
- /* save enable state for resume */
- crtc->enabled = true;
- }
- }
+ list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head)
+ atmel_hlcdc_crtc_suspend(crtc);
drm_modeset_unlock_all(drm_dev);
return 0;
}
@@ -590,13 +584,8 @@ static int atmel_hlcdc_dc_drm_resume(struct device *dev)
return 0;
drm_modeset_lock_all(drm_dev);
- list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head) {
- struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
- if (crtc->enabled) {
- crtc->enabled = false;
- crtc_funcs->enable(crtc);
- }
- }
+ list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head)
+ atmel_hlcdc_crtc_resume(crtc);
drm_modeset_unlock_all(drm_dev);
return 0;
}