Skip to content

Commit 959143d

Browse files
committed
Revert "drm/amd: Remove freesync video mode amdgpu parameter"
This reverts commit e94e787. This conflicts with how compositors want to handle VRR. Now that compositors actually handle VRR, we probably don't need freesync video. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2985 Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 5d978e7 commit 959143d

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ extern int amdgpu_emu_mode;
194194
extern uint amdgpu_smu_memory_pool_size;
195195
extern int amdgpu_smu_pptable_id;
196196
extern uint amdgpu_dc_feature_mask;
197+
extern uint amdgpu_freesync_vid_mode;
197198
extern uint amdgpu_dc_debug_mask;
198199
extern uint amdgpu_dc_visual_confirm;
199200
extern int amdgpu_dm_abm_level;

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ int amdgpu_mes_kiq;
199199
int amdgpu_noretry = -1;
200200
int amdgpu_force_asic_type = -1;
201201
int amdgpu_tmz = -1; /* auto */
202+
uint amdgpu_freesync_vid_mode;
202203
int amdgpu_reset_method = -1; /* auto */
203204
int amdgpu_num_kcq = -1;
204205
int amdgpu_smartshift_bias;
@@ -883,6 +884,32 @@ module_param_named(damageclips, amdgpu_damage_clips, int, 0444);
883884
MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto (default), 0 = off, 1 = on)");
884885
module_param_named(tmz, amdgpu_tmz, int, 0444);
885886

887+
/**
888+
* DOC: freesync_video (uint)
889+
* Enable the optimization to adjust front porch timing to achieve seamless
890+
* mode change experience when setting a freesync supported mode for which full
891+
* modeset is not needed.
892+
*
893+
* The Display Core will add a set of modes derived from the base FreeSync
894+
* video mode into the corresponding connector's mode list based on commonly
895+
* used refresh rates and VRR range of the connected display, when users enable
896+
* this feature. From the userspace perspective, they can see a seamless mode
897+
* change experience when the change between different refresh rates under the
898+
* same resolution. Additionally, userspace applications such as Video playback
899+
* can read this modeset list and change the refresh rate based on the video
900+
* frame rate. Finally, the userspace can also derive an appropriate mode for a
901+
* particular refresh rate based on the FreeSync Mode and add it to the
902+
* connector's mode list.
903+
*
904+
* Note: This is an experimental feature.
905+
*
906+
* The default value: 0 (off).
907+
*/
908+
MODULE_PARM_DESC(
909+
freesync_video,
910+
"Enable freesync modesetting optimization feature (0 = off (default), 1 = on)");
911+
module_param_named(freesync_video, amdgpu_freesync_vid_mode, uint, 0444);
912+
886913
/**
887914
* DOC: reset_method (int)
888915
* GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco)

0 commit comments

Comments
 (0)