diff options
author | AMD\ramini <Reza.Amini@amd.com> | 2020-11-24 17:08:44 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-12-08 23:03:04 -0500 |
commit | 983bcb4cbe259ca6b2e03a6133364681aff1b88b (patch) | |
tree | a998427cdc6e07b7ddad497c40ecd2ff54531fd0 /drivers/gpu/drm/amd/display/modules/freesync | |
parent | 9bc41626658271de26cd9086c6e82811ca334dd2 (diff) | |
download | linux-stable-983bcb4cbe259ca6b2e03a6133364681aff1b88b.tar.gz linux-stable-983bcb4cbe259ca6b2e03a6133364681aff1b88b.tar.bz2 linux-stable-983bcb4cbe259ca6b2e03a6133364681aff1b88b.zip |
drm/amd/display: Set FixRate bit in VSIF V3
[Why]
Signal FreeSync display that we are in Fixed Rate mode, and
expand the FreeSync range to 1024.
[How]
Set the new bit in SB16:bit0, and augment the min and max
refresh rate with 2 extra bits.
Signed-off-by: AMD\ramini <Reza.Amini@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/freesync')
-rw-r--r-- | drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 2decdd8a5e20..4762273b5bb9 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -610,6 +610,7 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr, min_programmed = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? fixed_refresh : (vrr->state == VRR_STATE_ACTIVE_VARIABLE) ? min_refresh : + (vrr->state == VRR_STATE_INACTIVE) ? min_refresh : max_refresh; // Non-fs case, program nominal range max_programmed = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? fixed_refresh : @@ -622,11 +623,14 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr, /* PB8 = FreeSync Maximum refresh rate (Hz) */ infopacket->sb[8] = max_programmed & 0xFF; - /* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 15:8 */ - infopacket->sb[11] = (min_programmed >> 8) & 0xFF; + /* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 9:8 */ + infopacket->sb[11] = (min_programmed >> 8) & 0x03; - /* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 15:8 */ - infopacket->sb[12] = (max_programmed >> 8) & 0xFF; + /* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 9:8 */ + infopacket->sb[12] = (max_programmed >> 8) & 0x03; + + /* PB16 : Reserved bits 7:1, FixedRate bit 0 */ + infopacket->sb[16] = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? 1 : 0; //FreeSync HDR infopacket->sb[9] = 0; |