Commit 0ec80d64 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: fix typos in disabled vbios code

6xx/7xx was hitting the wrong BUS_CNTL reg and bits.
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 150f8815
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
#define R600_HDP_NONSURFACE_BASE 0x2c04 #define R600_HDP_NONSURFACE_BASE 0x2c04
#define R600_BUS_CNTL 0x5420 #define R600_BUS_CNTL 0x5420
# define R600_BIOS_ROM_DIS (1 << 1)
#define R600_CONFIG_CNTL 0x5424 #define R600_CONFIG_CNTL 0x5424
#define R600_CONFIG_MEMSIZE 0x5428 #define R600_CONFIG_MEMSIZE 0x5428
#define R600_CONFIG_F0_BASE 0x542C #define R600_CONFIG_F0_BASE 0x542C
......
...@@ -130,6 +130,7 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev) ...@@ -130,6 +130,7 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev)
} }
return true; return true;
} }
static bool r700_read_disabled_bios(struct radeon_device *rdev) static bool r700_read_disabled_bios(struct radeon_device *rdev)
{ {
uint32_t viph_control; uint32_t viph_control;
...@@ -143,7 +144,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev) ...@@ -143,7 +144,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev)
bool r; bool r;
viph_control = RREG32(RADEON_VIPH_CONTROL); viph_control = RREG32(RADEON_VIPH_CONTROL);
bus_cntl = RREG32(RADEON_BUS_CNTL); bus_cntl = RREG32(R600_BUS_CNTL);
d1vga_control = RREG32(AVIVO_D1VGA_CONTROL); d1vga_control = RREG32(AVIVO_D1VGA_CONTROL);
d2vga_control = RREG32(AVIVO_D2VGA_CONTROL); d2vga_control = RREG32(AVIVO_D2VGA_CONTROL);
vga_render_control = RREG32(AVIVO_VGA_RENDER_CONTROL); vga_render_control = RREG32(AVIVO_VGA_RENDER_CONTROL);
...@@ -152,7 +153,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev) ...@@ -152,7 +153,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev)
/* disable VIP */ /* disable VIP */
WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN)); WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN));
/* enable the rom */ /* enable the rom */
WREG32(RADEON_BUS_CNTL, (bus_cntl & ~RADEON_BUS_BIOS_DIS_ROM)); WREG32(R600_BUS_CNTL, (bus_cntl & ~R600_BIOS_ROM_DIS));
/* Disable VGA mode */ /* Disable VGA mode */
WREG32(AVIVO_D1VGA_CONTROL, WREG32(AVIVO_D1VGA_CONTROL,
(d1vga_control & ~(AVIVO_DVGA_CONTROL_MODE_ENABLE | (d1vga_control & ~(AVIVO_DVGA_CONTROL_MODE_ENABLE |
...@@ -191,7 +192,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev) ...@@ -191,7 +192,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev)
cg_spll_status = RREG32(R600_CG_SPLL_STATUS); cg_spll_status = RREG32(R600_CG_SPLL_STATUS);
} }
WREG32(RADEON_VIPH_CONTROL, viph_control); WREG32(RADEON_VIPH_CONTROL, viph_control);
WREG32(RADEON_BUS_CNTL, bus_cntl); WREG32(R600_BUS_CNTL, bus_cntl);
WREG32(AVIVO_D1VGA_CONTROL, d1vga_control); WREG32(AVIVO_D1VGA_CONTROL, d1vga_control);
WREG32(AVIVO_D2VGA_CONTROL, d2vga_control); WREG32(AVIVO_D2VGA_CONTROL, d2vga_control);
WREG32(AVIVO_VGA_RENDER_CONTROL, vga_render_control); WREG32(AVIVO_VGA_RENDER_CONTROL, vga_render_control);
...@@ -216,7 +217,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev) ...@@ -216,7 +217,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev)
bool r; bool r;
viph_control = RREG32(RADEON_VIPH_CONTROL); viph_control = RREG32(RADEON_VIPH_CONTROL);
bus_cntl = RREG32(RADEON_BUS_CNTL); bus_cntl = RREG32(R600_BUS_CNTL);
d1vga_control = RREG32(AVIVO_D1VGA_CONTROL); d1vga_control = RREG32(AVIVO_D1VGA_CONTROL);
d2vga_control = RREG32(AVIVO_D2VGA_CONTROL); d2vga_control = RREG32(AVIVO_D2VGA_CONTROL);
vga_render_control = RREG32(AVIVO_VGA_RENDER_CONTROL); vga_render_control = RREG32(AVIVO_VGA_RENDER_CONTROL);
...@@ -231,7 +232,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev) ...@@ -231,7 +232,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev)
/* disable VIP */ /* disable VIP */
WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN)); WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN));
/* enable the rom */ /* enable the rom */
WREG32(RADEON_BUS_CNTL, (bus_cntl & ~RADEON_BUS_BIOS_DIS_ROM)); WREG32(R600_BUS_CNTL, (bus_cntl & ~R600_BIOS_ROM_DIS));
/* Disable VGA mode */ /* Disable VGA mode */
WREG32(AVIVO_D1VGA_CONTROL, WREG32(AVIVO_D1VGA_CONTROL,
(d1vga_control & ~(AVIVO_DVGA_CONTROL_MODE_ENABLE | (d1vga_control & ~(AVIVO_DVGA_CONTROL_MODE_ENABLE |
...@@ -262,7 +263,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev) ...@@ -262,7 +263,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev)
/* restore regs */ /* restore regs */
WREG32(RADEON_VIPH_CONTROL, viph_control); WREG32(RADEON_VIPH_CONTROL, viph_control);
WREG32(RADEON_BUS_CNTL, bus_cntl); WREG32(R600_BUS_CNTL, bus_cntl);
WREG32(AVIVO_D1VGA_CONTROL, d1vga_control); WREG32(AVIVO_D1VGA_CONTROL, d1vga_control);
WREG32(AVIVO_D2VGA_CONTROL, d2vga_control); WREG32(AVIVO_D2VGA_CONTROL, d2vga_control);
WREG32(AVIVO_VGA_RENDER_CONTROL, vga_render_control); WREG32(AVIVO_VGA_RENDER_CONTROL, vga_render_control);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment