mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alessio Belle <Alessio.Belle@imgtec.com>
To: "zhanxusheng1024@gmail.com" <zhanxusheng1024@gmail.com>
Cc: Luigi Santivetti <Luigi.Santivetti@imgtec.com>,
	"imagination@lists.freedesktop.org"
	<imagination@lists.freedesktop.org>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	Alexandru Dadu <Alexandru.Dadu@imgtec.com>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"zhanxusheng@xiaomi.com" <zhanxusheng@xiaomi.com>
Subject: Re: [PATCH] drm/imagination: Propagate all errors from KCCB command submission code
Date: Wed, 2 Sep 2026 18:07:08 +0000	[thread overview]
Message-ID: <f9df89258a449c3bd64d6b7e3cfaf4da2174e953.camel@imgtec.com> (raw)
In-Reply-To: <20260811063044.4035829-1-zhanxusheng@xiaomi.com>

Hi Zhan,

On Tue, 2026-08-11 at 14:30 +0800, Zhan Xusheng wrote:
> On Tue, 11 Aug 2026 09:11:54 +0300, Alexandru Dadu wrote:
> > -	WARN_ON(pvr_dev->lost);
> > +	if (pvr_dev->lost)
> > +		return -EIO;
> 
> kccb.reserved_count is only decremented further down, past both WARN_ON()s,
> so this returns with the slot pvr_queue_prepare_job() reserved still held.
> 
> That path keeps being taken: pvr_power_reset()'s err_device_lost still calls
> pvr_queue_device_post_reset(), which starts every queue again, so jobs go on

This behaviour post device lost sounds like something we should investigate. 
Thanks for pointing this (and the rest) out!

Alessio

> reaching run_job() after the device is lost.  Each one then leaks a
> reservation, and pvr_kccb_fini() ends on
> 
> 	WARN_ON(pvr_dev->kccb.reserved_count);
> 
> pvr_kccb_release_slot() is meant for this ("Should only be called if
> something failed after the pvr_kccb_reserve_slot() call"), but it has no
> callers yet, so the ERR_PTR returns already in pvr_queue_run_job() lose the
> reservation the same way.  Might be worth handling in one place.
> 
> Thanks,
> Zhan Xusheng


      reply	other threads:[~2026-09-02 18:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  6:11 Alexandru Dadu
2026-08-11  6:30 ` Zhan Xusheng
2026-09-02 18:07   ` Alessio Belle [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=f9df89258a449c3bd64d6b7e3cfaf4da2174e953.camel@imgtec.com \
    --to=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 \
    --cc=zhanxusheng1024@gmail.com \
    --cc=zhanxusheng@xiaomi.com \
    /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®