summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_atombios.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-04-22 15:59:01 +0200
committerAlex Deucher <alexander.deucher@amd.com>2013-04-24 00:04:00 +0200
commitf4a2596cecfcfce1e0ac1df5a1603f7bf392c122 (patch)
tree8ae386d4a081e0587bf8787715bad31da553efbc /drivers/gpu/drm/radeon/radeon_atombios.c
parentdrm/radeon: fix up audio dto programming for DCE2 (diff)
downloadlinux-f4a2596cecfcfce1e0ac1df5a1603f7bf392c122.tar.xz
linux-f4a2596cecfcfce1e0ac1df5a1603f7bf392c122.zip
drm/radeon: fix endian bugs in radeon_atom_get_clock_dividers() (v3)
v2: fix copy paste typo. v3: clarify new union member Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 8c1779cba1f3..0dd87c0e0fac 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -2710,8 +2710,7 @@ int radeon_atom_get_clock_dividers(struct radeon_device *rdev,
dividers->enable_post_div = (dividers->fb_div & 1) ? true : false;
} else {
if (clock_type == COMPUTE_ENGINE_PLL_PARAM) {
- args.v3.ulClock.ulComputeClockFlag = clock_type;
- args.v3.ulClock.ulClockFreq = cpu_to_le32(clock); /* 10 khz */
+ args.v3.ulClockParams = cpu_to_le32((clock_type << 24) | clock);
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
@@ -2726,8 +2725,7 @@ int radeon_atom_get_clock_dividers(struct radeon_device *rdev,
dividers->vco_mode = (args.v3.ucCntlFlag &
ATOM_PLL_CNTL_FLAG_MPLL_VCO_MODE) ? 1 : 0;
} else {
- args.v5.ulClock.ulComputeClockFlag = clock_type;
- args.v5.ulClock.ulClockFreq = cpu_to_le32(clock); /* 10 khz */
+ args.v5.ulClockParams = cpu_to_le32((clock_type << 24) | clock);
if (strobe_mode)
args.v5.ucInputFlag = ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN;