diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-07-17 16:34:12 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-07-17 16:35:06 -0400 |
commit | f90555cbe629e14c6af1dcec1933a3833ecd321f (patch) | |
tree | e1bd27c37ffe6f65df4b0a3c2cd37328487e4a50 /drivers/gpu | |
parent | 48fa04c3fcdb4f6ac041976bedaf19ca5bee20c0 (diff) |
drm/radeon/dpm/atom: fix broken gcc harder
See bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=66932
https://bugs.freedesktop.org/show_bug.cgi?id=66972
https://bugs.freedesktop.org/show_bug.cgi?id=66945
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 9 |
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 2606ec680ae3..e3f3e8841789 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -3699,18 +3699,21 @@ int radeon_atom_init_mc_reg_table(struct radeon_device *rdev, | |||
3699 | (ATOM_MEMORY_SETTING_DATA_BLOCK *) | 3699 | (ATOM_MEMORY_SETTING_DATA_BLOCK *) |
3700 | ((u8 *)reg_block + (2 * sizeof(u16)) + | 3700 | ((u8 *)reg_block + (2 * sizeof(u16)) + |
3701 | le16_to_cpu(reg_block->usRegIndexTblSize)); | 3701 | le16_to_cpu(reg_block->usRegIndexTblSize)); |
3702 | ATOM_INIT_REG_INDEX_FORMAT *format = ®_block->asRegIndexBuf[0]; | ||
3702 | num_entries = (u8)((le16_to_cpu(reg_block->usRegIndexTblSize)) / | 3703 | num_entries = (u8)((le16_to_cpu(reg_block->usRegIndexTblSize)) / |
3703 | sizeof(ATOM_INIT_REG_INDEX_FORMAT)) - 1; | 3704 | sizeof(ATOM_INIT_REG_INDEX_FORMAT)) - 1; |
3704 | if (num_entries > VBIOS_MC_REGISTER_ARRAY_SIZE) | 3705 | if (num_entries > VBIOS_MC_REGISTER_ARRAY_SIZE) |
3705 | return -EINVAL; | 3706 | return -EINVAL; |
3706 | while (i < num_entries) { | 3707 | while (i < num_entries) { |
3707 | if (reg_block->asRegIndexBuf[i].ucPreRegDataLength & ACCESS_PLACEHOLDER) | 3708 | if (format->ucPreRegDataLength & ACCESS_PLACEHOLDER) |
3708 | break; | 3709 | break; |
3709 | reg_table->mc_reg_address[i].s1 = | 3710 | reg_table->mc_reg_address[i].s1 = |
3710 | (u16)(le16_to_cpu(reg_block->asRegIndexBuf[i].usRegIndex)); | 3711 | (u16)(le16_to_cpu(format->usRegIndex)); |
3711 | reg_table->mc_reg_address[i].pre_reg_data = | 3712 | reg_table->mc_reg_address[i].pre_reg_data = |
3712 | (u8)(reg_block->asRegIndexBuf[i].ucPreRegDataLength); | 3713 | (u8)(format->ucPreRegDataLength); |
3713 | i++; | 3714 | i++; |
3715 | format = (ATOM_INIT_REG_INDEX_FORMAT *) | ||
3716 | ((u8 *)format + sizeof(ATOM_INIT_REG_INDEX_FORMAT)); | ||
3714 | } | 3717 | } |
3715 | reg_table->last = i; | 3718 | reg_table->last = i; |
3716 | while ((*(u32 *)reg_data != END_OF_REG_DATA_BLOCK) && | 3719 | while ((*(u32 *)reg_data != END_OF_REG_DATA_BLOCK) && |