[1/3] drm/amd/display: Fix an erroneous sanity check in get_dmif_switch_time_us()
Commit Message
It is likely that there is a typo in the sanity check for 'v_total'.
If it is 0, then 'pixels_per_frame' will also be 0, and in this case,
we also return 'single_frame_time_multiplier * min_single_frame_time_us'.
So test for !v_total which looks much more logical.
Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -683,7 +683,7 @@ static uint32_t get_dmif_switch_time_us(
/*return double of frame time*/
const uint32_t single_frame_time_multiplier = 2;
- if (!h_total || v_total || !pix_clk_khz)
+ if (!h_total || !v_total || !pix_clk_khz)
return single_frame_time_multiplier * min_single_frame_time_us;
/*TODO: should we use pixel format normalized pixel clock here?*/