aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
diff options
context:
space:
mode:
authorPierre Ossman <pierre@ossman.eu>2009-11-30 15:15:44 -0500
committerDave Airlie <airlied@redhat.com>2009-12-01 20:37:13 -0500
commitec51efa9b2b8ff10b535a853c293e85bada886e4 (patch)
tree719dea94c066194a06041bdf1ca0e458347c0b54 /drivers/gpu/drm/radeon/radeon_legacy_crtc.c
parent32f48ffea91008a27b99aab7a68a3443559d83fb (diff)
drm/radeon/kms: Disable both CRTCs during mode switch
Reconfiguring one CRTC whilst another is running can cause a hang under some circumstances. Unfortunately we haven't pinpointed exactly what those circumstances are, so disable all CRTCs for every mode switch. Signed-off-by: Pierre Ossman <pierre@ossman.eu> Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_legacy_crtc.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_legacy_crtc.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
index 5794364ff857..6634769c9ac2 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
@@ -1047,12 +1047,29 @@ static int radeon_crtc_mode_set(struct drm_crtc *crtc,
1047 1047
1048static void radeon_crtc_prepare(struct drm_crtc *crtc) 1048static void radeon_crtc_prepare(struct drm_crtc *crtc)
1049{ 1049{
1050 radeon_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); 1050 struct drm_device *dev = crtc->dev;
1051 struct drm_crtc *crtci;
1052
1053 /*
1054 * The hardware wedges sometimes if you reconfigure one CRTC
1055 * whilst another is running (see fdo bug #24611).
1056 */
1057 list_for_each_entry(crtci, &dev->mode_config.crtc_list, head)
1058 radeon_crtc_dpms(crtci, DRM_MODE_DPMS_OFF);
1051} 1059}
1052 1060
1053static void radeon_crtc_commit(struct drm_crtc *crtc) 1061static void radeon_crtc_commit(struct drm_crtc *crtc)
1054{ 1062{
1055 radeon_crtc_dpms(crtc, DRM_MODE_DPMS_ON); 1063 struct drm_device *dev = crtc->dev;
1064 struct drm_crtc *crtci;
1065
1066 /*
1067 * Reenable the CRTCs that should be running.
1068 */
1069 list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) {
1070 if (crtci->enabled)
1071 radeon_crtc_dpms(crtci, DRM_MODE_DPMS_ON);
1072 }
1056} 1073}
1057 1074
1058static const struct drm_crtc_helper_funcs legacy_helper_funcs = { 1075static const struct drm_crtc_helper_funcs legacy_helper_funcs = {