diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-07-04 14:14:04 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-07-04 14:14:04 +0200 |
commit | dd84cfff3cc3b79c9d616f85bd1178df135cbd1a (patch) | |
tree | cd02e30a78211bed4f1270877b705a079d4bd364 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | |
parent | 2307a0e1ca0b5c1337b37ac6302f96e017ebac3c (diff) | |
parent | 980555e95f7cabdc9c80a07107622b097ba23703 (diff) | |
download | linux-dd84cfff3cc3b79c9d616f85bd1178df135cbd1a.tar.bz2 |
Merge tag 'asoc-fix-v5.19-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.19
A collection of fixes for v5.19, quite large but nothing major - a good
chunk of it is more stuff that was identified by mixer-test regarding
event generation.
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index 317d80209e95..7d89a52091c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h @@ -230,6 +230,8 @@ struct amdgpu_ring { struct amdgpu_bo *ring_obj; volatile uint32_t *ring; unsigned rptr_offs; + u64 rptr_gpu_addr; + volatile u32 *rptr_cpu_addr; u64 wptr; u64 wptr_old; unsigned ring_size; @@ -250,7 +252,11 @@ struct amdgpu_ring { bool use_doorbell; bool use_pollmem; unsigned wptr_offs; + u64 wptr_gpu_addr; + volatile u32 *wptr_cpu_addr; unsigned fence_offs; + u64 fence_gpu_addr; + volatile u32 *fence_cpu_addr; uint64_t current_ctx; char name[16]; u32 trail_seq; @@ -267,6 +273,11 @@ struct amdgpu_ring { int hw_prio; unsigned num_hw_submission; atomic_t *sched_score; + + /* used for mes */ + bool is_mes_queue; + uint32_t hw_queue_id; + struct amdgpu_mes_ctx_data *mes_ctx; }; #define amdgpu_ring_parse_cs(r, p, job, ib) ((r)->funcs->parse_cs((p), (job), (ib))) @@ -364,11 +375,22 @@ static inline void amdgpu_ring_write_multiple(struct amdgpu_ring *ring, ring->count_dw -= count_dw; } +#define amdgpu_mes_ctx_get_offs_gpu_addr(ring, offset) \ + (ring->is_mes_queue && ring->mes_ctx ? \ + (ring->mes_ctx->meta_data_gpu_addr + offset) : 0) + +#define amdgpu_mes_ctx_get_offs_cpu_addr(ring, offset) \ + (ring->is_mes_queue && ring->mes_ctx ? \ + (void *)((uint8_t *)(ring->mes_ctx->meta_data_ptr) + offset) : \ + NULL) + int amdgpu_ring_test_helper(struct amdgpu_ring *ring); void amdgpu_debugfs_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring); +int amdgpu_ring_init_mqd(struct amdgpu_ring *ring); + static inline u32 amdgpu_ib_get_value(struct amdgpu_ib *ib, int idx) { return ib->ptr[idx]; |