All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/amdgpu: Fix allocating extra dwords for rings
@ 2025-09-01 10:00 Timur Kristóf
  2025-09-01 10:00 ` [PATCH 2/4] drm/amdgpu: Clarify that BO size is in bytes in comments Timur Kristóf
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Timur Kristóf @ 2025-09-01 10:00 UTC (permalink / raw)
  To: amd-gfx; +Cc: alexander.deucher, christian.koenig, Timur Kristóf

The amdgpu_bo_create_kernel function takes a byte count,
so we need to multiply the extra dword count by four.
(The ring_size is already in bytes so that one is correct here.)

Fixes: c8c1a1d2ef04 ("drm/amdgpu: define and add extra dword for jpeg ring")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 6379bb25bf5c..13f0f0209cbe 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -364,11 +364,12 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
 
 	/* Allocate ring buffer */
 	if (ring->ring_obj == NULL) {
-		r = amdgpu_bo_create_kernel(adev, ring->ring_size + ring->funcs->extra_dw, PAGE_SIZE,
-					    AMDGPU_GEM_DOMAIN_GTT,
-					    &ring->ring_obj,
-					    &ring->gpu_addr,
-					    (void **)&ring->ring);
+		r = amdgpu_bo_create_kernel(adev, ring->ring_size + ring->funcs->extra_dw * 4,
+						PAGE_SIZE,
+						AMDGPU_GEM_DOMAIN_GTT,
+						&ring->ring_obj,
+						&ring->gpu_addr,
+						(void **)&ring->ring);
 		if (r) {
 			dev_err(adev->dev, "(%d) ring create failed\n", r);
 			kvfree(ring->ring_backup);
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-09-02 11:39 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-01 10:00 [PATCH 1/4] drm/amdgpu: Fix allocating extra dwords for rings Timur Kristóf
2025-09-01 10:00 ` [PATCH 2/4] drm/amdgpu: Clarify that BO size is in bytes in comments Timur Kristóf
2025-09-02  6:43   ` Christian König
2025-09-02  8:08     ` Timur Kristóf
2025-09-02 11:10       ` Christian König
2025-09-02 11:28         ` Timur Kristóf
2025-09-01 10:00 ` [PATCH 3/4] drm/amdgpu: Fill extra dwords with NOPs Timur Kristóf
2025-09-01 10:13   ` Tvrtko Ursulin
2025-09-02 11:30     ` Timur Kristóf
2025-09-02 11:34       ` Christian König
2025-09-02 11:39       ` Tvrtko Ursulin
2025-09-02  6:39   ` Christian König
2025-09-02  7:42     ` Timur Kristóf
2025-09-02  9:54       ` Christian König
2025-09-02 10:10         ` Timur Kristóf
2025-09-01 10:00 ` [PATCH 4/4] drm/amdgpu: Set SDMA v3 copy_max_bytes to 0x3fff00 Timur Kristóf
2025-09-02  6:45   ` Christian König
2025-09-02  7:52     ` Timur Kristóf
2025-09-02  6:41 ` [PATCH 1/4] drm/amdgpu: Fix allocating extra dwords for rings Christian König
2025-09-02  8:26   ` Timur Kristóf
2025-09-02 11:20     ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.