Linux Media Controller development
 help / color / mirror / Atom feed
From: Bin Du <Bin.Du@amd.com>
To: mateoamadoares@gmail.com,
	Nirujogi Pratap <pratap.nirujogi@amd.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Sultan Alsawaf <sultan@kerneltoast.com>,
	Mario Limonciello <superm1@kernel.org>,
	linux-media@vger.kernel.org, stable@vger.kernel.org, "Chan,
	Benjamin (Koon Pan)" <Benjamin.Chan@amd.com>,
	"Li, King" <King.Li@amd.com>
Subject: Re: [PATCH v2] media: amd: isp4: keep the subdev format when a stream stops
Date: Tue, 1 Dec 2026 17:42:36 +0800	[thread overview]
Message-ID: <ce20dc16-edfd-41fb-9c16-516bfb3ca2a5@amd.com> (raw)
In-Reply-To: <20261201-isp4-start-stream-deadlock-v2-1-7e654e81e243@gmail.com>



On 12/1/2026 4:26 PM, Mateo Amado Ares via B4 Relay wrote:
> 
> From: Mateo Amado Ares <mateoamadoares@gmail.com>
> 
> isp4sd_uninit_stream() clears the subdev pad format when a stream stops,
> but the video node only sets it at probe and on VIDIOC_S_FMT. Restarting
> a stream without S_FMT, which Chromium does during video calls, then
> fails:
> 
>   amd_isp_capture amd_isp_capture: fail to get out prop
>   amd_isp_capture amd_isp_capture: fail to setup output
> 
> Keep the format across stream stop.
> 
> Fixes: 4e5e7a7ddb4a ("media: platform: amd: isp4 subdev and firmware loading handling added")
> Cc: stable@vger.kernel.org
> Suggested-by: Bin Du <bin.du@amd.com>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Mateo Amado Ares <mateoamadoares@gmail.com>
> ---
> Sultan, if you already have a fix for this, I'm happy to drop mine.
> 
> Tested on an HP ZBook Ultra G1a with v7.3.6 plus Caspar's deadlock fix:
> STREAMOFF/STREAMON without S_FMT now streams frames instead of failing.
> 
> Changes in v2:
> - Drop patch 1, a duplicate of Caspar's fix [1].
> - Keep the format on stream stop instead of setting it on every start
>   (Bin).
> - Link to v1: https://lore.kernel.org/r/20261130-isp4-start-stream-deadlock-v1-0-9bf5a6647ef9@gmail.com
> 
> [1] https://lore.kernel.org/all/20261028-isp4-start-stream-deadlock-v1-1-babd80273148@proton.me/
> ---
>  drivers/media/platform/amd/isp4/isp4_subdev.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/media/platform/amd/isp4/isp4_subdev.c b/drivers/media/platform/amd/isp4/isp4_subdev.c
> index a108d90ac..5b63909d3 100644
> --- a/drivers/media/platform/amd/isp4/isp4_subdev.c
> +++ b/drivers/media/platform/amd/isp4/isp4_subdev.c
> @@ -354,15 +354,6 @@ static void isp4sd_uninit_stream(struct isp4_subdev *isp_subdev,
>         struct isp4sd_sensor_info *sensor_info = &isp_subdev->sensor_info;
>         struct isp4sd_output_info *output_info = &sensor_info->output_info;
>         struct isp4_interface *ispif = &isp_subdev->ispif;
> -       struct v4l2_mbus_framefmt *format;
> -
> -       format = v4l2_subdev_state_get_format(state, pad, 0);
> -       if (!format) {
> -               dev_err(isp_subdev->dev, "fail to get v4l2 format\n");
> -       } else {
> -               memset(format, 0, sizeof(*format));
> -               format->code = MEDIA_BUS_FMT_YUYV8_1_5X8;
> -       }
> 

state and pad are now unused in isp4sd_uninit_stream(). Please remove
both parameters and update the call site accordingly.

This cleanup overlaps with Caspar's deadlock fix:
https://lore.kernel.org/all/20261028-isp4-start-stream-deadlock-v1-1-babd80273148@proton.me/

Could you base the revised patch on it to avoid the patch-context
conflict?

>         isp4if_clear_bufq(ispif);
>         isp4if_clear_cmdq(ispif);
> 
> ---
> base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
> change-id: 20261130-isp4-start-stream-deadlock-08e421deb181
> 
> Best regards,
> --
> Mateo Amado Ares <mateoamadoares@gmail.com>

Regards,
Bin


      reply	other threads:[~2026-12-01  9:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  8:26 [PATCH v2] media: amd: isp4: keep the subdev format when a stream stops Mateo Amado Ares via B4 Relay
2026-12-01  9:42 ` Bin Du [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=ce20dc16-edfd-41fb-9c16-516bfb3ca2a5@amd.com \
    --to=bin.du@amd.com \
    --cc=Benjamin.Chan@amd.com \
    --cc=King.Li@amd.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mateoamadoares@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=pratap.nirujogi@amd.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=sultan@kerneltoast.com \
    --cc=superm1@kernel.org \
    /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