From 4da18e26e0cc2387597ff57ac33df1bc6369fbed Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 1 Jul 2013 13:33:53 -0400 Subject: drm/radeon: fix typo in radeon_atom_init_mc_reg_table() Bad pointer math. Fixes hangs in state transitions with BTC+ asics. Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_atombios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/radeon/radeon_atombios.c') diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index dfcf74a89014..70d8687e60e0 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -3732,7 +3732,8 @@ int radeon_atom_init_mc_reg_table(struct radeon_device *rdev, } num_ranges++; } - reg_data += le16_to_cpu(reg_block->usRegDataBlkSize); + reg_data = (ATOM_MEMORY_SETTING_DATA_BLOCK *) + ((u8 *)reg_data + le16_to_cpu(reg_block->usRegDataBlkSize)); } if (*(u32 *)reg_data != END_OF_REG_DATA_BLOCK) return -EINVAL; -- cgit v1.2.3