Commit 403dc5e8 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Use int for calculating vline start

We are not sure these calculations will never need negative numbers. Use
signed integers and warn and cap at 0 if this ever happens.
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 34ff9370
...@@ -96,10 +96,10 @@ static void optc1_disable_stereo(struct timing_generator *optc) ...@@ -96,10 +96,10 @@ static void optc1_disable_stereo(struct timing_generator *optc)
static uint32_t get_start_vline(struct timing_generator *optc, const struct dc_crtc_timing *dc_crtc_timing) static uint32_t get_start_vline(struct timing_generator *optc, const struct dc_crtc_timing *dc_crtc_timing)
{ {
struct dc_crtc_timing patched_crtc_timing; struct dc_crtc_timing patched_crtc_timing;
uint32_t vesa_sync_start; int vesa_sync_start;
uint32_t asic_blank_end; int asic_blank_end;
uint32_t interlace_factor; int interlace_factor;
uint32_t vertical_line_start; int vertical_line_start;
patched_crtc_timing = *dc_crtc_timing; patched_crtc_timing = *dc_crtc_timing;
optc1_apply_front_porch_workaround(optc, &patched_crtc_timing); optc1_apply_front_porch_workaround(optc, &patched_crtc_timing);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment