[PATCH 1/6] drm/amdgpu/gfx6: fix CSIB handling

Alex Deucher alexdeucher at gmail.com
Tue Mar 25 20:38:10 UTC 2025


On Tue, Mar 25, 2025 at 4:16 PM Rodrigo Siqueira <siqueira at igalia.com> wrote:
>
> On 03/19, Alex Deucher wrote:
> > We shouldn't return after the last section.
> > We need to update the rest of the CSIB.
>
> What is CSIB?

Clear State Indirect Buffer.  It provides the clear state that gets
put into the hardware context if when user mode puts requests the
clear state in their command buffer.  Driver programs this explicitly
when it sets up the kernel rings.  Driver also provides a pointer to
it which is used by the firmware to load the clear state in some
cases.

>
> What happens if the other CSIB is not updated?

The clear state packet submitted by userspace won't work as expected
if the clear state is not properly initialized.  In this case, I'm not
sure if there is actually a function difference since the driver
always initializes the clear state at kernel queue init time, but best
to make sure the buffer pointed to by the RLC is correct.

Alex

>
> Thanks
>
> >
> > Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> > index 13fbee46417af..cee2cf47112c9 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> > @@ -2874,8 +2874,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev,
> >                               buffer[count++] = cpu_to_le32(ext->reg_index - 0xa000);
> >                               for (i = 0; i < ext->reg_count; i++)
> >                                       buffer[count++] = cpu_to_le32(ext->extent[i]);
> > -                     } else {
> > -                             return;
> >                       }
> >               }
> >       }
> > --
> > 2.48.1
> >
>
> --
> Rodrigo Siqueira


More information about the amd-gfx mailing list