RE: [PATCH] drm/amdgpu: save the funcs of gfx software rings

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

 



[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Trigger.Huang@xxxxxxx
> Sent: Thursday, August 1, 2024 3:27 PM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Huang, Trigger <Trigger.Huang@xxxxxxx>
> Subject: [PATCH] drm/amdgpu: save the funcs of gfx software rings
>
> From: Trigger Huang <Trigger.Huang@xxxxxxx>
>
> Currently the funcs variable of a gfx software ring is not set. So if it is visited
> somewhere, it will lead to error logic being executed. For example, if we
> want to call some callbacks in funcs of a gfx software ring, like per ring reset,
> it will be failed due to funcs is NULL.
>
> Signed-off-by: Trigger Huang <Trigger.Huang@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
> index d234b7ccfaaf..4dad03a07492 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
> @@ -202,6 +202,7 @@ int amdgpu_ring_mux_add_sw_ring(struct
> amdgpu_ring_mux *mux, struct amdgpu_ring
>
>       e = &mux->ring_entry[mux->num_ring_entries];
>       ring->entry_index = mux->num_ring_entries;
> +     ring->funcs = mux->real_ring->funcs;

The ring functions are set in gfx_v9_0_set_ring_funcs, what is the case that funcs of software ring are not set while real ring's funcs are set.
Otherwise, real_ring->funcs are not the same as software ring's.

Thanks,
Jiadong

>       e->ring = ring;
>
>       INIT_LIST_HEAD(&e->list);
> --
> 2.34.1





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

  Powered by Linux