]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix check in fbdev init
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Jul 2022 18:56:59 +0000 (14:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:22:54 +0000 (14:22 +0200)
commit94273b6438cfc97965ee3b3b38ee66ef1acd3ed7
treeec7e9494ee70d0db32031e93c0f5ea07d6deaeca
parent5455321b216a9ee7c583ca80df098ef2b75c5bb2
drm/amdgpu: fix check in fbdev init

The new vkms virtual display code is atomic so there is
no need to call drm_helper_disable_unused_functions()
when it is enabled.  Doing so can result in a segfault.
When the driver switched from the old virtual display code
to the new atomic virtual display code, it was missed that
we enable virtual display unconditionally under SR-IOV
so the checks here missed that case.  Add the missing
check for SR-IOV.

There is no equivalent of this patch for Linus' tree
because the relevant code no longer exists.  This patch
is only relevant to kernels 5.15 and 5.16.

Fixes: 2bcc751ad32d ("drm/amdgpu: create amdgpu_vkms (v4)")
Cc: stable@vger.kernel.org # 5.15.x
Cc: hgoffin@amazon.com
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c