drm/radeon/kms: fix typos in disabled vbios code
6xx/7xx was hitting the wrong BUS_CNTL reg and bits. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
150f8815bb
commit
0ec80d6456
|
@ -86,6 +86,7 @@
|
|||
#define R600_HDP_NONSURFACE_BASE 0x2c04
|
||||
|
||||
#define R600_BUS_CNTL 0x5420
|
||||
# define R600_BIOS_ROM_DIS (1 << 1)
|
||||
#define R600_CONFIG_CNTL 0x5424
|
||||
#define R600_CONFIG_MEMSIZE 0x5428
|
||||
#define R600_CONFIG_F0_BASE 0x542C
|
||||
|
|
|
@ -130,6 +130,7 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool r700_read_disabled_bios(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t viph_control;
|
||||
|
@ -143,7 +144,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev)
|
|||
bool r;
|
||||
|
||||
viph_control = RREG32(RADEON_VIPH_CONTROL);
|
||||
bus_cntl = RREG32(RADEON_BUS_CNTL);
|
||||
bus_cntl = RREG32(R600_BUS_CNTL);
|
||||
d1vga_control = RREG32(AVIVO_D1VGA_CONTROL);
|
||||
d2vga_control = RREG32(AVIVO_D2VGA_CONTROL);
|
||||
vga_render_control = RREG32(AVIVO_VGA_RENDER_CONTROL);
|
||||
|
@ -152,7 +153,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev)
|
|||
/* disable VIP */
|
||||
WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN));
|
||||
/* 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 */
|
||||
WREG32(AVIVO_D1VGA_CONTROL,
|
||||
(d1vga_control & ~(AVIVO_DVGA_CONTROL_MODE_ENABLE |
|
||||
|
@ -191,7 +192,7 @@ static bool r700_read_disabled_bios(struct radeon_device *rdev)
|
|||
cg_spll_status = RREG32(R600_CG_SPLL_STATUS);
|
||||
}
|
||||
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_D2VGA_CONTROL, d2vga_control);
|
||||
WREG32(AVIVO_VGA_RENDER_CONTROL, vga_render_control);
|
||||
|
@ -216,7 +217,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev)
|
|||
bool r;
|
||||
|
||||
viph_control = RREG32(RADEON_VIPH_CONTROL);
|
||||
bus_cntl = RREG32(RADEON_BUS_CNTL);
|
||||
bus_cntl = RREG32(R600_BUS_CNTL);
|
||||
d1vga_control = RREG32(AVIVO_D1VGA_CONTROL);
|
||||
d2vga_control = RREG32(AVIVO_D2VGA_CONTROL);
|
||||
vga_render_control = RREG32(AVIVO_VGA_RENDER_CONTROL);
|
||||
|
@ -231,7 +232,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev)
|
|||
/* disable VIP */
|
||||
WREG32(RADEON_VIPH_CONTROL, (viph_control & ~RADEON_VIPH_EN));
|
||||
/* 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 */
|
||||
WREG32(AVIVO_D1VGA_CONTROL,
|
||||
(d1vga_control & ~(AVIVO_DVGA_CONTROL_MODE_ENABLE |
|
||||
|
@ -262,7 +263,7 @@ static bool r600_read_disabled_bios(struct radeon_device *rdev)
|
|||
|
||||
/* restore regs */
|
||||
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_D2VGA_CONTROL, d2vga_control);
|
||||
WREG32(AVIVO_VGA_RENDER_CONTROL, vga_render_control);
|
||||
|
|
Loading…
Reference in New Issue