drm/amdgpu: nuke the ih reentrant lock
authorChristian König <christian.koenig@amd.com>
Fri, 12 Mar 2021 13:00:33 +0000 (14:00 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 03:30:23 +0000 (23:30 -0400)
Interrupts on are non-reentrant on linux. This is just an ancient
leftover from radeon where irq processing was kicked of from different
places.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h

index 2e799468878a1802ac0661e5a415585e1ae36841..f04680d50856f2e672e1c83a042acd2b8e310afc 100644 (file)
@@ -3284,7 +3284,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 
        /* mutex initialization are all done here so we
         * can recall function without having locking issues */
-       atomic_set(&adev->irq.ih.lock, 0);
        mutex_init(&adev->firmware.mutex);
        mutex_init(&adev->pm.mutex);
        mutex_init(&adev->gfx.gpu_clock_mutex);
index 1024065f1f036259f0e12acfaca715b932a0047f..faaa6aa2faaf2aba9c32bdd4497c985cbfbc4571 100644 (file)
@@ -228,10 +228,6 @@ int amdgpu_ih_process(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih)
        wptr = amdgpu_ih_get_wptr(adev, ih);
 
 restart_ih:
-       /* is somebody else already processing irqs? */
-       if (atomic_xchg(&ih->lock, 1))
-               return IRQ_NONE;
-
        DRM_DEBUG("%s: rptr %d, wptr %d\n", __func__, ih->rptr, wptr);
 
        /* Order reading of wptr vs. reading of IH ring data */
@@ -244,7 +240,6 @@ restart_ih:
 
        amdgpu_ih_set_rptr(adev, ih);
        wake_up_all(&ih->wait_process);
-       atomic_set(&ih->lock, 0);
 
        /* make sure wptr hasn't changed while processing */
        wptr = amdgpu_ih_get_wptr(adev, ih);
index 87ec6d20dbe0dbcb713cfe0a3c0785e02c1fa1c5..0649b59830a59b0203889aeef7ac1d02e0fbd615 100644 (file)
@@ -64,7 +64,6 @@ struct amdgpu_ih_ring {
 
        bool                    enabled;
        unsigned                rptr;
-       atomic_t                lock;
        struct amdgpu_ih_regs   ih_regs;
 
        /* For waiting on IH processing at checkpoint. */