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.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.h')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_stream.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h index e5dbbc6089a5..3d0adf8838ca 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_stream.h +++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h @@ -160,6 +160,18 @@ struct dc_stream_debug_options { char force_odm_combine_segments; }; +#define LUMINANCE_DATA_TABLE_SIZE 10 + +struct luminance_data { + bool is_valid; + int refresh_rate_hz[LUMINANCE_DATA_TABLE_SIZE]; + int luminance_millinits[LUMINANCE_DATA_TABLE_SIZE]; + int flicker_criteria_milli_nits_GAMING; + int flicker_criteria_milli_nits_STATIC; + int nominal_refresh_rate; + int dm_max_decrease_from_nominal; +}; + struct dc_stream_state { // sink is deprecated, new code should not reference // this pointer @@ -286,6 +298,8 @@ struct dc_stream_state { bool vblank_synchronized; bool fpo_in_use; bool is_phantom; + + struct luminance_data lumin_data; }; #define ABM_LEVEL_IMMEDIATE_DISABLE 255 |
