From patchwork Wed Oct 7 16:05:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugues FRUCHET X-Patchwork-Id: 11820927 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C708814D5 for ; Wed, 7 Oct 2020 16:06:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80F80216C4 for ; Wed, 7 Oct 2020 16:06:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xlRX4+aW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=st.com header.i=@st.com header.b="EjvhFnOe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80F80216C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=/DTpo75Hb9Kh4bsGi8KjPMRrFexMy/96BXADE7mu0+c=; b=xlRX4+aWIL4jR6g3WcLpTtvcmq 90O+ayxCLTHj1JRcV3cmqmIEiMXxpJGDcfwTXlnfmGEyKcQtHHVpbugP0sPYMVmn0RO1dq8/NHY4K HvxXuP4xpaaYaTSpt/qpE9Mv9MowKZSzYQ24zDCGXEorYgBj+/aBIuXL2CxaHy0jNcLQN4Er9ue7m Ke/m2YLyAYiULbJkMMczlocv8acGW3NpJuHBOqgIGnWNNVdeJXcW9v4u0jEsLxLbA9tEmCCMEEYoX KfhmCv6TN+9WMI/Qs48hYdfEyjsF1EFbnSBTqJljiP56k4upHG6c+jbSErFhw+JVSTBQSwQXNxPaH EAoQNY+w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQBx4-00042f-H5; Wed, 07 Oct 2020 16:06:02 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQBx2-00041n-54 for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2020 16:06:01 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 097Fprpj028954; Wed, 7 Oct 2020 18:05:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=AMt0mdBSuzkiudzNdejXkVPMDzES74v23TlSkvD5yGA=; b=EjvhFnOer2kuZB5HcDFz6In7XD7IcVzIcKyoPKNPRZcbYTYuO882kR3pa5N+2d1lz3xY M1lgloOTvqaazW1mQ2Z/tLMVBK3v1Xum6TbReapQvXFba5mPNVtgtftC9I7+j5F1Lhqa 2kr5W/DM5jjmj0eR7mVtgQq4bWD2W7pVV+U7Q/mgF4ptmQYh9sLBCnoVKhYDWV54Isia sAlfGRmygekPw0bme8wm9ii83XVFNPg/EUs5fyWYAtmMUe/QFOPklWHTPpuUN6crsxzc BL4ntExCVvRnBwSbJSCtkL06VumB0diHRCExnXWVGEcwlSm2kXbiY3FJYaLAusyowWaP 7A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3402tk5ums-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Oct 2020 18:05:55 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6CDD710002A; Wed, 7 Oct 2020 18:05:55 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag1node1.st.com [10.75.127.1]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 57B9D2BA2C7; Wed, 7 Oct 2020 18:05:55 +0200 (CEST) Received: from localhost (10.75.127.46) by SFHDAG1NODE1.st.com (10.75.127.1) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 7 Oct 2020 18:05:54 +0200 From: Hugues Fruchet To: Alexandre Torgue , Mauro Carvalho Chehab , Hans Verkuil Subject: [PATCH] media: stm32-dcmi: remove deprecated dmaengine_terminate_all() Date: Wed, 7 Oct 2020 18:05:52 +0200 Message-ID: <1602086752-8987-1-git-send-email-hugues.fruchet@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG1NODE1.st.com (10.75.127.1) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-07_10:2020-10-06, 2020-10-07 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201007_120600_400220_66656BF1 X-CRM114-Status: GOOD ( 15.40 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [91.207.212.93 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Philippe CORNU , Yannick Fertre , Alain Volmat , Hugues Fruchet , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Replace dmaengine_terminate_all() by dmaengine_terminate_sync() to ensure that all pending dma operations are really finished. This is not ensured by dmaengine_terminate_all() and this API is deprecated, so better to use the _sync() variant. Signed-off-by: Hugues Fruchet Reviewed-by: Philippe CORNU --- drivers/media/platform/stm32/stm32-dcmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index fd1c41c..3283337 100644 --- a/drivers/media/platform/stm32/stm32-dcmi.c +++ b/drivers/media/platform/stm32/stm32-dcmi.c @@ -324,7 +324,7 @@ static int dcmi_start_dma(struct stm32_dcmi *dcmi, } /* - * Avoid call of dmaengine_terminate_all() between + * Avoid call of dmaengine_terminate_sync() between * dmaengine_prep_slave_single() and dmaengine_submit() * by locking the whole DMA submission sequence */ @@ -438,7 +438,7 @@ static void dcmi_process_jpeg(struct stm32_dcmi *dcmi) } /* Abort DMA operation */ - dmaengine_terminate_all(dcmi->dma_chan); + dmaengine_terminate_sync(dcmi->dma_chan); /* Restart capture */ if (dcmi_restart_capture(dcmi)) @@ -882,7 +882,7 @@ static void dcmi_stop_streaming(struct vb2_queue *vq) /* Stop all pending DMA operations */ mutex_lock(&dcmi->dma_lock); - dmaengine_terminate_all(dcmi->dma_chan); + dmaengine_terminate_sync(dcmi->dma_chan); mutex_unlock(&dcmi->dma_lock); pm_runtime_put(dcmi->dev);