aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-02-02 19:46:06 -0500
committerDave Airlie <airlied@redhat.com>2011-02-03 18:46:30 -0500
commit87364760de5d631390c478fcbac8db1b926e0adf (patch)
tree176b18953a32d7709474872623a58c9a25d3011f
parenta70b95c017e8b518e1e069853355e4e497453dbb (diff)
drm/radeon/kms: fix s/r issues with bios scratch regs
The accelerate mode bit gets checked by certain atom command tables to set up some register state. It needs to be clear when setting modes and set when not. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=26942 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 4dc9c518c2fe..b64e6034b45f 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -2609,7 +2609,7 @@ void radeon_atom_initialize_bios_scratch_regs(struct drm_device *dev)
2609 bios_2_scratch &= ~ATOM_S2_VRI_BRIGHT_ENABLE; 2609 bios_2_scratch &= ~ATOM_S2_VRI_BRIGHT_ENABLE;
2610 2610
2611 /* tell the bios not to handle mode switching */ 2611 /* tell the bios not to handle mode switching */
2612 bios_6_scratch |= (ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH | ATOM_S6_ACC_MODE); 2612 bios_6_scratch |= ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH;
2613 2613
2614 if (rdev->family >= CHIP_R600) { 2614 if (rdev->family >= CHIP_R600) {
2615 WREG32(R600_BIOS_2_SCRATCH, bios_2_scratch); 2615 WREG32(R600_BIOS_2_SCRATCH, bios_2_scratch);
@@ -2660,10 +2660,13 @@ void radeon_atom_output_lock(struct drm_encoder *encoder, bool lock)
2660 else 2660 else
2661 bios_6_scratch = RREG32(RADEON_BIOS_6_SCRATCH); 2661 bios_6_scratch = RREG32(RADEON_BIOS_6_SCRATCH);
2662 2662
2663 if (lock) 2663 if (lock) {
2664 bios_6_scratch |= ATOM_S6_CRITICAL_STATE; 2664 bios_6_scratch |= ATOM_S6_CRITICAL_STATE;
2665 else 2665 bios_6_scratch &= ~ATOM_S6_ACC_MODE;
2666 } else {
2666 bios_6_scratch &= ~ATOM_S6_CRITICAL_STATE; 2667 bios_6_scratch &= ~ATOM_S6_CRITICAL_STATE;
2668 bios_6_scratch |= ATOM_S6_ACC_MODE;
2669 }
2667 2670
2668 if (rdev->family >= CHIP_R600) 2671 if (rdev->family >= CHIP_R600)
2669 WREG32(R600_BIOS_6_SCRATCH, bios_6_scratch); 2672 WREG32(R600_BIOS_6_SCRATCH, bios_6_scratch);