[PATCH 1/2] drm/radeon: add rdev in ring struct
Christian König
christian.koenig at amd.com
Tue Feb 16 07:51:36 UTC 2021
Am 15.02.21 um 19:16 schrieb Nirmoy Das:
> 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 at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com> for this one.
Acked-by: Christian König <christian.koenig at amd.com> for the other one.
> ---
> drivers/gpu/drm/radeon/radeon.h | 1 +
> drivers/gpu/drm/radeon/radeon_ring.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 2c0e3e7c294d..eaa9223d6f52 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -831,6 +831,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,
More information about the amd-gfx
mailing list