summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-07-01 13:33:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-07-01 15:46:49 -0400
commit4da18e26e0cc2387597ff57ac33df1bc6369fbed (patch)
tree3e40db7fd6c55c1e63a68714c5b8b70603618819 /drivers/gpu/drm/radeon
parent5c7524bf068ebe077254a6c37fcfa27e6cb6a1f3 (diff)
downloadblackbird-op-linux-4da18e26e0cc2387597ff57ac33df1bc6369fbed.tar.gz
blackbird-op-linux-4da18e26e0cc2387597ff57ac33df1bc6369fbed.zip
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 <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c3
1 files changed, 2 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud