]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH v3.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Tue, 19 Jun 2018 14:27:53 +0000 (10:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jul 2018 21:38:26 +0000 (16:38 -0500)
commit31ee5c09c8cf087b87ae3e22107c71de7ee92395
tree64eac39b78749bf2e5da4680cb9bd2163eadffb1
parent868b43fd13669940118cf9ddd6199b84c4308214
drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH v3.

Access to SQ_EDC_INFO requires selecting register instance and
hence mutex lock when accessing GRBM_GFX_INDEX for which a work
is schedueled from IH. But SQ interrupt can be raised on many instances
at once which means queuing work will usually succeed for the first one
but fail for the rest since the work takes time to process. To avoid
losing info about other interrupt instances call the parsing function
directly from high IRQ when current work hasn't finished and avoid
accessing SQ_EDC_INFO in that case.

v2:
Simplify high IRQ and BH handlers synchronization using work_pending.
Remove {READ,WRITE}_ONCE notations since smp_{r,w}mb are implicit
compiler barriers.

v3:
Remove exlicit memory barriers as scedule_work has r/w barriers.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c