diff options
author | Nirmoy Das <nirmoy.das@amd.com> | 2021-02-15 18:12:44 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-02-19 00:43:09 +0300 |
commit | e7fa81bbc33e6e5bc9f94ca16add07db85fe08f4 (patch) | |
tree | 0b1587d25a05810ce2de14c17a56d6142ec72f14 | |
parent | 475f9aaaaa78082433aed463c5a695d7391151ac (diff) | |
download | linux-e7fa81bbc33e6e5bc9f94ca16add07db85fe08f4.tar.xz |
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>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ring.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index f37794b0c3b3..f820b29127f8 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -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; diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index c3304c977a0a..41ed8aba1313 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -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, |