drm/amd/display: Add freesync video modes based on preferred modes
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Thu, 10 Dec 2020 18:48:22 +0000 (13:48 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Feb 2021 22:23:48 +0000 (17:23 -0500)
commitd10cd527f5e5f70d5d71e8b224a025c3e73b57ba
tree68ac8d5b96ce9b304eb0cb7eadf43b96c09c5f40
parent0eb1af2e820594aa27cac04f9d44a0cf1186eae6
drm/amd/display: Add freesync video modes based on preferred modes

[Why]
While possible for userspace to create and add custom mode based off the
optimized mode for the connected display which differs only in front porch
timing, this patch set adds a list of common video modes in advance.

The list of common video refresh rates is small, well known and the optimized
mode has specific requirements to be able to enable HW frame doubling and
tripling so it makes most sense to create the modes that video players will need
in advance. The optimized mode matches the preferred mode resolution but has the
highest refresh rate available to enable the largest front porch extension.

[How]
Find the optimized mode and store it on the connector so we can check it
later during our optimized modeset.

Prepopulate the mode list with a list of common video mades based on the
optimized mode (but with a longer front porch) if the panel doesn't support a
variant of the mode natively.

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/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h