Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp85610ybl; Tue, 7 Jan 2020 02:39:41 -0800 (PST) X-Google-Smtp-Source: APXvYqw8qRgSXyd0nbeO+/yYFksOICpaZDxQYERgaiKbiuJxKUGwxa5OIz0V5+alAwbut/ibbLlZ X-Received: by 2002:a9d:750b:: with SMTP id r11mr118169910otk.209.1578393581618; Tue, 07 Jan 2020 02:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578393581; cv=none; d=google.com; s=arc-20160816; b=01icMGkY07giVKU7d4E8MJNLKIrEdtg4muLiYiUAYmSbLYrrl0QVKklBWxfTXWLzrt 8nHWtIwczm4ZjUCwA/2K8rk4YhbDbzn/M1vQqDb20dO1XFX4wBAN7PSLseqopV9rsgLk qGLMhTCgu+dcIccHf8HuZf3RdbBjw+Hr5pC4nKYi+obmNcITVomaHVBZs0ARPXoKTJxX HY+u3xEkVvSlBsnG3A5Jjr/T81c0yA3AHSK3kE6RJqbksPXJBPf6RKAnBIN3zM6tWRX1 0rFPAhGN8LaJ2+S8cUeUfTh0ouxAnqYohVKH3YhGonqyJQPJA05YG3aAl/ad1rWjXmdd gBhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=BSpms8vYzmAl/YFEGgI8wzX4uGpMNJOd+zSnFgxFaP0=; b=SVvYEVsoTMhyKty5aPp0F0uIW3opqDoysbc5nZyVCLsC1sSlI5FbKSj/dvT9fKy7Jj 4U8oLSNc0bqoGG0f30S+FrcKF4y18UFSZHTnUV/cuLZSznFpmUDxGaI/5Cv4CIoKo1Wr KwKYzuj1XA0y2iZ03T7SSjGgLuMISqHZ4ejpSDShCRxFDvP6CoLtZ0NFJoy1JPmlT9EM ybUeZc8SaU5SeGHJqrTxtwKJ7w59KjiIwHMu6F+aBa+wxXfkLAi6RJ3lFX4zuL4hpXb3 BOJuviNpEPLG5KcpaErhf3/xZfIprNhvQf9d6nigUFY3AL2U7GQXD/vWTvJNth1AV3EE q/2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MKjc8aAF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p20si37092590otk.73.2020.01.07.02.39.28; Tue, 07 Jan 2020 02:39:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=MKjc8aAF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727743AbgAGKij (ORCPT + 99 others); Tue, 7 Jan 2020 05:38:39 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:56494 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbgAGKij (ORCPT ); Tue, 7 Jan 2020 05:38:39 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 007AcTBQ052064; Tue, 7 Jan 2020 04:38:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1578393509; bh=BSpms8vYzmAl/YFEGgI8wzX4uGpMNJOd+zSnFgxFaP0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=MKjc8aAF40U5qjbdM4l/1SABZ0JniIFWxtHuneoS4v0G7TPEk0yLjiPYPP36egmvR ja1LaMDtkIm4jF81pIDJpn4/wHbw8TX78YJZ+w0Jr3G+t6LIusO81C2Iy7/mxq0ewj tCHIdn1VvkIz+qwHIec8EhRlRho2N/kIyP3sfgm4= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 007AcTZo112928 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 Jan 2020 04:38:29 -0600 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 7 Jan 2020 04:38:28 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 7 Jan 2020 04:38:28 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 007AcPAU005113; Tue, 7 Jan 2020 04:38:27 -0600 Subject: Re: [PATCH] media: stm32-dcmi: Use dma_request_chan() instead dma_request_slave_channel() To: Hugues FRUCHET , "mchehab@kernel.org" , "mcoquelin.stm32@gmail.com" , Alexandre TORGUE CC: "vkoul@kernel.org" , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" References: <20191217104135.23554-1-peter.ujfalusi@ti.com> <84946ffd-8e90-7b6a-6667-a10e27d31655@st.com> <8229c7ed-b513-6bf8-5684-60d87a92d41f@st.com> From: Peter Ujfalusi Message-ID: Date: Tue, 7 Jan 2020 12:38:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <8229c7ed-b513-6bf8-5684-60d87a92d41f@st.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hugues, On 07/01/2020 11.46, Hugues FRUCHET wrote: > Hi Peter, > > If not too late, could you change trace to only trig error trace when > error is not "probe defered" ? See below: > > - chan = dma_request_slave_channel(&pdev->dev, "tx"); > - if (!chan) { > - dev_info(&pdev->dev, "Unable to request DMA channel, defer probing\n"); > - return -EPROBE_DEFER; > + chan = dma_request_chan(&pdev->dev, "tx"); > + if (IS_ERR(chan)) { > + if (PTR_ERR(chan) != -EPROBE_DEFER) > + dev_err(&pdev->dev, "Unable to request DMA channel\n"); > + return PTR_ERR(chan); Sure, I don't know how I missed it. Regards, - Péter > > Best regards, > Hugues. > > On 12/18/19 11:52 AM, Hugues FRUCHET wrote: >> Thanks for patching Peter, >> >> No regression observed on my side. >> >> Acked-by: Hugues Fruchet >> >> Best regards, >> Hugues. >> >> On 12/17/19 11:41 AM, Peter Ujfalusi wrote: >>> dma_request_slave_channel() is a wrapper on top of dma_request_chan() >>> eating up the error code. >>> >>> By using dma_request_chan() directly the driver can support deferred >>> probing against DMA. >>> >>> Signed-off-by: Peter Ujfalusi >>> --- >>>   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 9392e3409fba..55351872b0c7 100644 >>> --- a/drivers/media/platform/stm32/stm32-dcmi.c >>> +++ b/drivers/media/platform/stm32/stm32-dcmi.c >>> @@ -1910,10 +1910,10 @@ static int dcmi_probe(struct platform_device >>> *pdev) >>>           return PTR_ERR(mclk); >>>       } >>> -    chan = dma_request_slave_channel(&pdev->dev, "tx"); >>> -    if (!chan) { >>> +    chan = dma_request_chan(&pdev->dev, "tx"); >>> +    if (IS_ERR(chan)) { >>>           dev_info(&pdev->dev, "Unable to request DMA channel, defer >>> probing\n"); >>> -        return -EPROBE_DEFER; >>> +        return PTR_ERR(chan); >>>       } >>>       spin_lock_init(&dcmi->irqlock); >> > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki