diff options
| author | Leo Li <[email protected]> | 2019-07-25 17:12:24 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-08-02 15:17:57 +0000 |
| commit | d9ec5cfd5a2eca87b7c5f697ae07b5c9ae9b771f (patch) | |
| tree | 64d014186479a744d13d79d53db5435b68b40ada /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
| parent | drm/amd/display: Use proper enum conversion functions (diff) | |
| download | kernel-d9ec5cfd5a2eca87b7c5f697ae07b5c9ae9b771f.tar.gz kernel-d9ec5cfd5a2eca87b7c5f697ae07b5c9ae9b771f.zip | |
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 <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
0 files changed, 0 insertions, 0 deletions
