]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: cleanup ctx implementation
authorChristian König <christian.koenig@amd.com>
Fri, 13 May 2022 11:54:02 +0000 (13:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:41:07 +0000 (14:41 +0200)
commitbf0e57d761a637f1e5b62358c1e8cd79c177acb5
tree4a04c7bc9df7ba486bdef74c2ed0a20db8bd5b87
parentbeb6ac3341704af4fde225189d637666ea68427f
drm/amdgpu: cleanup ctx implementation

[ Upstream commit 69493c034d2455204dfcd370de8c4dc204374a94 ]

Let each context have a pointer to the ctx manager and properly
initialize the adev pointer inside the context manager.

Reduce the BUG_ON() in amdgpu_ctx_add_fence() into a WARN_ON() and
directly return the sequence number instead of writing into a parmeter.

Signed-off-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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c