Skip to content
/ linux Public

Commit 276028f

Browse files
Likun GaoSasha Levin
authored andcommitted
drm/amdgpu: fix NULL pointer issue buffer funcs
[ Upstream commit 9877a86 ] If SDMA block not enabled, buffer_funcs will not initialize, fix the null pointer issue if buffer_funcs not initialized. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 31a1fb3 commit 276028f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3280,7 +3280,8 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
32803280
if (r)
32813281
goto init_failed;
32823282

3283-
if (adev->mman.buffer_funcs_ring->sched.ready)
3283+
if (adev->mman.buffer_funcs_ring &&
3284+
adev->mman.buffer_funcs_ring->sched.ready)
32843285
amdgpu_ttm_set_buffer_funcs_status(adev, true);
32853286

32863287
/* Don't init kfd if whole hive need to be reset during init */

0 commit comments

Comments
 (0)