drm/amd/display: add sanity check for clk table from smu
authorEric Yang <Eric.Yang2@amd.com>
Thu, 3 Oct 2019 19:06:01 +0000 (15:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Oct 2019 20:29:46 +0000 (16:29 -0400)
commit2ffb174b1d9f40a702c1ca455b16a844549429cb
tree1345270c0078153d379c7b4ae62fa3027e27e278
parentbfbacdae0ab47db7f61d3dc17dee8f4a3de53f5e
drm/amd/display: add sanity check for clk table from smu

[Why]
Handle the case where we don't get a valid table. Also fixes compiler
warning for variable potentially used before assignment.

[How]
If the entire table has no valid fclk, reject the table and use our own
hard code.

Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c