diff options
| author | Christian König <[email protected]> | 2022-04-08 14:22:55 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2022-04-21 09:26:20 +0000 |
| commit | 94f4c4965e5513ba624488f4b601d6b385635aec (patch) | |
| tree | 969e9470e0c12550679f893e33996bd70ce34d04 /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |
| parent | Revert "drm: of: Lookup if child node has panel or bridge" (diff) | |
| download | kernel-94f4c4965e5513ba624488f4b601d6b385635aec.tar.gz kernel-94f4c4965e5513ba624488f4b601d6b385635aec.zip | |
drm/amdgpu: partial revert "remove ctx->lock" v2
This reverts commit 461fa7b0ac565ef25c1da0ced31005dd437883a7.
We are missing some inter dependencies here so re-introduce the lock
until we have figured out what's missing. Just drop/retake it while
adding dependencies.
v2: still drop the lock while adding dependencies
Signed-off-by: Christian König <[email protected]>
Tested-by: Mikhail Gavrilov <[email protected]> (v1)
Fixes: 461fa7b0ac56 ("drm/amdgpu: remove ctx->lock")
Acked-by: Alex Deucher <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 5981c7d9bd48..8f0e6d93bb9c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -237,6 +237,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, kref_init(&ctx->refcount); spin_lock_init(&ctx->ring_lock); + mutex_init(&ctx->lock); ctx->reset_counter = atomic_read(&adev->gpu_reset_counter); ctx->reset_counter_query = ctx->reset_counter; @@ -357,6 +358,7 @@ static void amdgpu_ctx_fini(struct kref *ref) drm_dev_exit(idx); } + mutex_destroy(&ctx->lock); kfree(ctx); } |
