From patchwork Thu Feb 17 13:56:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 543556 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7D46C433EF for ; Thu, 17 Feb 2022 13:57:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241475AbiBQN5x (ORCPT ); Thu, 17 Feb 2022 08:57:53 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241461AbiBQN5w (ORCPT ); Thu, 17 Feb 2022 08:57:52 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B6AE17BCFE; Thu, 17 Feb 2022 05:57:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106258; x=1676642258; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZaYSKtA1O7qxouP3wb+9mrJGwNtoT++RyRl6T1YABRU=; b=XC+R6ZDLToFpJmSkaVeiKLUF+MaGiYPzkSmGrneNzbF2HxfkqOSw1rfs CpgM9m95mkzxVo37KPzdAHhyhb+Tc/qU6rr3ZSqQoqPVNtXEM9qmwv+A6 6t2/ODOUtt4J23jMHsyPeNCL2DrYWpL4SU1LfiMkt4Hz78LJFGhpamIHi iSxkSLiGKvHbPHmsk2JsVoXsiAvL8xJjjfeaHjRtO+peabpQNhNmNt7Ba n7v4agtlwa1F4VaDlPmpRTN+t0QBlBiFulf4QOxxDU4UHfpBPsXxYa/IR uBdEBFzbETNx/SXdmSiyMFREy9GcAisClKHbF2L2BJ3DPYc9g/wMVornb w==; IronPort-SDR: AoTl3KjTNUNer6KXMevhQNk8QL7VpRuMBPgjxmvwanWZWUwkxK0qJn+MzuOm2N3hEvux986l/N mYHuhMacrdQ9jxMB9t2Vmzcr9zaVgDlvwV0zWEyGRNpGkuDb5aAf/c6uJbd4zHf55wihv34rrL FBtKVb0tdG/agbZ9y9iMZSLx7lXmRBXPEMDVkkRVMtyGhDJXLe6k3e+JvISgGOaBVEhzYmFiVW BEB73XndZqb/uy7d+4ypppbYLuSNaWe30us0JKf8IuxesvlFzLinil0dIGHaTrgOyIQ37I82Nh GdZ4nFv00Qyz/wOtiyDsrJ5a X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="153432049" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 06:57:38 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 06:57:36 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 06:57:24 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v5 01/13] media: atmel: atmel-isc-base: use streaming status when queueing buffers Date: Thu, 17 Feb 2022 15:56:33 +0200 Message-ID: <20220217135645.1427466-2-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org During experiments with libcamera, it looks like vb2_is_streaming returns true before our start streaming is called. Order of operations is streamon -> queue -> start_streaming ISC would have started the DMA immediately when a buffer is being added to the vbqueue if the queue is streaming. It is more safe to start the DMA after the start streaming of the driver is called. Thus, even if vb2queue is streaming, add the buffer to the dma queue of the driver instead of actually starting the DMA process, if the start streaming has not been called yet. Tho achieve this, we have to use vb2_start_streaming_called instead of vb2_is_streaming. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi --- drivers/media/platform/atmel/atmel-isc-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c index db15770d5b88..d2cc6c99984f 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -442,7 +442,7 @@ static void isc_buffer_queue(struct vb2_buffer *vb) spin_lock_irqsave(&isc->dma_queue_lock, flags); if (!isc->cur_frm && list_empty(&isc->dma_queue) && - vb2_is_streaming(vb->vb2_queue)) { + vb2_start_streaming_called(vb->vb2_queue)) { isc->cur_frm = buf; isc_start_dma(isc); } else From patchwork Thu Feb 17 13:56:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 543555 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0A2BC433FE for ; Thu, 17 Feb 2022 13:58:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240116AbiBQN64 (ORCPT ); Thu, 17 Feb 2022 08:58:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240238AbiBQN6z (ORCPT ); Thu, 17 Feb 2022 08:58:55 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C568B2B04B1; Thu, 17 Feb 2022 05:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106319; x=1676642319; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HMHVBW5xJnQ6+rjm9f9+3MplRfX0nD0A6a0io82wM4o=; b=vPUuOdxf0bou/vKMzw7nwvDM6GVzGnvSDrEZLrEBiXnB2TNfnWel2U0+ ZV+7dwWj0kVtUkmlorqfW1J2jVhcD52SQYKrougK7Kda9dtH1QBJ0xqk6 zpRhMvD78cAX5tOjq6ntCrPAxij2v2Ye/M79HdosO5Tn5nY/N85ldjlP7 G1RgbAr0fCcja7eBZfT3T8W/bHk26S+R5vQ/riwU9kh6+OrCxM7dPpr2r 4gJjh74BNmteTQAtmxpd0yQ5tRtq+nT53aJdJGszEKnD/CvxB4i9NphUX KQ4Ur33RU7VcZh02AO4jNIKrK8J6PW6t6b9Aj9OqcsRwghc51CHYvr+9E g==; IronPort-SDR: EPfv1I96D/dE2hg+4n9/eezvCI71KYdhRyT1KVRUSmgZQtDjyaT32uOIpxBvcJVbOtum6olWVz 002UIosxZIrwhpM1pmFS7aEXoBv65S0CFoXmdXVWdlpjv+8uPKMAreLPVlvnPr0gN8UUzi5OrG GzRzRkg8Oswg+/iEgxq9oqHh8beb0a96gMx8ZQ5AeaMwOxOQV+ZrR5ue7J5R/kLL3295R8VnU9 20gRnLk9Baz6XR3FE2hz/D0UoD/fDUwU2uDjq6i+qJ64Tgd5RqBf54hbW5O8pYY18HPzLytzQX vkiMSICta3MV5ZCa+b4O+gin X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="86082200" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 06:58:22 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 06:58:22 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 06:58:01 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v5 03/13] media: atmel: atmel-isc: remove redundant comments Date: Thu, 17 Feb 2022 15:56:35 +0200 Message-ID: <20220217135645.1427466-4-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove duplicate comments which are already in place before the struct definition. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi --- drivers/media/platform/atmel/atmel-isc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h index 07fa6dbf8460..f9ad7ec6bd13 100644 --- a/drivers/media/platform/atmel/atmel-isc.h +++ b/drivers/media/platform/atmel/atmel-isc.h @@ -272,7 +272,7 @@ struct isc_device { struct video_device video_dev; struct vb2_queue vb2_vidq; - spinlock_t dma_queue_lock; /* serialize access to dma queue */ + spinlock_t dma_queue_lock; struct list_head dma_queue; struct isc_buffer *cur_frm; unsigned int sequence; @@ -289,8 +289,8 @@ struct isc_device { struct isc_ctrls ctrls; struct work_struct awb_work; - struct mutex lock; /* serialize access to file operations */ - spinlock_t awb_lock; /* serialize access to DMA buffers from awb work queue */ + struct mutex lock; + spinlock_t awb_lock; struct regmap_field *pipeline[ISC_PIPE_LINE_NODE_NUM]; From patchwork Thu Feb 17 13:56:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 543554 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E019BC433EF for ; Thu, 17 Feb 2022 13:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241542AbiBQN7O (ORCPT ); Thu, 17 Feb 2022 08:59:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241536AbiBQN7N (ORCPT ); Thu, 17 Feb 2022 08:59:13 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 060FE2B04AA; Thu, 17 Feb 2022 05:58:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106339; x=1676642339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q6diDbG5W/BH3EeOJNaDQg5HrHiclFaPCU00lATXlck=; b=ixropleGBgqZpP6tdjTMVM30PcMhnFOfAgVBJTZYWQkK7WgSPS1p/nGd 6g0Nid9cxwQd79FrhjwanXlaqGI48qhLFVCoPKzA08x4yAy1Exv4yr5t9 7dEy1s8FJt5A9Io+5pScZqPQC162681li7yxpxDVMvrV6xQAKvVg7LerG e5GncG9lTCRg5sPbcrBD9NsNdabkDTVlg/o433UpU10HrzLbVqE4b/uhH 2DwRL8e46ujOaWzGVykx1pEGk+Iq5JuYo7zt3zUgu6coGhzUagpMUoA2P HnUFnT4iQrBgVKDKge7ml1xgEf97yej+vrZkMZT5oT6IXl5ib5gEM9UcU w==; IronPort-SDR: ug/QtYItfUctoanUV7aHR5K+FUfnwGMGYfVgV9nmUlf60XjI2WrkhLXKHMnL83Ymc0E6NsjbjX 1yzefEq8AL3dywUk0wZvRtgvntI0JlU8OXWyS/sfouzIzePF0y7uWkY0sm5ozt15b2YWyAyUit dRDsEeRX9X5d2db7GmpSZh2qlSuDe1oxLf3w+PwArMKytDZux4Jy4iaiRQoBVnWCpXI+9mcrTT /BBIPgXmzGHfqz70Zq1J6442MosnAUnVC94jINL4VW1wTKg937z4Q4m4gXyp1rKpc31phSqink XgiHzTrEJKctISTdBP9wZkXa X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="153432210" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 06:58:52 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 06:58:52 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 06:58:36 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v5 05/13] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Thu, 17 Feb 2022 15:56:37 +0200 Message-ID: <20220217135645.1427466-6-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org While this does not happen in production, this check should be done versus the mask, as checking with the YCYC value may not include some bits that may be set. Is it correct and safe to check the whole mask. Fixes: 123aaf816b95 ("media: atmel: atmel-sama5d2-isc: fix YUYV format") Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi --- drivers/media/platform/atmel/atmel-sama5d2-isc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c index c244682ea22f..025c3e8a7e95 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -291,7 +291,7 @@ static void isc_sama5d2_config_rlp(struct isc_device *isc) * Thus, if the YCYC mode is selected, replace it with the * sama5d2-compliant mode which is YYCC . */ - if ((rlp_mode & ISC_RLP_CFG_MODE_YCYC) == ISC_RLP_CFG_MODE_YCYC) { + if ((rlp_mode & ISC_RLP_CFG_MODE_MASK) == ISC_RLP_CFG_MODE_YCYC) { rlp_mode &= ~ISC_RLP_CFG_MODE_MASK; rlp_mode |= ISC_RLP_CFG_MODE_YYCC; } From patchwork Thu Feb 17 13:56:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 543553 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1CC0C433FE for ; Thu, 17 Feb 2022 13:59:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240977AbiBQN7y (ORCPT ); Thu, 17 Feb 2022 08:59:54 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240394AbiBQN7v (ORCPT ); Thu, 17 Feb 2022 08:59:51 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA8C2B0B06; Thu, 17 Feb 2022 05:59:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106377; x=1676642377; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=inbCfOApjHcZj6rPnStLuoDA+QTiQF8O+NIL6iLwJf0=; b=gS2xgvHuwxPghenft8uY1RPFw7CY6xHc7DNwZvOX2HQ1hU15Iq4yt0qz jHgVesy48N+TP1JO6Xsw1+hFN8NFsA4V/YXRi6TViFbbierLfBF5e1/18 yQ0hTLGWxta0eqWeyOL8LeCZvN4B/7wW7Q4SGZ+a9taxb5PnQqIK/sg2/ WHT48nv/GsY3D7aOPYmtzEPUEMiUBR/i3t2/aaNW61fCNIBZGdv2Nqbzj mrpMaldp5npjsXjVXezmUDxIV5dYq/BfzBPT3yoEGnJbk2IjPoqo6UZo2 K8sqGUONjUses/2B8aK1X8o/IOStSlkiz+cOXfdF5VbRdYcEgllJGOuhl g==; IronPort-SDR: vA1LO23cUspxTA9+vKKxFGXby8p3yhvA0tehHzhbW2r0jfWqs/PvAWhbNbaJtUp7huL7pdtylr bFCV8UABV18wmjRqlP4Kw4m+w1YkerAGEn2mYsnSiFHsWQxOwgC+a+MGx/UnfgEGu6yOYEo5il hwZc+UPtKq01vcODfaxsStK8dVO41gxiZcxBKfYhccr3YxdQtaqCnjwfPmFdaLnBTQhlRQOxbf JT8midOO8GGtFgWbK1WXYsLwDF9b1eTxE4PzLgOpeLUN8qRmVjlFVSrcyIB/QfooSqcyWL1nBS eblsYAZygTk9wNd1U6uiolLz X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="149064309" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 06:59:36 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 06:59:35 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 06:59:09 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" , Jacopo Mondi Subject: [PATCH v5 07/13] media: atmel: atmel-isc: compact the controller formats list Date: Thu, 17 Feb 2022 15:56:39 +0200 Message-ID: <20220217135645.1427466-8-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Compact the list array to be more readable. No other changes, only cosmetic. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi --- .../media/platform/atmel/atmel-sama5d2-isc.c | 51 ++++++---------- .../media/platform/atmel/atmel-sama7g5-isc.c | 60 +++++++------------ 2 files changed, 37 insertions(+), 74 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c index 025c3e8a7e95..d96ee3373889 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -60,56 +60,39 @@ static const struct isc_format sama5d2_controller_formats[] = { { .fourcc = V4L2_PIX_FMT_ARGB444, - }, - { + }, { .fourcc = V4L2_PIX_FMT_ARGB555, - }, - { + }, { .fourcc = V4L2_PIX_FMT_RGB565, - }, - { + }, { .fourcc = V4L2_PIX_FMT_ABGR32, - }, - { + }, { .fourcc = V4L2_PIX_FMT_XBGR32, - }, - { + }, { .fourcc = V4L2_PIX_FMT_YUV420, - }, - { + }, { .fourcc = V4L2_PIX_FMT_YUYV, - }, - { + }, { .fourcc = V4L2_PIX_FMT_YUV422P, - }, - { + }, { .fourcc = V4L2_PIX_FMT_GREY, - }, - { + }, { .fourcc = V4L2_PIX_FMT_Y10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SBGGR8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGBRG8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGRBG8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SRGGB8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SBGGR10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGBRG10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGRBG10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SRGGB10, }, }; diff --git a/drivers/media/platform/atmel/atmel-sama7g5-isc.c b/drivers/media/platform/atmel/atmel-sama7g5-isc.c index 9dc75eed0098..e07ae188c15f 100644 --- a/drivers/media/platform/atmel/atmel-sama7g5-isc.c +++ b/drivers/media/platform/atmel/atmel-sama7g5-isc.c @@ -63,65 +63,45 @@ static const struct isc_format sama7g5_controller_formats[] = { { .fourcc = V4L2_PIX_FMT_ARGB444, - }, - { + }, { .fourcc = V4L2_PIX_FMT_ARGB555, - }, - { + }, { .fourcc = V4L2_PIX_FMT_RGB565, - }, - { + }, { .fourcc = V4L2_PIX_FMT_ABGR32, - }, - { + }, { .fourcc = V4L2_PIX_FMT_XBGR32, - }, - { + }, { .fourcc = V4L2_PIX_FMT_YUV420, - }, - { + }, { .fourcc = V4L2_PIX_FMT_UYVY, - }, - { + }, { .fourcc = V4L2_PIX_FMT_VYUY, - }, - { + }, { .fourcc = V4L2_PIX_FMT_YUYV, - }, - { + }, { .fourcc = V4L2_PIX_FMT_YUV422P, - }, - { + }, { .fourcc = V4L2_PIX_FMT_GREY, - }, - { + }, { .fourcc = V4L2_PIX_FMT_Y10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_Y16, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SBGGR8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGBRG8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGRBG8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SRGGB8, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SBGGR10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGBRG10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SGRBG10, - }, - { + }, { .fourcc = V4L2_PIX_FMT_SRGGB10, }, }; From patchwork Thu Feb 17 13:56:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 543552 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FDA1C43217 for ; Thu, 17 Feb 2022 14:00:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241574AbiBQOBG (ORCPT ); Thu, 17 Feb 2022 09:01:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241660AbiBQOA6 (ORCPT ); Thu, 17 Feb 2022 09:00:58 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20AF42B0B08; Thu, 17 Feb 2022 06:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106422; x=1676642422; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WMo3A0FXzl8kVU3sLYwWm3RXrK0Q37aqF1ExPiMbpJs=; b=WeszXtQ3TCA1atMu3P50wwQm1K4oVTr1a6d1Gp/jXy8+DSKfE3Qv5qMi p8EUngEpJzlYjsyggzOeAGyxFJWWj7fyGb9/E+Px73Xhmdf28YfNQPbuh A0DQh4BFdAqTRDLB6wsic20cevqeZpmnnoVE5uHuLph9JhRb7CNvkYleN A7Z24WQG0a+fhrIVK3NTO4zeI/gmyynYyLnuVcex8oLiLRsCUx9NlDkuL +6heV4x5I13X5bxF37kmZNVwTCJVu09faC/S17gtRww2tcNsu7nWlvkae 1zpLZjDj367SFeUuDpab3ifGgb4rZ8UN2TqWdPXd0e7/g/vY729Gsc1x6 A==; IronPort-SDR: ZHvn6cQkHfF5xdWBh+AVqWkLPLUHQIfwcmXtyvYD3ahlqRKceEzmIFQaUD1fEHztg7Vw5AULu8 P367lOF1pVOY7hsjE1yBMyDMrmAIm+AGP+YNokojZv7vdsr8jbBY3Ll15CCdj7cWSm4ZZ/Duk7 Dqz0kgmwFmlRjhJUHHDQg4DGdvf5qeqZJWqKDA6dlTuLAbtPWX1whj/85VF9FA/FseuYrAbgSb rGa5RZ/BK7WdBTjpbphQTGW5ScBnmDAmMG5sWoVb2mkIBmHoJsMfiaNPRJXx+qObZ3BcFpYBC2 gtDCOLuVfiseKlspHDo+YPzY X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="146333777" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 07:00:21 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 07:00:21 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 06:59:58 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v5 09/13] media: atmel: atmel-sama7g5-isc: remove stray line Date: Thu, 17 Feb 2022 15:56:41 +0200 Message-ID: <20220217135645.1427466-10-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove stray line from formats struct. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi --- drivers/media/platform/atmel/atmel-sama7g5-isc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-sama7g5-isc.c b/drivers/media/platform/atmel/atmel-sama7g5-isc.c index a0d60cfdba7b..638af8da2694 100644 --- a/drivers/media/platform/atmel/atmel-sama7g5-isc.c +++ b/drivers/media/platform/atmel/atmel-sama7g5-isc.c @@ -225,7 +225,6 @@ static struct isc_format sama7g5_formats_list[] = { .mbus_code = MEDIA_BUS_FMT_Y10_1X10, .pfe_cfg0_bps = ISC_PFG_CFG0_BPS_TEN, }, - }; static void isc_sama7g5_config_csc(struct isc_device *isc) From patchwork Thu Feb 17 13:56:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 543551 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 902E3C433EF for ; Thu, 17 Feb 2022 14:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241609AbiBQOBM (ORCPT ); Thu, 17 Feb 2022 09:01:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241598AbiBQOBL (ORCPT ); Thu, 17 Feb 2022 09:01:11 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5CB72B04A8; Thu, 17 Feb 2022 06:00:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106455; x=1676642455; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LPz0O/j6T/R5IOZ/0HdGMFHbVlsAXUy78/qaH+crieA=; b=mqyyiGgomU+PlYV9YKmeK7FEU8LKAp4x0JKW/VAH9yjd8F7axzJu42FD HqteaUtFIqW2K/4uI6FdH1Fcj3bSqdcwAYNufD+3oygo3btoP1Gpd4GQv 47LcSTS9sP3zfP0R+lCK9tiF6ln3lTr/Mz2I9lq1LJjwtS16quLmb2Nho uUUm0aRcjpBz+BpoIbStbjkxeEL8aE4b/z91uU81CLmW3U0bPgF2tbYoY yNksN6MGI913W10XYw5v/5knmMDaCZ4dnizVkmFHL/pONQQDjkJ1rrjFG h9pWLr8ae3R7R4JRBc/VK7+2VGWkChvzuCwsDMeNAEcittPKvbqbNk6NS A==; IronPort-SDR: TRRtxLkLtlDP3IVsRHBycrDjE1LpoybqYFtoZZrDp1FB7ZnRml3jC/9wEepgEjwPPmHLFsSlIh WRsgq6Sn4JRdAtLOoDpUhhB61ZzXG5PbcgJazDBQfMzMU30HTKN7w0dE0254KKH8dbSWaUWH/U sJ7pz3Pq4YdjQXVT2UE7azVWSAr8UgOH4CalSbyfMCuIzhEKFiBsXumeK1UlaHpD/hePDXMP6Q 42D/cezJHqcU2+SRavBLkIvOydMluFiNPyI3z0m5PNo00l6LQzsvFkU9JkUumz7Nv2PsiN8dAz uPgOBSvriUVaGeRIG69id1V2 X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="162632307" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 07:00:55 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 07:00:55 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 07:00:41 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v5 11/13] ARM: dts: at91: sama7g5: add nodes for video capture Date: Thu, 17 Feb 2022 15:56:43 +0200 Message-ID: <20220217135645.1427466-12-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add node for the XISC (eXtended Image Sensor Controller) and CSI2DC (csi2 demux controller). These nodes represent the top level of the video capture hardware pipeline and are directly connected in hardware. Signed-off-by: Eugen Hristev --- arch/arm/boot/dts/sama7g5.dtsi | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi index eddcfbf4d223..de43f854ce47 100644 --- a/arch/arm/boot/dts/sama7g5.dtsi +++ b/arch/arm/boot/dts/sama7g5.dtsi @@ -266,6 +266,55 @@ sdmmc2: mmc@e120c000 { status = "disabled"; }; + csi2dc: csi2dc@e1404000 { + compatible = "microchip,sama7g5-csi2dc"; + reg = <0xe1404000 0x500>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 34>, <&xisc>; + clock-names = "pclk", "scck"; + assigned-clocks = <&xisc>; + assigned-clock-rates = <266000000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + csi2dc_in: endpoint { + }; + }; + + port@1 { + reg = <1>; + csi2dc_out: endpoint { + bus-width = <14>; + hsync-active = <1>; + vsync-active = <1>; + remote-endpoint = <&xisc_in>; + }; + }; + }; + }; + + xisc: xisc@e1408000 { + compatible = "microchip,sama7g5-isc"; + reg = <0xe1408000 0x2000>; + interrupts = ; + clocks = <&pmc PMC_TYPE_PERIPHERAL 56>; + clock-names = "hclock"; + #clock-cells = <0>; + clock-output-names = "isc-mck"; + + port { + xisc_in: endpoint { + bus-type = <5>; /* Parallel */ + bus-width = <14>; + hsync-active = <1>; + vsync-active = <1>; + remote-endpoint = <&csi2dc_out>; + }; + }; + }; + pwm: pwm@e1604000 { compatible = "microchip,sama7g5-pwm", "atmel,sama5d2-pwm"; reg = <0xe1604000 0x4000>; From patchwork Thu Feb 17 13:56:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 543550 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26DC4C4332F for ; Thu, 17 Feb 2022 14:01:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241690AbiBQOBh (ORCPT ); Thu, 17 Feb 2022 09:01:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241675AbiBQOBg (ORCPT ); Thu, 17 Feb 2022 09:01:36 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F4E72B0B05; Thu, 17 Feb 2022 06:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645106482; x=1676642482; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jUmH2oh1/zhKA8uW9ugTgURaA0thp3pCRTkRTiYZ7ys=; b=u1+lZfFtnPbn3XI3kkP+CDtOTjMYdULC1piWM5XvK+KjxBAH8SvjZN+a 15ndN4SSNqH8TFrSFBE7UPyiDCKnvCr2pfL85kUddFLJRhbIF4dZyduc1 mPzd2XoFy++Q29fXyKgdXc9tQTBlz7odfDSTzBn5RKYtyH+ZCDHkr2jH5 j0nZmKGo+wpVtFWbh815X3smZiYx+6+c+KYD9qxQGVJ7SLKNeMt/gK0q8 miRl+oA8TY8lTLXoM2GHorLBvMXhtTHbidOpYid3QPYF02Ja1YOWELNDY mDHt9OMlW2gCM1fhYAK0LIilpgPa0l1eo8PSC0qfwK1N3uS3gDKm8PfPu g==; IronPort-SDR: avoL3Fkb3v7KmMWIOTnQgg4iGkD9FjrS5bULFxvMZNKsBizS6UYMIkiD6skpAwnN78gcIe62xd xGMaMuFGGss3vpD3qZlL5CO+Ong7EIUzybSajOdaELLWLnhNnnmYOIWcg29KT6Ziu9KCvQ+qwi +pqil+SGcwickBV1mdLKQsj5U59/mfCcCeGxR8nRZPLP70HIXWnYTs8/HFOhzLZOeOXDjQ3QVS 0SdCfu5dgYeKmgkg8D2RptPUljwP9Wwr2EIjCa1X1vUo5I2N57BVNzIkhWbc/+t74aSuZL6sOF rHSgwIYNCPgnnq+8EFKS6M7C X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="149064613" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Feb 2022 07:01:21 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 17 Feb 2022 07:01:21 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 17 Feb 2022 07:01:14 -0700 From: Eugen Hristev To: , , , CC: , , , , "Eugen Hristev" Subject: [PATCH v5 13/13] ARM: multi_v7_defconfig: add atmel video pipeline modules Date: Thu, 17 Feb 2022 15:56:45 +0200 Message-ID: <20220217135645.1427466-14-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217135645.1427466-1-eugen.hristev@microchip.com> References: <20220217135645.1427466-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add drivers for the atmel video capture pipeline: atmel isc, xisc and microchip csi2dc. Signed-off-by: Eugen Hristev --- arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 8863fa969ede..b768abad8df0 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -639,7 +639,10 @@ CONFIG_VIDEO_S5P_MIPI_CSIS=m CONFIG_VIDEO_EXYNOS_FIMC_LITE=m CONFIG_VIDEO_EXYNOS4_FIMC_IS=m CONFIG_VIDEO_RCAR_VIN=m +CONFIG_VIDEO_ATMEL_ISC=m +CONFIG_VIDEO_ATMEL_XISC=m CONFIG_VIDEO_ATMEL_ISI=m +CONFIG_VIDEO_MICROCHIP_CSI2DC=m CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m CONFIG_VIDEO_SAMSUNG_S5P_MFC=m