Re: [PATCH v2 5/7] drm/panthor: Don't allocate protm_suspend_buf

Liviu Dudau <[email protected]>
Newsgroups org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <amssjgGaLXwnemyF@e142607>
On Sun, Jul 12, 2026 at 03:54:37PM +0200, Ketil Johnsen wrote:
> The PROTM suspend buffer is only needed if the group is going to
> use PROTM in the first place, so let's not assume we need one until
> we're being asked to.
> 
> Signed-off-by: Ketil Johnsen <[email protected]>

Reviewed-by: Liviu Dudau <[email protected]>

Best regards,
Liviu

> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index dc77a174a3368..86c0f12b09e11 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -3642,9 +3642,11 @@ static void add_group_kbo_sizes(struct panthor_device *ptdev,
>  	if (drm_WARN_ON(&ptdev->base, ptdev != group->ptdev))
>  		return;
>  
> -	group->fdinfo.kbo_sizes += group->suspend_buf->obj->size;
> -	group->fdinfo.kbo_sizes += group->protm_suspend_buf->obj->size;
>  	group->fdinfo.kbo_sizes += group->syncobjs->obj->size;
> +	group->fdinfo.kbo_sizes += group->suspend_buf->obj->size;
> +
> +	if (group->protm_suspend_buf)
> +		group->fdinfo.kbo_sizes += group->protm_suspend_buf->obj->size;
>  
>  	for (i = 0; i < group->queue_count; i++) {
>  		queue =	group->queues[i];
> @@ -3724,14 +3726,6 @@ int panthor_group_create(struct drm_file *file,
>  		goto err_put_group;
>  	}
>  
> -	suspend_size = csg_iface->control->protm_suspend_size;
> -	group->protm_suspend_buf = panthor_fw_alloc_suspend_buf_mem(ptdev, suspend_size);
> -	if (IS_ERR(group->protm_suspend_buf)) {
> -		ret = PTR_ERR(group->protm_suspend_buf);
> -		group->protm_suspend_buf = NULL;
> -		goto err_put_group;
> -	}
> -
>  	group->syncobjs = panthor_kernel_bo_create(ptdev, group->vm,
>  						   group_args->queues.count *
>  						   sizeof(struct panthor_syncobj_64b),
> -- 
> 2.43.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.