diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-07-17 16:18:52 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-07-17 20:52:47 +0200 |
commit | 1fa4252af760560f77ca3d5d360fd62df3292c7f (patch) | |
tree | 340b767af632b528347e090e8eaa6cf0485fc49f /drivers/gpu/drm/radeon/radeon_atombios.c | |
parent | drm/radeon: add a module parameter to disable aspm (diff) | |
download | linux-1fa4252af760560f77ca3d5d360fd62df3292c7f.tar.xz linux-1fa4252af760560f77ca3d5d360fd62df3292c7f.zip |
drm/radeon: fix an endian bug in atom table parsing
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_atombios.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index fbdaff55556b..0c3455a73992 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -3638,7 +3638,7 @@ int radeon_atom_get_mclk_range_table(struct radeon_device *rdev, p += le16_to_cpu(vram_module->usModuleSize); } mclk_range_table->num_entries = (u8) - ((vram_module->usModuleSize - offsetof(ATOM_VRAM_MODULE_V4, asMemTiming)) / + ((le16_to_cpu(vram_module->usModuleSize) - offsetof(ATOM_VRAM_MODULE_V4, asMemTiming)) / mem_timing_size); p = (u8 *)vram_module->asMemTiming; for (i = 0; i < mclk_range_table->num_entries; i++) { |