提交 48fa04c3 编写于 作者: A Andre Heider 提交者: Alex Deucher

drm/radeon/dpm/atom: restructure logic to work around a compiler bug

It seems gcc 4.8.1 generates bogus code for the old logic causing
part of the function to get skipped.

Fixes:
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=66945Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 77c7d50a
...@@ -3703,8 +3703,9 @@ int radeon_atom_init_mc_reg_table(struct radeon_device *rdev, ...@@ -3703,8 +3703,9 @@ int radeon_atom_init_mc_reg_table(struct radeon_device *rdev,
sizeof(ATOM_INIT_REG_INDEX_FORMAT)) - 1; sizeof(ATOM_INIT_REG_INDEX_FORMAT)) - 1;
if (num_entries > VBIOS_MC_REGISTER_ARRAY_SIZE) if (num_entries > VBIOS_MC_REGISTER_ARRAY_SIZE)
return -EINVAL; return -EINVAL;
while (!(reg_block->asRegIndexBuf[i].ucPreRegDataLength & ACCESS_PLACEHOLDER) && while (i < num_entries) {
(i < num_entries)) { if (reg_block->asRegIndexBuf[i].ucPreRegDataLength & ACCESS_PLACEHOLDER)
break;
reg_table->mc_reg_address[i].s1 = reg_table->mc_reg_address[i].s1 =
(u16)(le16_to_cpu(reg_block->asRegIndexBuf[i].usRegIndex)); (u16)(le16_to_cpu(reg_block->asRegIndexBuf[i].usRegIndex));
reg_table->mc_reg_address[i].pre_reg_data = reg_table->mc_reg_address[i].pre_reg_data =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册