drm/radeon: add rdev in ring struct
authorNirmoy Das <nirmoy.das@amd.com>
Mon, 15 Feb 2021 15:12:44 +0000 (16:12 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Feb 2021 21:43:09 +0000 (16:43 -0500)
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>
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_ring.c

index f37794b0c3b3266f0ecd1b40680d18c3c748dcba..f820b29127f8a261a1b27383bb901832fd74a82d 100644 (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;
index c3304c977a0a59ec1e12fd7ef6fc098fa9a55f99..41ed8aba1313715e426af4240724a4e0056e12a7 100644 (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,