Skip to content

Commit

Permalink
drm/radeon: fix typo in radeon_atom_init_mc_reg_table()
Browse files Browse the repository at this point in the history
Bad pointer math.  Fixes hangs in state transitions with
BTC+ asics.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Alex Deucher committed Jul 1, 2013
1 parent 5c7524b commit 4da18e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/radeon/radeon_atombios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4da18e2

Please sign in to comment.