diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-12-04 10:55:12 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-07 17:51:12 -0500 |
commit | 92cde00cbaf3236ef7ea9bd4f0b43c8c4a3f507f (patch) | |
tree | 022c274b9295c3191e2c63060bb1dafa435e49cc /drivers | |
parent | 6b02af1c1f35550ce1a9873841fe9c50b1613591 (diff) |
drm/radeon/kms/legacy: set common regs to sane value
The DDX and radeonfb always set these regs to a sane value.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r420.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 9b2ac9d69c0f..109096802e66 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -1675,6 +1675,17 @@ int r100_gpu_reset(struct radeon_device *rdev) | |||
1675 | return 0; | 1675 | return 0; |
1676 | } | 1676 | } |
1677 | 1677 | ||
1678 | void r100_set_common_regs(struct radeon_device *rdev) | ||
1679 | { | ||
1680 | /* set these so they don't interfere with anything */ | ||
1681 | WREG32(RADEON_OV0_SCALE_CNTL, 0); | ||
1682 | WREG32(RADEON_SUBPIC_CNTL, 0); | ||
1683 | WREG32(RADEON_VIPH_CONTROL, 0); | ||
1684 | WREG32(RADEON_I2C_CNTL_1, 0); | ||
1685 | WREG32(RADEON_DVI_I2C_CNTL_1, 0); | ||
1686 | WREG32(RADEON_CAP0_TRIG_CNTL, 0); | ||
1687 | WREG32(RADEON_CAP1_TRIG_CNTL, 0); | ||
1688 | } | ||
1678 | 1689 | ||
1679 | /* | 1690 | /* |
1680 | * VRAM info | 1691 | * VRAM info |
@@ -3129,6 +3140,9 @@ static int r100_startup(struct radeon_device *rdev) | |||
3129 | { | 3140 | { |
3130 | int r; | 3141 | int r; |
3131 | 3142 | ||
3143 | /* set common regs */ | ||
3144 | r100_set_common_regs(rdev); | ||
3145 | /* program mc */ | ||
3132 | r100_mc_program(rdev); | 3146 | r100_mc_program(rdev); |
3133 | /* Resume clock */ | 3147 | /* Resume clock */ |
3134 | r100_clock_startup(rdev); | 3148 | r100_clock_startup(rdev); |
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index b3d1d8b9df92..86065dcc1982 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -1186,6 +1186,9 @@ static int r300_startup(struct radeon_device *rdev) | |||
1186 | { | 1186 | { |
1187 | int r; | 1187 | int r; |
1188 | 1188 | ||
1189 | /* set common regs */ | ||
1190 | r100_set_common_regs(rdev); | ||
1191 | /* program mc */ | ||
1189 | r300_mc_program(rdev); | 1192 | r300_mc_program(rdev); |
1190 | /* Resume clock */ | 1193 | /* Resume clock */ |
1191 | r300_clock_startup(rdev); | 1194 | r300_clock_startup(rdev); |
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index d72f0439b2fa..162c3902fe69 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c | |||
@@ -169,6 +169,9 @@ static int r420_startup(struct radeon_device *rdev) | |||
169 | { | 169 | { |
170 | int r; | 170 | int r; |
171 | 171 | ||
172 | /* set common regs */ | ||
173 | r100_set_common_regs(rdev); | ||
174 | /* program mc */ | ||
172 | r300_mc_program(rdev); | 175 | r300_mc_program(rdev); |
173 | /* Resume clock */ | 176 | /* Resume clock */ |
174 | r420_clock_resume(rdev); | 177 | r420_clock_resume(rdev); |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 92bebc0f4814..f3deb4982b2d 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1046,6 +1046,7 @@ extern int r100_cs_packet_parse(struct radeon_cs_parser *p, | |||
1046 | struct radeon_cs_packet *pkt, | 1046 | struct radeon_cs_packet *pkt, |
1047 | unsigned idx); | 1047 | unsigned idx); |
1048 | extern void r100_enable_bm(struct radeon_device *rdev); | 1048 | extern void r100_enable_bm(struct radeon_device *rdev); |
1049 | extern void r100_set_common_regs(struct radeon_device *rdev); | ||
1049 | 1050 | ||
1050 | /* rv200,rv250,rv280 */ | 1051 | /* rv200,rv250,rv280 */ |
1051 | extern void r200_set_safe_registers(struct radeon_device *rdev); | 1052 | extern void r200_set_safe_registers(struct radeon_device *rdev); |