diff options
author | Hersen Wu <hersenxs.wu@amd.com> | 2017-01-07 00:23:18 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-27 00:09:13 +0300 |
commit | 4b5e7d620901778b24a2980bbc9941eff9b47f77 (patch) | |
tree | 3c74bf153f9cef478702cbede856eb6f8788e00e /drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | |
parent | b06b7680e341151c8c60b07ddc6f5e63e7392c17 (diff) | |
download | linux-4b5e7d620901778b24a2980bbc9941eff9b47f77.tar.xz |
drm/amd/display: set blank functionality
1. remove the sleep mechanism while set_blank true from
the timing generator.
Since Hw sequencer is the one that manages the flow
he will be responsible for wait for blanck in a critical places.
Signed-off-by: Leon Elazar <leon.elazar@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/dc/core/dc_hw_sequencer.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c index d5cffa51ca96..9f462a299ff3 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c @@ -91,3 +91,23 @@ void color_space_to_black_color( break; } } + +bool hwss_wait_for_blank_complete( + struct timing_generator *tg) +{ + int counter; + + for (counter = 0; counter < 100; counter++) { + if (tg->funcs->is_blanked(tg)) + break; + + msleep(1); + } + + if (counter == 100) { + dm_error("DC: failed to blank crtc!\n"); + return false; + } + + return true; +} |