linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Hans Verkuil <hans@jjverkuil.nl>
Cc: Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Yunfei Dong <yunfei.dong@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, kernel@collabora.com,
	linux-media@vger.kernel.org,
	Sebastian Fricke <sebastian.fricke@collabora.com>
Subject: Re: [PATCH v3 1/5] media: mc: add manual request completion
Date: Thu, 5 Jun 2025 09:48:58 +0000	[thread overview]
Message-ID: <aEFoCvPe4zE48UG7@kekkonen.localdomain> (raw)
In-Reply-To: <8b1ed01a-b6e3-4670-a4e0-d8eee7ddc524@jjverkuil.nl>

Hi Hans,

On Thu, Jun 05, 2025 at 11:37:54AM +0200, Hans Verkuil wrote:
> >>>> @@ -499,3 +501,35 @@ void media_request_object_complete(struct media_request_object *obj)
> >>>>  		media_request_put(req);
> >>>>  }
> >>>>  EXPORT_SYMBOL_GPL(media_request_object_complete);
> >>>> +
> >>>> +void media_request_manual_complete(struct media_request *req)
> >>>> +{
> >>>> +	unsigned long flags;
> >>>
> >>> I'd declare flags as last.
> >>>
> >>>> +	bool completed = false;
> >>>> +
> >>>> +	if (WARN_ON(!req))
> >>>> +		return;
> >>>> +	if (WARN_ON(!req->manual_completion))
> >>>> +		return;
> >>>
> >>> I think I'd use WARN_ON_ONCE() consistently: this is a driver (or
> >>> framework) bug and telling once about it is very probably enough.
> >>
> >> Just to be sure, you only mean for the two checks above ? Or did
> >> you mean for the entire function ?
> > 
> > For the entire function. I thought that if this is user-triggerable, the
> > amount of data ending up in logs could be very large.
> 
> It's not user-triggerable, if this happens, then it is a driver bug.

If there is a driver bug, it could well be user-triggerable, wouldn't it?
Testing may not uncover all such cases.

-- 
Regards,

Sakari Ailus


  reply	other threads:[~2025-06-05  9:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 20:09 [PATCH v3 0/5] Add manual request completion to the MediaTek VCodec driver Nicolas Dufresne
2025-06-04 20:09 ` [PATCH v3 1/5] media: mc: add manual request completion Nicolas Dufresne
2025-06-04 21:04   ` Sakari Ailus
2025-06-04 23:19     ` Nicolas Dufresne
2025-06-05  6:51       ` Sakari Ailus
2025-06-05  9:37         ` Hans Verkuil
2025-06-05  9:48           ` Sakari Ailus [this message]
2025-06-05 12:41             ` Nicolas Dufresne
2025-06-09  9:42               ` Sakari Ailus
2025-06-09  9:49                 ` Hans Verkuil
2025-06-04 20:09 ` [PATCH v3 2/5] media: vicodec: add support for manual completion Nicolas Dufresne
2025-06-04 20:09 ` [PATCH v3 3/5] media: mc: add debugfs node to keep track of requests Nicolas Dufresne
2025-06-04 21:33   ` Sakari Ailus
2025-06-04 23:08     ` Nicolas Dufresne
2025-06-09 10:28       ` Sakari Ailus
2025-06-09 10:46         ` Hans Verkuil
2025-06-04 20:09 ` [PATCH v3 4/5] media: vcodec: Implement manual request completion Nicolas Dufresne
2025-06-11  8:33   ` AngeloGioacchino Del Regno
2025-06-04 20:09 ` [PATCH v3 5/5] media: mtk-vcodec: Don't try to decode 422/444 VP9 Nicolas Dufresne

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=aEFoCvPe4zE48UG7@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=hans@jjverkuil.nl \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=sebastian.fricke@collabora.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=yunfei.dong@mediatek.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;
as well as URLs for NNTP newsgroup(s).