]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Handle null atom context in VBIOS info ioctl
authorDavid Francis <David.Francis@amd.com>
Tue, 5 Sep 2023 14:13:51 +0000 (10:13 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:54 +0000 (14:56 +0200)
commit91b6845ef387ab9ae2c6f3f8d43655be955e444b
treefa898d7333662f55cf7d19d4c7b8c0c3fe64daed
parentad3c37f90bae3675bc686562f7e63511d1033cc0
drm/amdgpu: Handle null atom context in VBIOS info ioctl

[ Upstream commit 5e7e82254270c8cf8b107451c5de01cee2f135ae ]

On some APU systems, there is no atom context and so the
atom_context struct is null.

Add a check to the VBIOS_INFO branch of amdgpu_info_ioctl
to handle this case, returning all zeroes.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c