diff options
author | Ethan Bitnun <etbitnun@amd.com> | 2024-04-10 17:16:35 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-04-30 09:46:37 -0400 |
commit | dc2be9c68ffb2d2b960e6b1835327438b929b814 (patch) | |
tree | 98d8f4d839744f20edef29b054af5da1302a6628 /drivers/gpu/drm/amd/display/dc/dc_stream_priv.h | |
parent | ec426766a45201f14f8ac974855a9a47a39286ab (diff) | |
download | linux-dc2be9c68ffb2d2b960e6b1835327438b929b814.tar.gz linux-dc2be9c68ffb2d2b960e6b1835327438b929b814.tar.bz2 linux-dc2be9c68ffb2d2b960e6b1835327438b929b814.zip |
drm/amd/display: Block FPO According to Luminance Delta
[Description]
- Block FPO if the max stretch refresh rate is low enough
to cause a flicker by storing the maximum safe refresh
decrease from nominal in stream.
- Brought over various Freesync Luminance functions to dc. Use these
new functions to block fpo if we will flicker.
- Generalized increase/reduce dependent functions to reduce code clutter
and allow for easier use.
- Added a debug option to enable the feature. Disabled by default.
Co-authored-by: Ethan Bitnun <etbitnun@amd.com>
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Ethan Bitnun <etbitnun@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc_stream_priv.h')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_stream_priv.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream_priv.h b/drivers/gpu/drm/amd/display/dc/dc_stream_priv.h index 7476fd52ce2b..ea13804f7b14 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_stream_priv.h +++ b/drivers/gpu/drm/amd/display/dc/dc_stream_priv.h @@ -34,4 +34,28 @@ void dc_stream_destruct(struct dc_stream_state *stream); void dc_stream_assign_stream_id(struct dc_stream_state *stream); +/* + * Finds the highest refresh rate that can be achieved + * from starting_freq while staying within flicker criteria + */ +int dc_stream_calculate_max_flickerless_refresh_rate(struct dc_stream_state *stream, + int starting_refresh_hz, + bool is_gaming); + +/* + * Finds the lowest refresh rate that can be achieved + * from starting_freq while staying within flicker criteria + */ +int dc_stream_calculate_min_flickerless_refresh_rate(struct dc_stream_state *stream, + int starting_refresh_hz, + bool is_gaming); + +/* + * Determines if there will be a flicker when moving between 2 refresh rates + */ +bool dc_stream_is_refresh_rate_range_flickerless(struct dc_stream_state *stream, + int hz1, + int hz2, + bool is_gaming); + #endif // _DC_STREAM_PRIV_H_ |