drm/amd/powerplay: input check for unsupported message/clock index
authorEvan Quan <evan.quan@amd.com>
Thu, 11 Jul 2019 06:36:44 +0000 (14:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jul 2019 19:18:07 +0000 (14:18 -0500)
commitc06403045aad6ae2edd935f6309e0c72e118c6de
tree38d42c132773b848505c4c80ff2edfc30a4ac18a
parent7e01a2ec96bf8a149c5e83d0352cf6ea286275cf
drm/amd/powerplay: input check for unsupported message/clock index

This can avoid them to be handled in a wrong way without notice.
Since not all SMU messages/clocks are supported on every SMU11 ASIC.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
drivers/gpu/drm/amd/powerplay/navi10_ppt.c
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
drivers/gpu/drm/amd/powerplay/vega20_ppt.c