diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-11-26 09:58:36 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-01 20:37:19 -0500 |
commit | ee2215f0b269f4c460807e3f827665eb7049aa34 (patch) | |
tree | b765ba7f49915bd4461f68e1d586483cef5c4ec1 /drivers/gpu | |
parent | ed160143c6967e89aee05b0685e73c4103bb3e38 (diff) |
drm/radeon/kms: Don't overwrite crtc_gen_cntl or crtc_gen_cntl2
Don't overwritte crtc_gen_cntl or crtc_gen_cntl2 or we may loose the
cursor. This especialy happen when changing video mode. Fix bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=529146
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 6634769c9ac2..c5c5c022e8c0 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c | |||
@@ -647,12 +647,8 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod | |||
647 | uint32_t crtc2_gen_cntl; | 647 | uint32_t crtc2_gen_cntl; |
648 | uint32_t disp2_merge_cntl; | 648 | uint32_t disp2_merge_cntl; |
649 | 649 | ||
650 | /* check to see if TV DAC is enabled for another crtc and keep it enabled */ | 650 | /* if TV DAC is enabled for another crtc and keep it enabled */ |
651 | if (RREG32(RADEON_CRTC2_GEN_CNTL) & RADEON_CRTC2_CRT2_ON) | 651 | crtc2_gen_cntl = RREG32(RADEON_CRTC2_GEN_CNTL) & 0x00718080; |
652 | crtc2_gen_cntl = RADEON_CRTC2_CRT2_ON; | ||
653 | else | ||
654 | crtc2_gen_cntl = 0; | ||
655 | |||
656 | crtc2_gen_cntl |= ((format << 8) | 652 | crtc2_gen_cntl |= ((format << 8) |
657 | | RADEON_CRTC2_VSYNC_DIS | 653 | | RADEON_CRTC2_VSYNC_DIS |
658 | | RADEON_CRTC2_HSYNC_DIS | 654 | | RADEON_CRTC2_HSYNC_DIS |
@@ -681,7 +677,8 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod | |||
681 | uint32_t crtc_ext_cntl; | 677 | uint32_t crtc_ext_cntl; |
682 | uint32_t disp_merge_cntl; | 678 | uint32_t disp_merge_cntl; |
683 | 679 | ||
684 | crtc_gen_cntl = (RADEON_CRTC_EXT_DISP_EN | 680 | crtc_gen_cntl = RREG32(RADEON_CRTC_GEN_CNTL) & 0x00718000; |
681 | crtc_gen_cntl |= (RADEON_CRTC_EXT_DISP_EN | ||
685 | | (format << 8) | 682 | | (format << 8) |
686 | | RADEON_CRTC_DISP_REQ_EN_B | 683 | | RADEON_CRTC_DISP_REQ_EN_B |
687 | | ((mode->flags & DRM_MODE_FLAG_DBLSCAN) | 684 | | ((mode->flags & DRM_MODE_FLAG_DBLSCAN) |