drm/amdgpu: add amdgpu_ih_regs structure
authorHawking Zhang <Hawking.Zhang@amd.com>
Tue, 1 Dec 2020 14:36:46 +0000 (22:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Dec 2020 20:03:21 +0000 (15:03 -0500)
amdgpu_ih_regs holds all the registers for
an ih ring

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Dennis Li <Dennis.Li@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h

index 3c9cfe7..94c565b 100644 (file)
 struct amdgpu_device;
 struct amdgpu_iv_entry;
 
+struct amdgpu_ih_regs {
+       uint32_t ih_rb_base;
+       uint32_t ih_rb_base_hi;
+       uint32_t ih_rb_cntl;
+       uint32_t ih_rb_wptr;
+       uint32_t ih_rb_rptr;
+       uint32_t ih_doorbell_rptr;
+       uint32_t ih_rb_wptr_addr_lo;
+       uint32_t ih_rb_wptr_addr_hi;
+       uint32_t psp_reg_id;
+};
+
 /*
  * R6xx+ IH ring
  */
@@ -53,6 +65,7 @@ struct amdgpu_ih_ring {
        bool                    enabled;
        unsigned                rptr;
        atomic_t                lock;
+       struct amdgpu_ih_regs   ih_regs;
 };
 
 /* provided by the ih block */