Commit a0b8f0c3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Tim Gardner

drm/amd/powerplay: precedence bug in init_non_clock_fields()

BugLink: http://bugs.launchpad.net/bugs/1546572

The cast to uint8_t happens before the right shift so this always sets
.m3arb to zero.  The cast is actually a no-op so we can remove it.

Fixes: 3bace359 ('drm/amd/powerplay: add hardware manager sub-component')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7c9574f2)
Signed-off-by: default avatarAlberto Milone <alberto.milone@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 924f2663
......@@ -735,7 +735,7 @@ static int init_non_clock_fields(struct pp_hwmgr *hwmgr,
ps->memory.dllOff = (0 != tmp);
ps->memory.m3arb = (uint8_t)(le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
ps->memory.m3arb = (le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
ATOM_PPLIB_M3ARB_MASK) >> ATOM_PPLIB_M3ARB_SHIFT;
ps->temperatures.min = PP_TEMPERATURE_UNITS_PER_CENTIGRADES *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment