drm/amd/display: Add module parameter for freesync video mode
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Thu, 10 Dec 2020 18:48:21 +0000 (13:48 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Feb 2021 22:23:37 +0000 (17:23 -0500)
commit0eb1af2e820594aa27cac04f9d44a0cf1186eae6
tree7ea8050a6ee986de19098c93acb9f8b957c6c131
parent5392b2af97dc5802991f953eb2687e538da4688c
drm/amd/display: Add module parameter for freesync video mode

[Why]
This option shall be opt-in by default since it is a temporary solution
until long term solution is agreed upon which may require userspace interface
changes. This feature give the user a seamless experience when freesync aware
programs (media players for instance) switches to a compatible freesync mode
when playing videos. Enabling this feature also have the potential side effect
of causing higher power consumption due to running a mode with lower resolution
and base clock frequency with the highest base clock supported on the monitor as
per its advertised modes. There has been precedent of manufacturing modes in the
kernel. In AMDGPU, the existing usage are for common modes and scaling modes.
Other driver have a similar approach as well.

[How]
Adds a module parameter to enable freesync video mode modeset
optimization. Enabling this mode allows the driver to skip a full modeset when a
freesync compatible mode is requested by the userspace. This parameter will also
add some additional modes that are within the connected monitor's VRR range
corresponding to common video modes, which media players can use for a seamless
experience while making use of freesync.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c