From patchwork Mon Nov 18 13:35:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 13878624 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63BD6D49223 for ; Mon, 18 Nov 2024 13:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UMjisKeEpQSwI1Wvbjb6PN1AjDm43YkTXsgIuNYi82g=; b=V0lIs9JWpkdqyRCdecsEgBzV19 +aT/BYSukQ/0GIkqWk7BJEiv37I0FyQFCO0vh1ryF+b06Y7FG7JZAxTU30iNdqgh24eoBZqbXzIXr NqRfXfaoltuXREv/c/MCHHK4uEw+jPOTeFxeeODoPBXRnI1P3Aa7TdjJMoc47m83MdpK4pwficUVz cig7In8znVE/jranu29kQV1ULS1XLsn5vZ3/VxlaFc+Lf3IxJJXLYPuJIyYAKO670Jp1fGpSOisgi JTU8IR6cu13bYzikXLj9+gaei8NXFrs5L5t8M5IrAsdBcawqMgLAtIg79GZFoPD58VwFKMiFNBGD7 XTvo+Hqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tD27w-00000009f8t-0Zv2; Mon, 18 Nov 2024 13:49:16 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tD1z0-00000009cqZ-0kJ3 for linux-arm-kernel@lists.infradead.org; Mon, 18 Nov 2024 13:40:10 +0000 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AID5lPf003253; Mon, 18 Nov 2024 14:39:52 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= UMjisKeEpQSwI1Wvbjb6PN1AjDm43YkTXsgIuNYi82g=; b=CpJJSK4GczB4Whmm EyhcTzi7W6Q17/ykcRA3pLJvvAsd+/gT8Oe4Rwc9tQrRRaz4f6iTK4GzVjvxVzdM anriOsTirrOisSTXQbJU/+n2xcmCyqpBcrm5wHBbdv9UrhgqxXYvolygRtWz3U+V VFAKPEchRP/WeTEOVNUk7UiZL5rLu9kGFVLVfjh4ae2Gz9LFdLsUAPOCr+kt5Uay jP7vkCYLf1n7rcdNINyeWRo4L5t+bVqTCAKukkhAP+ZiwmC9BHVRKeKSWwwReZoj OZt3fe98OIcGp3WYKfkcYpPMQUTR8FL/C4aG7F9eF6YRz55YdoAm++On+neWTr3P wtF1Yg== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 42xknvyh8y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Nov 2024 14:39:52 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 8629C40063; Mon, 18 Nov 2024 14:38:33 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 01D16275656; Mon, 18 Nov 2024 14:35:33 +0100 (CET) Received: from localhost (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.37; Mon, 18 Nov 2024 14:35:32 +0100 From: Alain Volmat Date: Mon, 18 Nov 2024 14:35:34 +0100 Subject: [PATCH v3 11/15] media: stm32: dcmipp: fill media ctl hw_revision field MIME-Version: 1.0 Message-ID: <20241118-csi_dcmipp_mp25-v3-11-c1914afb0a0f@foss.st.com> References: <20241118-csi_dcmipp_mp25-v3-0-c1914afb0a0f@foss.st.com> In-Reply-To: <20241118-csi_dcmipp_mp25-v3-0-c1914afb0a0f@foss.st.com> To: Hugues Fruchet , Mauro Carvalho Chehab , Maxime Coquelin , Alexandre Torgue , Hans Verkuil , Sakari Ailus , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel CC: , , , , , Alain Volmat X-Mailer: b4 0.14.2 X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241118_054002_564835_15EACE59 X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add hw_revision field information of the media controller so that application can distinguish between variants of DCMIPP implementations. Signed-off-by: Alain Volmat --- drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c index 50b9b964fbc4674b870189736a49f1d6a02b2503..d2cc19bb40d77f67a1f5fe565bc62f45eff2d266 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c @@ -87,6 +87,7 @@ struct dcmipp_pipeline_config { size_t num_ents; const struct dcmipp_ent_link *links; size_t num_links; + u32 hw_revision; }; /* -------------------------------------------------------------------------- @@ -122,11 +123,13 @@ static const struct dcmipp_ent_link stm32mp13_ent_links[] = { MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE), }; +#define DCMIPP_STM32MP13_VERR 0x10 static const struct dcmipp_pipeline_config stm32mp13_pipe_cfg = { .ents = stm32mp13_ent_config, .num_ents = ARRAY_SIZE(stm32mp13_ent_config), .links = stm32mp13_ent_links, - .num_links = ARRAY_SIZE(stm32mp13_ent_links) + .num_links = ARRAY_SIZE(stm32mp13_ent_links), + .hw_revision = DCMIPP_STM32MP13_VERR }; #define LINK_FLAG_TO_STR(f) ((f) == 0 ? "" :\ @@ -496,6 +499,7 @@ static int dcmipp_probe(struct platform_device *pdev) /* Initialize media device */ strscpy(dcmipp->mdev.model, DCMIPP_MDEV_MODEL_NAME, sizeof(dcmipp->mdev.model)); + dcmipp->mdev.hw_revision = pipe_cfg->hw_revision; dcmipp->mdev.dev = &pdev->dev; media_device_init(&dcmipp->mdev);