mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brajesh Gupta <Brajesh.Gupta@imgtec.com>
To: Luigi Santivetti <Luigi.Santivetti@imgtec.com>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"airlied@gmail.com" <airlied@gmail.com>,
	Alessio Belle <Alessio.Belle@imgtec.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	Alexandru Dadu <Alexandru.Dadu@imgtec.com>,
	"mripard@kernel.org" <mripard@kernel.org>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"imagination@lists.freedesktop.org"
	<imagination@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] drm/imagination: Improve logging of unknown freelist IDs
Date: Thu, 15 Oct 2026 09:07:55 +0000	[thread overview]
Message-ID: <79a0931801cf17535ecef4fdc173d77d7038f5b8.camel@imgtec.com> (raw)
In-Reply-To: <20261009-b4-improve-logging-of-unknown-freelist-ids-v2-1-5e6c3f63370e@imgtec.com>

On Fri, 2026-10-09 at 14:04 +0300, Alexandru Dadu wrote:
Hi Dadu,
> From: Alessio Belle <alessio.belle@imgtec.com>
> 
> 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 <alessio.belle@imgtec.com>
> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com>
> ---
> 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-96ebcb132b80@imgtec.com
> 
> To: Alessio Belle <alessio.belle@imgtec.com>
> To: Luigi Santivetti <luigi.santivetti@imgtec.com>
> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> To: Maxime Ripard <mripard@kernel.org>
> To: Thomas Zimmermann <tzimmermann@suse.de>
> To: David Airlie <airlied@gmail.com>
> To: Simona Vetter <simona@ffwll.ch>
> Cc: imagination@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  drivers/gpu/drm/imagination/pvr_free_list.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com>

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 <alexandru.dadu@imgtec.com>
> 


      reply	other threads:[~2026-10-15  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 11:04 Alexandru Dadu
2026-10-15  9:07 ` Brajesh Gupta [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79a0931801cf17535ecef4fdc173d77d7038f5b8.camel@imgtec.com \
    --to=brajesh.gupta@imgtec.com \
    --cc=Alessio.Belle@imgtec.com \
    --cc=Alexandru.Dadu@imgtec.com \
    --cc=Luigi.Santivetti@imgtec.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imagination@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®