OSDN Git Service

drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on vga and dvi...
authorhongao <hongao@uniontech.com>
Thu, 11 Nov 2021 03:32:07 +0000 (11:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Nov 2021 04:03:08 +0000 (23:03 -0500)
commitbf552083916a7f8800477b5986940d1c9a31b953
treefb7c32d5debc7d388b7a8e5cacad24ee20914fb6
parentdab60582685aabdae2d4ff7ce716456bd0dc7a0f
drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on vga and dvi connectors

amdgpu_connector_vga_get_modes missed function amdgpu_get_native_mode
which assign amdgpu_encoder->native_mode with *preferred_mode result in
amdgpu_encoder->native_mode.clock always be 0. That will cause
amdgpu_connector_set_property returned early on:
if ((rmx_type != DRM_MODE_SCALE_NONE) &&
(amdgpu_encoder->native_mode.clock == 0))
when we try to set scaling mode Full/Full aspect/Center.
Add the missing function to amdgpu_connector_vga_get_mode can fix this.
It also works on dvi connectors because
amdgpu_connector_dvi_helper_funcs.get_mode use the same method.

Signed-off-by: hongao <hongao@uniontech.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c