summaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_bo_driver.h
diff options
context:
space:
mode:
authorLeo Li <sunpeng.li@amd.com>2019-07-25 13:12:24 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-08-02 10:17:57 -0500
commitd9ec5cfd5a2eca87b7c5f697ae07b5c9ae9b771f (patch)
tree64d014186479a744d13d79d53db5435b68b40ada /include/drm/ttm/ttm_bo_driver.h
parentd196bbbc28fab82624f7686f8b0da8e8644b6e6a (diff)
downloadlinux-d9ec5cfd5a2eca87b7c5f697ae07b5c9ae9b771f.tar.bz2
drm/amd/display: Use switch table for dc_to_smu_clock_type
Using a static int array will cause errors if the given dm_pp_clk_type is out-of-bounds. For robustness, use a switch table, with a default case to handle all invalid values. v2: 0 is a valid clock type for smu_clk_type. Return SMU_CLK_COUNT instead on invalid mapping. Signed-off-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/ttm/ttm_bo_driver.h')
0 files changed, 0 insertions, 0 deletions