aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2018-06-19 10:27:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-07-05 17:38:26 -0400
commit9bdc2092b488bc81aa5409b4d6fc931c5bea1094 (patch)
tree64eac39b78749bf2e5da4680cb9bd2163eadffb1 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentd9e222b460b195a47b30fd9057fbb131fcbd7bac (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 71b9b861f60e..fb17838114c3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -930,6 +930,11 @@ struct amdgpu_ngg {
930 bool init; 930 bool init;
931}; 931};
932 932
933struct sq_work {
934 struct work_struct work;
935 unsigned ih_data;
936};
937
933struct amdgpu_gfx { 938struct amdgpu_gfx {
934 struct mutex gpu_clock_mutex; 939 struct mutex gpu_clock_mutex;
935 struct amdgpu_gfx_config config; 940 struct amdgpu_gfx_config config;
@@ -970,6 +975,8 @@ struct amdgpu_gfx {
970 struct amdgpu_irq_src priv_inst_irq; 975 struct amdgpu_irq_src priv_inst_irq;
971 struct amdgpu_irq_src cp_ecc_error_irq; 976 struct amdgpu_irq_src cp_ecc_error_irq;
972 struct amdgpu_irq_src sq_irq; 977 struct amdgpu_irq_src sq_irq;
978 struct sq_work sq_work;
979
973 /* gfx status */ 980 /* gfx status */
974 uint32_t gfx_current_status; 981 uint32_t gfx_current_status;
975 /* ce ram size*/ 982 /* ce ram size*/