From patchwork Tue May 3 08:44:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835290 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 1F79DC433EF for ; Tue, 3 May 2022 08:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+mAUzbmZEG/OqyiM9oStyS3/HIUT00vhffwiaM8gdjU=; b=QhFz8Ddl6waqyu fiCFYz5yU2CIgsqwjyNE9UN4MzHjJv4HD/sZt5TizNkI+ZXwE3a24oXBaSYCIk078sdyWthRdo94X FY0GaykW9Pe56jS4HmgIuD7AIvChPiWKfkkFYMJl97mXDX8Qzuy9LMuOfeVFcBULn6V7DmJbjGjTo GbDsDnQ9PXZFBfrkA0Gf3VEyki/Q+iToSrgBHFfct6dRp68FL6kT6+XAT7fI8hVfbF3IVwTbAbzp4 JkSgzM9saIm0qfTIGQEbtvFiroTBOKqAwyK0EtKmiIiob2R1rd+qsCsxc0rtxMI0pwV5tSQBHEdmR EKzwfB1gsWvfA/PU3oYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9W-004fPP-Pl; Tue, 03 May 2022 08:45:02 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9P-004fLU-62 for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:44:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567495; x=1683103495; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8pGmp/P6DW09QNCZnxhFBr88c90cP0y+5hBJacUv2zo=; b=m0dmTuXqdR6FJ9Bh1NR4fiHopu+/tHent0bpRjW9NHOzYf5AS43AFQp9 R2dte9zU7gE+HfUOKJUwnmeczgvnLEkzNG9Tt1gE2bpXY2chaMoqmLVBp 2O0HYSleWdci+hvS8sC8g8jI8q82AQtZJIqIS2tJSu5Wvn8WwbMzSz2CP F5SHaaV2xN0OjIvt/PQ98oFtWIB1iSrjMxy48x5210UK8AXzGZR65poEs XLORkYAjcGmPclU1RIiOQbOsCs1dWbpH3IrLKqSTTFErtrBHGlPptLfE7 z1SSKSWL1FhjLgTa58FGe83xy+M9GwYPDPiG7jvHFjxu6adRWHxch3vIq A==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="171742560" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:44:55 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Tue, 3 May 2022 01:44:54 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:44:49 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev Subject: [PATCH v10 1/8] media: atmel: atmel-isc-base: use streaming status when queueing buffers Date: Tue, 3 May 2022 11:44:14 +0300 Message-ID: <20220503084421.40682-2-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014455_248380_8BB74A75 X-CRM114-Status: GOOD ( 14.99 ) 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 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 Tue May 3 08:44:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835292 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 75320C433EF for ; Tue, 3 May 2022 08:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1UbvWQpWwyKu3b+Vsc5ahInNGXFYmNdNgdjNRhfRLHo=; b=pow+dk3XR5Rs6t SlX/FWJQ401+9g28z/v9o4STI89G4BJEdm2z/xEteA17Yy60Vbfae+WYG1D0FMjNipmo4arZUaxcA WSSEdZBPTO+XyrMpzSJyl2VZUc30yq/zd3idgtteKc2y6ESOgNFZH+O7bYxqTIlbopxXiDaO+ZeIW frC7K7cXTEFTlzJ02gL5WhjXZDRnrT6ras9Aq2N7IXTtXaoDEXCK+OV6xEiw8Y7MupdKWVda35SG2 Wo9/MtKUxDQsWlGArwzT29+iJ30wZ5WDmHiga85WEhlJhp7VNLn9k2toz50wjJA0eBBi8TPHGrIWX AWNocaeVKOHXwCfy6a9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9f-004fSn-NX; Tue, 03 May 2022 08:45:11 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9X-004fPR-Fd for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:45:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567503; x=1683103503; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ktAuPeikT5yIzQagKaEvWRybAOSvIjqqN73SIJDSJFk=; b=pPkPvAW7EZmXmuUd0cBBdN14rTK0MwDpc7lv+uykYVlFRW6zQDu0xOHp Cw0ELpaUoEOI+2aZxp0iooZsvFLLNmqBjM61vzSX4jAmz/cM9DsLp/3t/ /ddcZ4f2J9wcskJbx86Xn7+Q/mexSZWLTJKh5r3CRB0r5thISNG+G9IiV Z4/qCTICrNY3pGttziRzaZsKTYIuj4uTV+e/vJFIKWoD8Wvi7rTsU0gBn wucwMZt77Nos/G7SIs4Wy1a0sXMcRPu1XOOl0asWmGI5PRuH7tM+jz+Q6 /agVnrSdhcRluevVvg5cwnzUa1lgOhdDW9FXEzbpfpkFRouPFfVut/qOy g==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="94358168" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:01 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Tue, 3 May 2022 01:45:00 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:44:55 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev Subject: [PATCH v10 2/8] media: atmel: atmel-isc-base: replace is_streaming call in s_fmt_vid_cap Date: Tue, 3 May 2022 11:44:15 +0300 Message-ID: <20220503084421.40682-3-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014503_623035_90B73136 X-CRM114-Status: GOOD ( 12.17 ) 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 In s_fmt_vid_cap, we should check if vb2_is_busy and return EBUSY, not check if it's streaming to return the busy state. Suggested-by: Hans Verkuil 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 d2cc6c99984f..67b4a2323fed 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -1029,7 +1029,7 @@ static int isc_s_fmt_vid_cap(struct file *file, void *priv, { struct isc_device *isc = video_drvdata(file); - if (vb2_is_streaming(&isc->vb2_vidq)) + if (vb2_is_busy(&isc->vb2_vidq)) return -EBUSY; return isc_set_fmt(isc, f); From patchwork Tue May 3 08:44:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835293 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 D75CAC433EF for ; Tue, 3 May 2022 08:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ARWIZOELrZX2yMobEKja36yyAGDSsdU2g7X353pJw5A=; b=v2GALBDMXVZ2/X LxgMnZdIv5TYHb4AOxbGNC6Jpa9dy44tvhj+hk8Ggi3REyT3OGLXGX/Z1gh/4gyJ8p1iE0kyEof+4 L3SpvGIL//mnbmsKIK4j8vapczot+0iGFA1SedtHyCGmBXYTKAHAmmixu9bM8Z2Hvv+8PcVO/8712 zjVh0sh30P/PF0broXgkhKRl+pYaPmRlZrYcvTyxwEVGOvuQchfs7MeVrG1AW9bRplkV4laT+83L6 wlIcBITg0Inpris0NtwWm61U8Ci0Yludetxkv4isPnPKnXxDYXWETmM7w5GnAqga8Aia1bALlP3H2 9rXyNfdZIuuyNUBp9OyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9o-004fVR-F3; Tue, 03 May 2022 08:45:20 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9h-004fTb-L8 for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:45:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567513; x=1683103513; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ljHFpNtf90raf0Mi1Px1Md0sP/C0tdoXJxxBXqKMu50=; b=kQWfybpbv3nivRb3E/noZTrT3xeU6dXjr1MmNdeTcRAxrCpwknEkt/Vk kro1WGSwMLWajG+S81F6kYaHfpfNA261LNfprim/lrBqPfHoJ0fm4s0YF /Fs0IkTpY2vpq+VWSjgBYZtElSNKpzrskayeuvSbyjhkrro2NNDouFzx3 b4SFKx5EqSfENM2do+FsTpfQa9HvS+0iTYKe1VdPRkSjMcMAv7sVbJ5lL 5rdYerQ2qfjcMv2SVdfyPa26ykFi2XV/5kFg3aVm9Pgz31g0j2GMIAxu5 jC0rN9uhBE/lkkPgpDkBu5JSISdEUa8VONMGTLFyitoqBI9+kW3JWc+ms w==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="94358195" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:12 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 3 May 2022 01:45:12 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:45:02 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev Subject: [PATCH v10 3/8] media: atmel: atmel-isc: remove redundant comments Date: Tue, 3 May 2022 11:44:16 +0300 Message-ID: <20220503084421.40682-4-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014513_819615_910EEF13 X-CRM114-Status: GOOD ( 10.73 ) 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 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 Tue May 3 08:44:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835294 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 90AA4C433F5 for ; Tue, 3 May 2022 08:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tx48XJ2uZTAgDy1lKgSQYHp40b/vMyn1ts4RoZbJfVI=; b=2tiM6kj+QNzgUx esTbBA+R6hKF2LDB5OwEjdYUHc07ma6hxmHSfO/+FYuwtWMZFXZog126bbpmp/tvtNc7PYBVrqIhm uJU06qwXxs+ojYedSmbVpMT45/tSghQJzTedA13uOA6ZKITBHQvW/Iag9OUdPR6tt9o+OQOj5ACns 90q2Z7ozgO1tTDX3d4Otyf3D+dD+Rx0HUD9Ums8I0FyshaZ8jUTPFJ/5GBMYjzw2TETVHJUfz0aPf heiLvshxTEqxkvKvMsfsOd6QiBwJyZie7Tsu5hqd2OPu0cpPRFKEGj+juscUPNrF+2D1m/7UYbwxZ JOopftyjhQujPvLIxe3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9x-004fYI-JK; Tue, 03 May 2022 08:45:29 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9s-004fWk-6e for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:45:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567524; x=1683103524; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Tzm28KKlAo03TnEtdDDS7AYViASHkqt3HIyPL9UKq+Y=; b=2Sy+5LQ3/PikbnXfl477HpqcP/HjKfEo+ca/fC87ViOwOGNDBL8k7zAc L1Ad90RMShZyIgpNCp/bRV2ZBlE305H4xE9AX8KCRIqH75n8u4rvSc5a/ aRj7It2GddslD3zF0hfhzR/5Kgex1cxdBmqrNRxY3nzVijBVnH7/Kxq8Q LlHglGmYUGASkayQD2DdU23s0P9noX5vgsXe9+pE4wzRSMfGazPXnfQsm PcCWiDtWWJ/zlBw7GqLh4y3ZwB+DWsm8VDe5X5UX27NYnTpNwlJenuSYu CTnQs+DjMVT1SGDUYJ0x6YeCQIzQRGoYVseTVyr4o4W0XcsIJw5yDUltp Q==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="94358213" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:23 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Tue, 3 May 2022 01:45:21 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:45:14 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev Subject: [PATCH v10 4/8] media: atmel: atmel-sama5d2-isc: fix wrong mask in YUYV format check Date: Tue, 3 May 2022 11:44:17 +0300 Message-ID: <20220503084421.40682-5-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014524_370250_A13DA50A X-CRM114-Status: GOOD ( 13.21 ) 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 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 c5b9563e36cb..3a711de9f820 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 Tue May 3 08:44:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835295 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 56EB9C433F5 for ; Tue, 3 May 2022 08:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JukxH232gz99T5NrfPGBklkMdAH6Xm2/27Bf5IlILyw=; b=a9ATC+wHIHlstw EOkstHXnVC/j3/CKy0f6u9Bt6pIVj/wW9zLNTAF+odFkgr8o0tY6CFkV0PyFbZmyLVfy0hkjjzpVR +iCLzg9/+YzrCNzJvxP6jVsVNy3zm1GIiq8UcRQLbDDFG5wYTbZkrfE7L2Pn+f1NnuioKJjn6ifzY Tr8+og235ox1+3pNcw34PJX4m+AMt9jATO5gORdY5sRpGth4c7Q+5x1stc8JZwAIztTrpeAb4l5wf j2rm3kpsK1ORSyfhtT0VRP4NhEbyb4JyFty0tYX65HQKTBKR1pZ1dX012L1+GicZpJnofjjHsteDV 50gEOKpJPYz9DJb+PNLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nloA8-004fcl-96; Tue, 03 May 2022 08:45:40 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlo9z-004fZ5-7g for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:45:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567531; x=1683103531; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=n2uIJaRZUL/S6HvMX63PPRJ3j4+MNQSEBbMnkivvTPU=; b=L0ytM2e6vCRpbwIqp7iE8XWUNvkS5n8lmMpH4GdNIh3SmaA+g1pnB86y ol9vR2GQK2t4BZZx3t/QteZAwAE07SS9KvmPPtIgbFnxfj03Gdbt9aUh/ t5ged1dku0i4vzgUqojrp1Klv8E7GZ78rwmSuKafXaoyK9Kx2Kagzdvwt jcnW6hY0UTqNrsqlM/ks5I0zDuVXbR4BTIJwQM+yui904goXf9d8skIqn cw6isz696ssbOzwOc670TfgGnlpt2rRszmq/+oawDFWExR7ked2ztONrz bAEEeIKf+NlraAsTosnLeH9KFQ1m5iJq17bwuiBCDwv6exrhM3SAXpO44 w==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="154621927" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:30 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Tue, 3 May 2022 01:45:28 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:45:23 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev Subject: [PATCH v10 5/8] media: atmel: atmel-isc-base: use mutex to lock awb workq from streaming Date: Tue, 3 May 2022 11:44:18 +0300 Message-ID: <20220503084421.40682-6-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014531_439398_79DC59F1 X-CRM114-Status: GOOD ( 20.76 ) 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 The AWB workqueue runs in a kernel thread and needs to be synchronized w.r.t. the streaming status. It is possible that streaming is stopped while the AWB workq is running. In this case it is likely that the check for vb2_start_streaming_called is done at one point in time, but the AWB computations are done later, including a call to isc_update_profile, which requires streaming to be started. Thus , isc_update_profile will fail if during this operation sequence the streaming was stopped. To solve this issue, a mutex is added, that will serialize the awb work and streaming stopping, with the mention that either streaming is stopped completely including termination of the last frame is done, and after that the AWB work can check stream status and stop; either first AWB work is completed and after that the streaming can stop correctly. The awb spin lock cannot be used since this spinlock is taken in the same context and using it in the stop streaming will result in a recursion BUG. Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi --- Changes in v10: -> add missing mutex_lock in s_awb_ctrl -> edited commit message drivers/media/platform/atmel/atmel-isc-base.c | 30 ++++++++++++++++--- drivers/media/platform/atmel/atmel-isc.h | 2 ++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c index 67b4a2323fed..2f07a50035c8 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -401,6 +401,7 @@ static void isc_stop_streaming(struct vb2_queue *vq) struct isc_buffer *buf; int ret; + mutex_lock(&isc->awb_mutex); v4l2_ctrl_activate(isc->do_wb_ctrl, false); isc->stop = true; @@ -410,6 +411,8 @@ static void isc_stop_streaming(struct vb2_queue *vq) v4l2_err(&isc->v4l2_dev, "Timeout waiting for end of the capture\n"); + mutex_unlock(&isc->awb_mutex); + /* Disable DMA interrupt */ regmap_write(isc->regmap, ISC_INTDIS, ISC_INT_DDONE); @@ -1397,10 +1400,6 @@ static void isc_awb_work(struct work_struct *w) u32 min, max; int ret; - /* streaming is not active anymore */ - if (isc->stop) - return; - if (ctrls->hist_stat != HIST_ENABLED) return; @@ -1455,7 +1454,24 @@ static void isc_awb_work(struct work_struct *w) } regmap_write(regmap, ISC_HIS_CFG + isc->offsets.his, hist_id | baysel | ISC_HIS_CFG_RAR); + + /* + * We have to make sure the streaming has not stopped meanwhile. + * ISC requires a frame to clock the internal profile update. + * To avoid issues, lock the sequence with a mutex + */ + mutex_lock(&isc->awb_mutex); + + /* streaming is not active anymore */ + if (isc->stop) { + mutex_unlock(&isc->awb_mutex); + return; + }; + isc_update_profile(isc); + + mutex_unlock(&isc->awb_mutex); + /* if awb has been disabled, we don't need to start another histogram */ if (ctrls->awb) regmap_write(regmap, ISC_CTRLEN, ISC_CTRL_HISREQ); @@ -1534,6 +1550,7 @@ static int isc_s_awb_ctrl(struct v4l2_ctrl *ctrl) isc_update_awb_ctrls(isc); + mutex_lock(&isc->awb_mutex); if (vb2_is_streaming(&isc->vb2_vidq)) { /* * If we are streaming, we can update profile to @@ -1548,6 +1565,7 @@ static int isc_s_awb_ctrl(struct v4l2_ctrl *ctrl) */ v4l2_ctrl_activate(isc->do_wb_ctrl, false); } + mutex_unlock(&isc->awb_mutex); /* if we have autowhitebalance on, start histogram procedure */ if (ctrls->awb == ISC_WB_AUTO && @@ -1729,6 +1747,7 @@ static void isc_async_unbind(struct v4l2_async_notifier *notifier, { struct isc_device *isc = container_of(notifier->v4l2_dev, struct isc_device, v4l2_dev); + mutex_destroy(&isc->awb_mutex); cancel_work_sync(&isc->awb_work); video_unregister_device(&isc->video_dev); v4l2_ctrl_handler_free(&isc->ctrls.handler); @@ -1838,6 +1857,8 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier) isc->current_subdev = container_of(notifier, struct isc_subdev_entity, notifier); mutex_init(&isc->lock); + mutex_init(&isc->awb_mutex); + init_completion(&isc->comp); /* Initialize videobuf2 queue */ @@ -1906,6 +1927,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier) return 0; isc_async_complete_err: + mutex_destroy(&isc->awb_mutex); mutex_destroy(&isc->lock); return ret; } diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h index f9ad7ec6bd13..ff60ba020cb9 100644 --- a/drivers/media/platform/atmel/atmel-isc.h +++ b/drivers/media/platform/atmel/atmel-isc.h @@ -218,6 +218,7 @@ struct isc_reg_offsets { * * @lock: lock for serializing userspace file operations * with ISC operations + * @awb_mutex: serialize access to streaming status from awb work queue * @awb_lock: lock for serializing awb work queue operations * with DMA/buffer operations * @@ -290,6 +291,7 @@ struct isc_device { struct work_struct awb_work; struct mutex lock; + struct mutex awb_mutex; spinlock_t awb_lock; struct regmap_field *pipeline[ISC_PIPE_LINE_NODE_NUM]; From patchwork Tue May 3 08:44:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835296 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 978CFC433EF for ; Tue, 3 May 2022 08:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YOk6cA759wKGoZhIRFGsgJn0ho5KetyLpQYRxBGErg4=; b=Qm9PyQVTQQlF7O zvcOh6yzJzb36uhbA1RqOJhvQEDK3OPMcPkub6O15dThDAqj1iDsPqWc9HG0kO4xN0mDsT60gHcvq mtRNh1DOOePCk5KDHdCLtTh+KZMvNazId2yXJoOFLnnrIxcUgBPI0HMvVkVwsKzovbya/pOP0Kyp7 9OtNPoXhXp+LNWtcc10mry0I/lBrYXfBdFvQBd+scPqIA0kwxPitmLbZK1qHx7iA8UygshPa6z2lO 8NDEXFY8n4Jo+0V0f61GAyzFIFbhk4Wak1cTVs+/ZP6wc0MriOsmrI+7J+kQ2JprxqgQPfjCR7fiv DvjYSdCg7Kz9zSYh6T8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nloAU-004fpy-0u; Tue, 03 May 2022 08:46:02 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nloA7-004fcZ-Bw for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:45:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567538; x=1683103538; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H0z8JmuQJwk4Nw4kWgs+rBoaf84ihyb1BIWumQ44P8A=; b=EHENE/D3ywDiexlVn7JvYN3j2MvRFuOZJvvajU0pT2kMW/wpjfhtcIMC /AK2Yfv5R66e8d4KBLRkekfsh4yO0xc4Q+j7at2M6k5fSUh8+V9gp4rIt ydQPRyIoioKzUSX7K1rVGLjx4shm7uX3N+Afskws27l/pfpAX6491mTar gLPBn7Q8B55NGqxMfsFd57SIP2KeZNaWwzoKqoSM8HG9/BbBfnXUt8+nN dR2Dpw0NI+9uX1nUXdY8zBNzE9Sm6E/P6nBXbrAXf5mVrDBQJSYPSetYB XnemJ2ngqOSuyTAzOs24l38vGtcSOV+h9uhRiwBtjQrgYMBGpnTWb9S8B g==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="162525518" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:38 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Tue, 3 May 2022 01:45:37 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:45:30 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev , Jacopo Mondi Subject: [PATCH v10 6/8] media: atmel: atmel-isc: compact the controller formats list Date: Tue, 3 May 2022 11:44:19 +0300 Message-ID: <20220503084421.40682-7-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014539_482669_4E374F38 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. 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 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 3a711de9f820..e236319935ce 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 07a80b08bc54..5a9db6f41056 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 Tue May 3 08:44:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835297 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 ABCA4C433F5 for ; Tue, 3 May 2022 08:47: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YDaGryQcIe9T9R6ecef8yzG599N0Dr8tCyCMz+yi4fw=; b=srt25e7HhkX+Cv i7TBfZ4qOZrlcxWlN6GMBkYxurBxOgMo0IKvooLs24q5UP0jL9R8cUwvNjwBrdHt8BFpeEUNuy7uw eNe0qOWLE7piEEE0fFV4KNjilyqctm47wjTinhPDnJX5D1gnN5rfSoenyzoEDh9IBCTtV6UZvwBJ6 R4/dz2DwsVCDWF18+/S56ubipaY763oPVjkolKMcBt6njBXuFlprkhG61Dza+UkmgCsPdF1qXhqYS vWBKPzBFIPt0wUuGLG9ezBhP2k7sfnQH/cfnVXrlE2spVZLwNca8kdmaeaakCIpQMNZAAduDhSSZA wJliRULSDkOA33RtyPDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nloAo-004g6l-8n; Tue, 03 May 2022 08:46:22 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nloAG-004fhU-1c for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:45:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567547; x=1683103547; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a5xkrWJu+gSiZzGorL0TWhGz25+bfDvivW5NHRlKG7g=; b=nkmkgoW3OY1LnK3poESwCQFyRj/9dJ9tWwflriJjntlRTbQ/Hst33xB7 lTlwjcn479YDbcyrft6Mp+fjtQ+TDDgK1rkGIexuCNPX8zpnKRksbWkRI 7YKDVodpQeXouSZmqFQktmwbjmSLF9ieYhCfuc/8BBzThcwlpnLpfFDBu v3bvi3fOwSDky5PNSBK0eYE23/LItmJJyJ53YJYlaGkJCiHep17Rz4AiA vO67YLydrAMFFqJluGAf1S+jB+5UxE1VYqiVIhvX5xNnuVfwG9fL/FMn1 j17fF2GmcQRLhf70G8uAzbKKca39C/AHv1a8YVfeUfHvhSsmCSUmseBN1 Q==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="94358273" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:46 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 3 May 2022 01:45:46 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:45:39 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev Subject: [PATCH v10 7/8] media: atmel: atmel-sama7g5-isc: remove stray line Date: Tue, 3 May 2022 11:44:20 +0300 Message-ID: <20220503084421.40682-8-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014548_205533_1D5BEBC0 X-CRM114-Status: UNSURE ( 9.01 ) X-CRM114-Notice: Please train this message. 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 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 5a9db6f41056..83b175070c06 100644 --- a/drivers/media/platform/atmel/atmel-sama7g5-isc.c +++ b/drivers/media/platform/atmel/atmel-sama7g5-isc.c @@ -205,7 +205,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 Tue May 3 08:44:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12835298 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 D4011C433EF for ; Tue, 3 May 2022 08:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s7s8H+2x1E4EjDZgTNkUkZpuotLigPTSsYSpFK8hc6I=; b=Yre+Lz/HfLcmAw HmKsLLx6Q3ofYLcKEg/rZ6Eg1gkTD6pQqb6Lg8SEKBrM166SuocZ94ZKVQ3ze4Cs1gAFMM2EeTGMJ QEEtUvp+NstrZpK4Z/FCEXjTt4tgwHg3daHFQ4nrdfEXefaE/iWZB7pi4Lj58PC8Q3PPwpE1dze+E 6zYwbcnvTaM0kgBa2U22U1ZkihJ+1MJ5niKpq/zCEABjFL8H9hYvbZ6NH//KYl3AAW4WNH4X0L2s9 eJqU7KYpecNGW6aKWhIshvDY6hIHtpioMZFzDwf3n3unmDfkq0iZQNTmI2QZcLArO1Iyyc1bZtL3L RneDroZUOgSFM7/mVtPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nloB8-004gLY-OA; Tue, 03 May 2022 08:46:42 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nloAR-004fpr-Rr for linux-arm-kernel@lists.infradead.org; Tue, 03 May 2022 08:46:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567559; x=1683103559; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U/CKKh3POM+OwTtOgQF4Jp8Ls8i/luVYOEHzUs8doLs=; b=O34AD+BA2epE45bU59Z0YyDpQO30Rw82T6AdUuGPpQvz7JqUQSDhZwp2 xcJb0yDhxGTstnDVXGSbNVmXwJGeSt7VoUvDVgPqAKeH5Uc2DICKd+bw6 w0/Vwoiz85CqzDkU+/BSsHhanuihys7unHwGx04nbpMDJ55aDoMSCRb5N S9eBgTR66D0WUWxASb6BkbKE8OdkzLHfvXEvx/6Ukp+8rmgWwaZGJ+FG+ HjukJYDPNrUAytcJs9ylpGV7Vkz+ptH0y80DxkNNl5zkg4z9rVYXT/eDw gVsF70qd68A6w2kZIIwM7xNYTwmKo3NfN7muxxeZ52hyJdGY6Mp4YjZK8 g==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="162525584" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:58 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Tue, 3 May 2022 01:45:58 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:45:46 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev , Rob Herring Subject: [PATCH v10 8/8] dt-bindings: media: microchip, xisc: add bus-width of 14 Date: Tue, 3 May 2022 11:44:21 +0300 Message-ID: <20220503084421.40682-9-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_014559_960586_3C306098 X-CRM114-Status: UNSURE ( 9.31 ) X-CRM114-Notice: Please train this message. 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 The Microchip XISC supports a bus width of 14 bits. Add it to the supported bus widths. Signed-off-by: Eugen Hristev Acked-by: Rob Herring --- Documentation/devicetree/bindings/media/microchip,xisc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/microchip,xisc.yaml b/Documentation/devicetree/bindings/media/microchip,xisc.yaml index 086e1430af4f..3be8f64c3e21 100644 --- a/Documentation/devicetree/bindings/media/microchip,xisc.yaml +++ b/Documentation/devicetree/bindings/media/microchip,xisc.yaml @@ -67,7 +67,7 @@ properties: remote-endpoint: true bus-width: - enum: [8, 9, 10, 11, 12] + enum: [8, 9, 10, 11, 12, 14] default: 12 hsync-active: