linux/drivers/gpu/drm/amd
Leo Li d9ec5cfd5a 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>
2019-08-02 10:17:57 -05:00
..
acp treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
amdgpu drm/amdgpu: fix double ucode load by PSP(v3) 2019-08-02 10:17:34 -05:00
amdkfd drm/amdkfd: Save/restore vcc on gfx10 2019-07-30 23:48:33 -05:00
display drm/amd/display: Use switch table for dc_to_smu_clock_type 2019-08-02 10:17:57 -05:00
include drm/amd/include: add define of TCP_EDC_CNT_NEW 2019-07-31 14:50:54 -05:00
powerplay drm/amd/powerplay: sort feature status index by asic feature id for smu 2019-08-02 10:17:05 -05:00