diff options
author | Harry Wentland <harry.wentland@amd.com> | 2018-04-10 16:06:34 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 13:44:14 -0500 |
commit | 403dc5e8aab7b3d18a625e516698ea49d2be432e (patch) | |
tree | efb397ad060e98b250cc5ecf124bfb840a60c55e /drivers/gpu/drm/amd/display | |
parent | 34ff937029edf708d7db0d450b5f505969b68950 (diff) | |
download | linux-403dc5e8aab7b3d18a625e516698ea49d2be432e.tar.bz2 |
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: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c index 2c5dbece928e..c734b7fa5835 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c @@ -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) { struct dc_crtc_timing patched_crtc_timing; - uint32_t vesa_sync_start; - uint32_t asic_blank_end; - uint32_t interlace_factor; - uint32_t vertical_line_start; + int vesa_sync_start; + int asic_blank_end; + int interlace_factor; + int vertical_line_start; patched_crtc_timing = *dc_crtc_timing; optc1_apply_front_porch_workaround(optc, &patched_crtc_timing); |