On Fri, 2026-10-09 at 14:04 +0300, Alexandru Dadu wrote:
Hi Dadu,
> From: Alessio Belle <[email protected]>
> 
> Log freelist IDs not recognised by the driver when processing freelist
> grow or reconstruction requests from the firmware.
> 
> In the freelist grow request path, remove a WARN_ON() which is not
> particularly useful since it is known where the request came from.
> 
> Signed-off-by: Alessio Belle <[email protected]>
> Signed-off-by: Alexandru Dadu <[email protected]>
> ---
> Changes in v2:
> - Fixed an issue pointed by Sashiko by replacing drm_warn() with 
> drm_warn_ratelimited().
> - Link to v1: 
> https://patch.msgid.link/20261006-b4-improve-logging-of-unknown-freelist-ids-v1-1-96ebcb132...@imgtec.com
> 
> To: Alessio Belle <[email protected]>
> To: Luigi Santivetti <[email protected]>
> To: Maarten Lankhorst <[email protected]>
> To: Maxime Ripard <[email protected]>
> To: Thomas Zimmermann <[email protected]>
> To: David Airlie <[email protected]>
> To: Simona Vetter <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> ---
>  drivers/gpu/drm/imagination/pvr_free_list.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
Reviewed-by: Brajesh Gupta <[email protected]>

Thanks,
Brajesh
> diff --git a/drivers/gpu/drm/imagination/pvr_free_list.c 
> b/drivers/gpu/drm/imagination/pvr_free_list.c
> index e85cac83834c..ec02fbbe0168 100644
> --- a/drivers/gpu/drm/imagination/pvr_free_list.c
> +++ b/drivers/gpu/drm/imagination/pvr_free_list.c
> @@ -8,6 +8,7 @@
>  #include "pvr_vm.h"
>  
>  #include <drm/drm_gem.h>
> +#include <drm/drm_print.h>
>  #include <linux/slab.h>
>  #include <linux/xarray.h>
>  #include <uapi/drm/pvr_drm.h>
> @@ -367,8 +368,12 @@ void pvr_free_list_process_grow_req(struct pvr_device 
> *pvr_dev,
>       u32 grow_pages = 0;
>  
>       /* If we don't have a freelist registered for this ID, we can't do 
> much. */
> -     if (WARN_ON(!free_list))
> +     if (!free_list) {
> +             drm_warn_ratelimited(from_pvr_device(pvr_dev),
> +                                  "Received freelist grow request for 
> unknown ID 0x%x\n",
> +                                  req->freelist_id);
>               return;
> +     }
>  
>       /* Since the FW made the request, it has already consumed the ready 
> pages,
>        * update the host struct.
> @@ -564,8 +569,12 @@ pvr_free_list_reconstruct(struct pvr_device *pvr_dev, 
> u32 freelist_id)
>       struct rogue_fwif_freelist *fw_data;
>       struct pvr_hwrt_data *hwrt_data;
>  
> -     if (!free_list)
> +     if (!free_list) {
> +             drm_warn_ratelimited(from_pvr_device(pvr_dev),
> +                                  "Received freelist reconstruction request 
> for unknown ID 0x%x\n",
> +                                  freelist_id);
>               return;
> +     }
>  
>       mutex_lock(&free_list->lock);
>  
> 
> ---
> base-commit: 6e375de99d0c420169481fcd36064177ab55b09d
> change-id: 20261006-b4-improve-logging-of-unknown-freelist-ids-8a69777fd61e
> 
> Best regards,
> --  
> Alexandru Dadu <[email protected]>
> 

Reply via email to