drm/radeon: add rdev in ring struct

Retrieving radeon device struct from ring struct will be
used in next patch where debugfs's show function can only pass
one private data pointer.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Nirmoy Das 2021-02-15 16:12:44 +01:00 committed by Alex Deucher
parent 475f9aaaaa
commit e7fa81bbc3
2 changed files with 2 additions and 0 deletions

View File

@ -828,6 +828,7 @@ struct radeon_ib {
};
struct radeon_ring {
struct radeon_device *rdev;
struct radeon_bo *ring_obj;
volatile uint32_t *ring;
unsigned rptr_offs;

View File

@ -387,6 +387,7 @@ int radeon_ring_init(struct radeon_device *rdev, struct radeon_ring *ring, unsig
ring->ring_size = ring_size;
ring->rptr_offs = rptr_offs;
ring->nop = nop;
ring->rdev = rdev;
/* Allocate ring buffer */
if (ring->ring_obj == NULL) {
r = radeon_bo_create(rdev, ring->ring_size, PAGE_SIZE, true,