From patchwork Fri Dec 8 15:22:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Massot X-Patchwork-Id: 752888 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="XoGlIMyz" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9372FB for ; Fri, 8 Dec 2023 07:23:38 -0800 (PST) Received: from stla-brain-8255-1.home (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1FD7E66073BF; Fri, 8 Dec 2023 15:23:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702049017; bh=8K5r82lr6/FS1WCeVe8W58vchtyHKQokA1fblw9doF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XoGlIMyzuxw4F15k6ixOKJg9gTQEGpPy7SgmvREpwO+1KMrZSuAkHhvyj1JftlQY2 k96g77F8/z7dz9YMfG0A9sWKd6VEpKmSUPQbSN2tdNlgxGsU8RtUQTd0VLSRIAPuYa EaCxdc0EDbxLcAXYahPVY3XQgW0s8GoIL0hDiz9f4eIfvEdrckpH1FxmvPcBK3lmA2 BVViJ7Fx9eCPXqg2zwqmLipe77ILsungdV3AM2ePWcauLaEDugJlJLfWIOidNzPeTc byghDW6XmhuEkQh6q7PO9AF2kYMPVA7Ev0RLSVqZplcX//Ftx6TvbIH784peFNXg7q XP1AGjEek6/1w== From: Julien Massot To: linux-media@vger.kernel.org, j-luthra@ti.com Cc: kernel@collabora.com, Julien Massot Subject: [PATCH 1/3] media: cadence: csi2rx: use match fwnode for media link Date: Fri, 8 Dec 2023 16:22:53 +0100 Message-ID: <20231208152255.472467-2-julien.massot@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231208152255.472467-1-julien.massot@collabora.com> References: <20231208152255.472467-1-julien.massot@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On some subdev the fwnode is the device node and not the endpoint node. Using the subdev fwnode doesn't allow to fetch the subdev pad we are connected to when the remote subdev has multiple output pads. Signed-off-by: Julien Massot --- drivers/media/platform/cadence/cdns-csi2rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c index b751227fc8a0..b9356cc7a192 100644 --- a/drivers/media/platform/cadence/cdns-csi2rx.c +++ b/drivers/media/platform/cadence/cdns-csi2rx.c @@ -464,7 +464,7 @@ static int csi2rx_async_bound(struct v4l2_async_notifier *notifier, struct csi2rx_priv *csi2rx = v4l2_subdev_to_csi2rx(subdev); csi2rx->source_pad = media_entity_get_fwnode_pad(&s_subdev->entity, - s_subdev->fwnode, + asd->match.fwnode, MEDIA_PAD_FL_SOURCE); if (csi2rx->source_pad < 0) { dev_err(csi2rx->dev, "Couldn't find output pad for subdev %s\n", From patchwork Fri Dec 8 15:22:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Massot X-Patchwork-Id: 751887 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="YmZtA6Us" Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170BCFB for ; Fri, 8 Dec 2023 07:23:43 -0800 (PST) Received: from stla-brain-8255-1.home (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by madras.collabora.co.uk (Postfix) with ESMTPSA id B36DB66073BB; Fri, 8 Dec 2023 15:23:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702049021; bh=9N0swWfoVJntqQNSUCJQF364aRZyi/YUqtvJOic3SZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YmZtA6UsY/klCRz2AMHBbelCRwmqDFb3j4KPK0lE77FeAZNlK2XaMQW31sAe3uHrV CCYppJBGsaEJE954q3M+Dms6rUY+OI7bydkYMtcMHLK/Z8gC5B4p4A02iuMjepUkrq fqQHv68KIhTe/cQ2xTE/9T4yN35X71rJU7EvmhqEHBcaq9BuQXA0NiqapwzMgNg+mp 6og9QkPwmd8SklVWHa/OEgJeXbUUOf36Y1TDVuH1TBz6CCzna+WDdtG+2wuOfD2aio JuCaXARvDk75BbXCRGZcFT5Oy37ikizaT83hfoWMghJegVP0Keg4Fn8JsR5c02V6X+ Cv+lngcSA+71g== From: Julien Massot To: linux-media@vger.kernel.org, j-luthra@ti.com Cc: kernel@collabora.com, Julien Massot Subject: [PATCH 2/3] media: cadence: csi2rx: add Y8_1X8 format Date: Fri, 8 Dec 2023 16:22:54 +0100 Message-ID: <20231208152255.472467-3-julien.massot@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231208152255.472467-1-julien.massot@collabora.com> References: <20231208152255.472467-1-julien.massot@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add support for MEDIA_BUS_FMT_Y8_1X8 format. Signed-off-by: Julien Massot --- drivers/media/platform/cadence/cdns-csi2rx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c index b9356cc7a192..d24880e27607 100644 --- a/drivers/media/platform/cadence/cdns-csi2rx.c +++ b/drivers/media/platform/cadence/cdns-csi2rx.c @@ -114,6 +114,7 @@ static const struct csi2rx_fmt formats[] = { { .code = MEDIA_BUS_FMT_SGBRG8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SGRBG8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SRGGB8_1X8, .bpp = 8, }, + { .code = MEDIA_BUS_FMT_Y8_1X8, .bpp = 8, }, { .code = MEDIA_BUS_FMT_SBGGR10_1X10, .bpp = 10, }, { .code = MEDIA_BUS_FMT_SGBRG10_1X10, .bpp = 10, }, { .code = MEDIA_BUS_FMT_SGRBG10_1X10, .bpp = 10, }, From patchwork Fri Dec 8 15:22:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Massot X-Patchwork-Id: 752887 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="FJ09JNX2" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F7C6FB for ; Fri, 8 Dec 2023 07:23:47 -0800 (PST) Received: from stla-brain-8255-1.home (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jmassot) by madras.collabora.co.uk (Postfix) with ESMTPSA id 0613866073BF; Fri, 8 Dec 2023 15:23:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702049026; bh=bZARkojTz4JnOHoYbdnhpJJwdc5KGpsee8ig2wSxtsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FJ09JNX2qnLMRpLlIXAvVdsV2r5+ZDH3Wio/6yeXBTvUHhWt62HMI9eqtpq/P0svx VNcKz5gphEnqKTbdYVODMUCXxdzHPO/u4nQMPPnxOeD0Ndmu7cDLFngYZnV2GGgQ+R znoBaIkVSLw/bpW0SXfA0tqshisrZccNGKg5cvezCVJAxbw4FCewUziTKfMSXsVNeC EG2LLNmsF3lR+j5pY5/DoA3tyRpLCkn46p4OI5ODbadUccus+JlwP2bNKTwaj9mboN TdNQACHw3xpu8AuuWZnPNMMbKdSrwzLNYEpOwZOpiyrj5VjjWuqtQi9m0qRFjIMXAn xfp7dzn7I1rpA== From: Julien Massot To: linux-media@vger.kernel.org, j-luthra@ti.com Cc: kernel@collabora.com, Julien Massot Subject: [PATCH 3/3] media: ti: j721e-csi2rx: add GREY format Date: Fri, 8 Dec 2023 16:22:55 +0100 Message-ID: <20231208152255.472467-4-julien.massot@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231208152255.472467-1-julien.massot@collabora.com> References: <20231208152255.472467-1-julien.massot@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add Grey format to properly select RAW8 data type. Tested with a ST VG5661 sensor. Signed-off-by: Julien Massot --- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c index ada61391c8d2..46d37401512b 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -158,6 +158,12 @@ static const struct ti_csi2rx_fmt ti_csi2rx_formats[] = { .csi_dt = MIPI_CSI2_DT_RAW8, .bpp = 8, .size = SHIM_DMACNTX_SIZE_8, + }, { + .fourcc = V4L2_PIX_FMT_GREY, + .code = MEDIA_BUS_FMT_Y8_1X8, + .csi_dt = MIPI_CSI2_DT_RAW8, + .bpp = 8, + .size = SHIM_DMACNTX_SIZE_8, }, { .fourcc = V4L2_PIX_FMT_SBGGR10, .code = MEDIA_BUS_FMT_SBGGR10_1X10,