drm/amd/display: Fix issue with VLine interrupt not firing
authorKrunoslav Kovac <Krunoslav.Kovac@amd.com>
Tue, 13 Nov 2018 20:32:24 +0000 (15:32 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Jan 2019 20:04:34 +0000 (15:04 -0500)
commitef32bc1c751694743703ff150b270bbcf8ad4de2
tree3d44d983545cb523d96cfe144e517bb3576d45c6
parentebd084cd6509313307bc3b8fd9695f65aee8ff96
drm/amd/display: Fix issue with VLine interrupt not firing

[Why]
We are not correctly handling the wrap around case.
VLine interrupt is relative to position of VUpdate interrupt.

Both VUpdate interrupt and VLine interrupt could possibly
be in front porch or back porch.

[How]
Fix wraparound case by checking for line number that is
greater than the VTOTAL of the OTG timing. In this case,
the interrupt should occur on the next frame.

Also fix some variable naming and remove some dead code.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c