diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-12-04 10:40:41 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-07 17:50:54 -0500 |
commit | 6b02af1c1f35550ce1a9873841fe9c50b1613591 (patch) | |
tree | d89b6ba88e8c948b27bce156941fa19efce319c7 | |
parent | 64bffd03756249e11b8651ccf33ac3a50a93ed4c (diff) |
drm/radeon/kms/legacy: set overscan regs on modeset
These can end up with garbage otherwise.
fixes rh bug 537140
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_reg.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 4a5f2d36efe6..1058ed0d373f 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c | |||
@@ -30,6 +30,18 @@ | |||
30 | #include "radeon.h" | 30 | #include "radeon.h" |
31 | #include "atom.h" | 31 | #include "atom.h" |
32 | 32 | ||
33 | static void radeon_overscan_setup(struct drm_crtc *crtc, | ||
34 | struct drm_display_mode *mode) | ||
35 | { | ||
36 | struct drm_device *dev = crtc->dev; | ||
37 | struct radeon_device *rdev = dev->dev_private; | ||
38 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); | ||
39 | |||
40 | WREG32(RADEON_OVR_CLR + radeon_crtc->crtc_offset, 0); | ||
41 | WREG32(RADEON_OVR_WID_LEFT_RIGHT + radeon_crtc->crtc_offset, 0); | ||
42 | WREG32(RADEON_OVR_WID_TOP_BOTTOM + radeon_crtc->crtc_offset, 0); | ||
43 | } | ||
44 | |||
33 | static void radeon_legacy_rmx_mode_set(struct drm_crtc *crtc, | 45 | static void radeon_legacy_rmx_mode_set(struct drm_crtc *crtc, |
34 | struct drm_display_mode *mode, | 46 | struct drm_display_mode *mode, |
35 | struct drm_display_mode *adjusted_mode) | 47 | struct drm_display_mode *adjusted_mode) |
@@ -1045,6 +1057,7 @@ static int radeon_crtc_mode_set(struct drm_crtc *crtc, | |||
1045 | radeon_crtc_set_base(crtc, x, y, old_fb); | 1057 | radeon_crtc_set_base(crtc, x, y, old_fb); |
1046 | radeon_set_crtc_timing(crtc, adjusted_mode); | 1058 | radeon_set_crtc_timing(crtc, adjusted_mode); |
1047 | radeon_set_pll(crtc, adjusted_mode); | 1059 | radeon_set_pll(crtc, adjusted_mode); |
1060 | radeon_overscan_setup(crtc, adjusted_mode); | ||
1048 | if (radeon_crtc->crtc_id == 0) { | 1061 | if (radeon_crtc->crtc_id == 0) { |
1049 | radeon_legacy_rmx_mode_set(crtc, mode, adjusted_mode); | 1062 | radeon_legacy_rmx_mode_set(crtc, mode, adjusted_mode); |
1050 | } else { | 1063 | } else { |
diff --git a/drivers/gpu/drm/radeon/radeon_reg.h b/drivers/gpu/drm/radeon/radeon_reg.h index 34ba06dba899..c4c41c8d908c 100644 --- a/drivers/gpu/drm/radeon/radeon_reg.h +++ b/drivers/gpu/drm/radeon/radeon_reg.h | |||
@@ -1366,6 +1366,9 @@ | |||
1366 | #define RADEON_OVR_CLR 0x0230 | 1366 | #define RADEON_OVR_CLR 0x0230 |
1367 | #define RADEON_OVR_WID_LEFT_RIGHT 0x0234 | 1367 | #define RADEON_OVR_WID_LEFT_RIGHT 0x0234 |
1368 | #define RADEON_OVR_WID_TOP_BOTTOM 0x0238 | 1368 | #define RADEON_OVR_WID_TOP_BOTTOM 0x0238 |
1369 | #define RADEON_OVR2_CLR 0x0330 | ||
1370 | #define RADEON_OVR2_WID_LEFT_RIGHT 0x0334 | ||
1371 | #define RADEON_OVR2_WID_TOP_BOTTOM 0x0338 | ||
1369 | 1372 | ||
1370 | /* first capture unit */ | 1373 | /* first capture unit */ |
1371 | 1374 | ||