From patchwork Fri May 3 15:51:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13653101 X-Patchwork-Delegate: kieran@bingham.xyz Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13C161552FE; Fri, 3 May 2024 15:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714751517; cv=none; b=l9eI727HmHStZOXwanGLjgI3h7S/3r3oCpUZZsjv3hv60f0UIKwrohSKioiJMLMxt1pu1UqRayyDySFhlr8R08i4jTSpaYTmkGtbprk6i0zKco4TAywcgSfxzBOF05W7IISSZJtHoPWJvziipJ6EMSHRN21w45xNL1UM/h18NRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714751517; c=relaxed/simple; bh=VNrSEU545G/j+FFqmKEQoDeNoFO4pmkIyGtskHTtHlc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hzJNQlIcqfEkUZ8t9xpVf0H/RCfdStWUGPRD+QYTTywO/uCMWBGoQ54E+kjyEDKCurjdSOV0tlD4R6pmUqOZ8EvuwRsRY0Mc7ffrSu2/UWdiI5fZx5meXc01beluW+BL17Ken6FzdtbsoCbfjUH7Fb0OmGLIlcT7wJJhEX8o1eQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=sTgXi5hM; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sTgXi5hM" Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 19D682A75; Fri, 3 May 2024 17:50:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1714751451; bh=VNrSEU545G/j+FFqmKEQoDeNoFO4pmkIyGtskHTtHlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sTgXi5hMwAaAKcyp/EhEfU/o+uJ7K+N+hAZB3xJaRsUhmmeclwoOQGEVThpirioOA 0n25M4EfvmYepnk3aYG2ou6KTDpjHPWlIXOb746eouCSqIFVJXKq4NCdnYkP/MQ2ig vmNw47Mk67wKJ+IBNK42wdusLsWBgeNYHK6szQcE= From: Jacopo Mondi To: Laurent Pinchart , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= , Sakari Ailus , Kieran Bingham , Tomi Valkeinen Cc: Jacopo Mondi , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 05/11] media: adv748x-csi2: Initialize subdev format Date: Fri, 3 May 2024 17:51:20 +0200 Message-ID: <20240503155127.105235-6-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240503155127.105235-1-jacopo.mondi@ideasonboard.com> References: <20240503155127.105235-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Initialize the subdevice format to the default 1280x720 YUV 4:2:2. The subdevice format is propagated from the frontend (HDMI or AFE) to the CSI-2 tx, but it was not initialized during the CSI-2 tx registration. Use YUYV8 1280x720 as default format as it's supported by both TXes in all supported configurations (1, 2 or 4 CSI-2 lanes). Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- drivers/media/i2c/adv748x/adv748x-csi2.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c index 5b265b722394..9da7f6742a2b 100644 --- a/drivers/media/i2c/adv748x/adv748x-csi2.c +++ b/drivers/media/i2c/adv748x/adv748x-csi2.c @@ -14,6 +14,13 @@ #include "adv748x.h" +static const struct v4l2_mbus_framefmt adv748x_csi2_default_fmt = { + .width = 1280, + .height = 720, + .code = MEDIA_BUS_FMT_YUYV8_1X16, + .field = V4L2_FIELD_NONE, +}; + int adv748x_csi2_set_virtual_channel(struct adv748x_csi2 *tx, unsigned int vc) { return tx_write(tx, ADV748X_CSI_VC_REF, vc << ADV748X_CSI_VC_REF_SHIFT); @@ -311,6 +318,8 @@ int adv748x_csi2_init(struct adv748x_state *state, struct adv748x_csi2 *tx) if (ret) return ret; + tx->format = adv748x_csi2_default_fmt; + ret = v4l2_async_subdev_endpoint_add(&tx->sd, of_fwnode_handle(state->endpoints[tx->port])); if (ret)