Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.5 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796230755; b=3fzE7khJECRc+bpbjwsocWQ0ZQYJM2KhAl6pFx5luURnoMN3cubp8zy6jJ+tY4n6OHUs hQhQe7j98z87BOiNil2qavdxjzqG3ilkZNY1b9W4niJrrWz53HCyMPAagUjiO/w+7uO8t MRGctHcJbZqcidtXPtOEtIvHdyC7lN4dugAtXqOw2STP2ShzzuwrTpYrBk92jBeJtjr23 VuHsmWukyYvONt9xr7529E6RHQT6wiTmE9v2ajFUiqAFZowLRMYf144ewI+O67xHWf3TN jhmoyZXklioDpEt1euuGgUL9TahjQXrOZp3jRwflEOt8HzLv2tmlGE28tGCCdOtqj4Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796230755; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam: X-CM-SenderInfo; bh=TOhJJeuOgZP7RnOqueILvk/GzaRPVBWPDK3rFkekEvA=; b=a2EMXsODyBRJjqLrCjKht8dlAhc95on3XJjc79UTB4m2B00Z43jNFJ3tjeCQ+uBO/1ih k5l5BWAetWEAXXYWVy4d7zAndd4nTFZxA+CX0+h8BY44u8cPHlbSzv62tZ1EER65f4L7Q DvwkD7sx5zIYwSeML/kmTHmzTKIRLKJiipMnD+vc7MhmaxdoI24nXbw15Pa4yJpkV/G0Y vztnnTk7TMODIYxgPGpW9ekhrjjENoJ6SGkeRdpsRtEtVhfpl85eFxtgnJwTpHt6YHMmJ C3DuARRy+I/CaakdN+NSiBCqUUdc2Fd2h/VqbqZ7UG7ZEPHRLBR3YD6hSV3kfOBLSCw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Zs6FN7kU; arc=none smtp.remote-ip=220.197.31.5 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C610606A685; Wed, 2 Dec 2026 16:59:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6C610606A685 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Zs6FN7kU DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=TOhJJeuOgZP7RnOqueILvk/GzaRPVBWPDK3rFkekEvA=; b=Zs6FN7kU+zCdGAB1AdHLvuqYDZ2aPqDE4KlOSGALTM8GxSMGcSU9rb+DqBAdIs 5U+G6yqZxZBcpY7JZxaKefT0aOPz36VpLJiUtZKkvIeZB/h+fN1YJM76kKPcm7nd FBEq2UYb06+EaZcd9vB+a9ukRUiX8YUM/XggMWlHRLyak= Received: from Ubuntu26.04LTS (unknown []) by gzsmtp2 (Coremail) with SMTP id PSgvCgAHWxpGThBrp1bPIw--.24317S2; Thu, 03 Dec 2026 00:58:47 +0800 (CST) From: Jiaqi Shi To: Frank Li Cc: Jiaqi Shi , linux-media@vger.kernel.org, imx@lists.linux.dev, linux-staging@lists.linux.dev, slongerbeam@gmail.com, p.zabel@pengutronix.de, mchehab@kernel.org, gregkh@linuxfoundation.org, Frank.Li@nxp.com, kernel@pengutronix.de, festevam@gmail.com Subject: Re: [PATCH v8 1/2] media: imx: remove legacy video node control and format handling Date: Thu, 3 Dec 2026 00:58:46 +0800 Message-ID: <20261202165846.859907-1-shijiaqi_develop@163.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: <20261201152647.847238-1-shijiaqi_develop@163.com> <20261201152647.847238-2-shijiaqi_develop@163.com> X-Mailing-List: imx@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID:PSgvCgAHWxpGThBrp1bPIw--.24317S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZFykGw17ArWDtFW8CryDKFg_yoW8AFykpF yfKF98Ka4kGF4FvFn2kr1xWFyfCw4Skan8XwsxWrWUC3s3Zry29rWxAa45AF98GrZavF4j qrWrWr93G39xAFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JUs0ePUUUUU= X-CM-SenderInfo: xvklyxpdtlsvxhyhz0rs6rljoofrz/xtbC8AeD1msQTkesHwAA3j Hi Frank, On Tue, Dec 01, 2026 at 10:21:40AM -0600, Frank Li wrote: > This part belong to bug fix, missed imx_media_capture_device_remove() at > error path, user seperate patch to fix it. > > why remove it here? Let me clarify, because I see this as a consequence of dropping the control inheritance, not as a separate bug fix. Once capture video nodes no longer inherit controls from the pipeline, the per-video-device control handler (priv->ctrl_hdlr) is never populated anymore. imx_media_capture_device_remove() only frees that handler, so it becomes a no-op and is removed together with its call sites: - prp_registered(): on register failure it used to jump to remove_vdev and free the (now non-existent) handler; with the handler gone, a plain "return ret" is correct. - prp_unregistered(): it no longer calls remove(), because that function no longer exists. The ctrl_hdlr freed on the next line is the PRP subdev's own handler, not the video node's. So I don't think the original error path had a bug; it is the removal of the handler that made remove() unnecessary. If you still see a separate bug here, could you point out what it is? I want to make sure I fix the right thing. > Can you split to more small patches, such as just add priv for > __capture_try_fmt() Agreed, the current patch is too large and mixes several independent changes. I will split it into smaller patches, roughly in this order: - remove subdev control inheritance (and the now-unused video-node control handler together with imx_media_capture_device_remove()) - remove legacy format handling - improve format validation: pass priv to __capture_try_fmt() for ic_route, sanitize field, clamp dimensions, resolve colorimetry, and handle size overflow Regards, Jiaqi