It looks like that CP_PACKET2 is from the radeon GPU driver and was
brought to amdgpu, but it was never used. This commit removes PACKET2
and related defines from amdgpu.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/cikd.h | 5 -
drivers/gpu/drm/amd/amdgpu/nvd.h| 5 --
Add some random documentation associated with the ring buffer
manipulations and writeback.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 29 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 37
2 files changed, 65 insertions
On 04/08, Rodrigo Siqueira wrote:
> On 04/07, Alex Deucher wrote:
> > On Mon, Apr 7, 2025 at 4:15 PM Rodrigo Siqueira wrote:
> > >
> > > On 04/07, Alex Deucher wrote:
> > > > On Sun, Apr 6, 2025 at 7:07 PM Rodrigo Siqueira
> > > > wrote:
> > > > >
> > > > > This patchset was inspired and made on
Remove duplicate code by using CSB helpers.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 34 --
1 file changed, 5 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
Eliminate code duplication in gfx_v9_0_get_csb_buffer by using CSB
helpers.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 32 ---
1 file changed, 4 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
b/drivers/
Part of the code in gfx_v11_0_get_csb_buffer can be removed in favor of
some GFX CSB helpers. This commit removes the duplicated part for the
GFX 11 CSB function.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 34 --
1 file changed, 5 inserti
Remove code duplication from gfx_v8_0_get_csb_buffer by using CSB
helpers.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 34 ---
1 file changed, 5 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
b/drivers/g
Add a description for the get_csb_buffer callback and an entry for CSB
in the glossary.
Signed-off-by: Rodrigo Siqueira
---
Documentation/gpu/amdgpu/amdgpu-glossary.rst | 3 +++
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 14 ++
2 files changed, 17 insertions(+)
diff --git a/Doc
>From GFX6 to GFX11, there is a function for getting the CSB buffer to be
put into the hardware. Three common parts are duplicated in all of these
GFX functions:
1. Prepare the CSB preamble.
2. Parser the CS data.
3. End the CSB preamble.
This commit creates helpers to be used from GFX6 to GFX11.
Use CSB helpers to remove code duplication from gfx_v7_0_get_csb_buffer.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 30 ---
1 file changed, 4 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
b/drivers/gpu
This patchset was inspired from the below series:
https://lore.kernel.org/amd-gfx/20250319162225.3775315-1-alexander.deuc...@amd.com/
In the above series, there is a bug fix in many functions named
gfx_vX_0_get_csb_buffer (where X ranges from 6 to 11). After closely
looking at those functions, it
CHIP_KAVERI, CHIP_KABINI, and CHIP_MULLINS have the same buffer
manipulation as the default option in the switch case. Remove those
specific manipulations and rely on the default behavior for them.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 9 -
1 file ch
Remove duplications from gfx_v6_0_get_csb_buffer by using CSB helpers.
Signed-off-by: Rodrigo Siqueira
---
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 29 ---
1 file changed, 4 insertions(+), 25 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
b/drivers/gpu/d
1) Checkpatch complains if we print an error message for kzalloc()
failure. The kzalloc() failure already has it's own error messages
built in. Also this allocation is small enough that it is guaranteed
to succeed.
2) Return directly instead of doing a goto free_fence_drv. The
"fence
The goto frees "fence_drv" so this is a double free bug. There is no
need to call amdgpu_seq64_free(adev, fence_drv->va) since the seq64
allocation failed so change the goto to goto free_fence_drv. Also
propagate the error code from amdgpu_seq64_alloc() instead of hard coding
it to -ENOMEM.
Fixe
On Thu, Apr 10, 2025 at 10:29:31PM +0530, Yadav, Arvind wrote:
> Please change this also instead of 'goto free_fence_drv' just return err.
>
> fence_drv = kzalloc(sizeof(*fence_drv), GFP_KERNEL);
> if (!fence_drv) {
> DRM_ERROR("Failed to allocate memory for fence d
This fixes a double free on one error path in
amdgpu_userq_fence_driver_alloc() and cleans up another error path.
v2:
Did some additional cleanup
Dan Carpenter (2):
drm/amdgpu: Fix double free in amdgpu_userq_fence_driver_alloc()
drm/amdgpu: Clean up error handling in
amdgpu_userq_fence_d
Add queue id support to the user queue wait IOCTL
drm_amdgpu_userq_wait structure.
This is required to retrieve the wait user queue and maintain
the fence driver references in it so that the user queue in
the same context releases their reference to the fence drivers
at some point before queue des
Add queue id support to the user queue wait IOCTL
drm_amdgpu_userq_wait structure.
This is required to retrieve the wait user queue and maintain
the fence driver references in it so that the user queue in
the same context releases their reference to the fence drivers
at some point before queue des
19 matches
Mail list logo