Re: [PATCH 1/2] drm/radeon: add rdev in ring struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

Reviewed-by: Christian König <christian.koenig@xxxxxxx> for this one.

Acked-by: Christian König <christian.koenig@xxxxxxx> 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,

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux