Message ID | 20180402142656.26815-5-robert.jarzmik@free.fr (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from <linux-media-owner@vger.kernel.org>) id 1f30R6-0005Bh-PF; Mon, 02 Apr 2018 14:27:53 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752384AbeDBO1t (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Mon, 2 Apr 2018 10:27:49 -0400 Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:30217 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752269AbeDBO1m (ORCPT <rfc822; linux-media@vger.kernel.org>); Mon, 2 Apr 2018 10:27:42 -0400 Received: from belgarion.home ([86.201.130.131]) by mwinf5d63 with ME id VSSy1x00R2qEl8e03STcF1; Mon, 02 Apr 2018 16:27:40 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Mon, 02 Apr 2018 16:27:40 +0200 X-ME-IP: 86.201.130.131 From: Robert Jarzmik <robert.jarzmik@free.fr> To: Daniel Mack <daniel@zonque.org>, Haojian Zhuang <haojian.zhuang@gmail.com>, Robert Jarzmik <robert.jarzmik@free.fr>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Tejun Heo <tj@kernel.org>, Vinod Koul <vinod.koul@intel.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>, Ezequiel Garcia <ezequiel.garcia@free-electrons.com>, Boris Brezillon <boris.brezillon@free-electrons.com>, David Woodhouse <dwmw2@infradead.org>, Brian Norris <computersforpeace@gmail.com>, Marek Vasut <marek.vasut@gmail.com>, Richard Weinberger <richard@nod.at>, Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>, Nicolas Pitre <nico@fluxnic.net>, Samuel Ortiz <samuel@sortiz.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Hans Verkuil <hverkuil@xs4all.nl>, Petr Cvek <petr.cvek@tul.cz>, Sakari Ailus <sakari.ailus@iki.fi>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Pravin Shedge <pravin.shedge4linux@gmail.com>, Flavio Ceolin <flavio.ceolin@intel.com>, Robert Jarzmik <robert.jarzmik@renault.com> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, dmaengine@vger.kernel.org, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org, devel@driverdev.osuosl.org, alsa-devel@alsa-project.org, =?UTF-8?q?Niklas=20S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se> Subject: [PATCH 04/15] media: pxa_camera: remove the dmaengine compat need Date: Mon, 2 Apr 2018 16:26:45 +0200 Message-Id: <20180402142656.26815-5-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180402142656.26815-1-robert.jarzmik@free.fr> References: <20180402142656.26815-1-robert.jarzmik@free.fr> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Commit Message
Robert Jarzmik
April 2, 2018, 2:26 p.m. UTC
From: Robert Jarzmik <robert.jarzmik@renault.com> As the pxa architecture switched towards the dmaengine slave map, the old compatibility mechanism to acquire the dma requestor line number and priority are not needed anymore. This patch simplifies the dma resource acquisition, using the more generic function dma_request_slave_channel(). Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> --- drivers/media/platform/pxa_camera.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-)
Comments
Robert Jarzmik <robert.jarzmik@free.fr> writes: > From: Robert Jarzmik <robert.jarzmik@renault.com> > > As the pxa architecture switched towards the dmaengine slave map, the > old compatibility mechanism to acquire the dma requestor line number and > priority are not needed anymore. > > This patch simplifies the dma resource acquisition, using the more > generic function dma_request_slave_channel(). > > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> > --- > drivers/media/platform/pxa_camera.c | 22 +++------------------- > 1 file changed, 3 insertions(+), 19 deletions(-) Hans, could I have your ack please ? Cheers. -- Robert PS: The submitted patch > > diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c > index c71a00736541..4c82d1880753 100644 > --- a/drivers/media/platform/pxa_camera.c > +++ b/drivers/media/platform/pxa_camera.c > @@ -2357,8 +2357,6 @@ static int pxa_camera_probe(struct platform_device *pdev) > .src_maxburst = 8, > .direction = DMA_DEV_TO_MEM, > }; > - dma_cap_mask_t mask; > - struct pxad_param params; > char clk_name[V4L2_CLK_NAME_SIZE]; > int irq; > int err = 0, i; > @@ -2432,34 +2430,20 @@ static int pxa_camera_probe(struct platform_device *pdev) > pcdev->base = base; > > /* request dma */ > - dma_cap_zero(mask); > - dma_cap_set(DMA_SLAVE, mask); > - dma_cap_set(DMA_PRIVATE, mask); > - > - params.prio = 0; > - params.drcmr = 68; > - pcdev->dma_chans[0] = > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > - ¶ms, &pdev->dev, "CI_Y"); > + pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y"); > if (!pcdev->dma_chans[0]) { > dev_err(&pdev->dev, "Can't request DMA for Y\n"); > return -ENODEV; > } > > - params.drcmr = 69; > - pcdev->dma_chans[1] = > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > - ¶ms, &pdev->dev, "CI_U"); > + pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U"); > if (!pcdev->dma_chans[1]) { > dev_err(&pdev->dev, "Can't request DMA for Y\n"); > err = -ENODEV; > goto exit_free_dma_y; > } > > - params.drcmr = 70; > - pcdev->dma_chans[2] = > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > - ¶ms, &pdev->dev, "CI_V"); > + pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V"); > if (!pcdev->dma_chans[2]) { > dev_err(&pdev->dev, "Can't request DMA for V\n"); > err = -ENODEV;
On 04/02/2018 04:26 PM, Robert Jarzmik wrote: > From: Robert Jarzmik <robert.jarzmik@renault.com> > > As the pxa architecture switched towards the dmaengine slave map, the > old compatibility mechanism to acquire the dma requestor line number and > priority are not needed anymore. > > This patch simplifies the dma resource acquisition, using the more > generic function dma_request_slave_channel(). > > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Regards, Hans > --- > drivers/media/platform/pxa_camera.c | 22 +++------------------- > 1 file changed, 3 insertions(+), 19 deletions(-) > > diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c > index c71a00736541..4c82d1880753 100644 > --- a/drivers/media/platform/pxa_camera.c > +++ b/drivers/media/platform/pxa_camera.c > @@ -2357,8 +2357,6 @@ static int pxa_camera_probe(struct platform_device *pdev) > .src_maxburst = 8, > .direction = DMA_DEV_TO_MEM, > }; > - dma_cap_mask_t mask; > - struct pxad_param params; > char clk_name[V4L2_CLK_NAME_SIZE]; > int irq; > int err = 0, i; > @@ -2432,34 +2430,20 @@ static int pxa_camera_probe(struct platform_device *pdev) > pcdev->base = base; > > /* request dma */ > - dma_cap_zero(mask); > - dma_cap_set(DMA_SLAVE, mask); > - dma_cap_set(DMA_PRIVATE, mask); > - > - params.prio = 0; > - params.drcmr = 68; > - pcdev->dma_chans[0] = > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > - ¶ms, &pdev->dev, "CI_Y"); > + pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y"); > if (!pcdev->dma_chans[0]) { > dev_err(&pdev->dev, "Can't request DMA for Y\n"); > return -ENODEV; > } > > - params.drcmr = 69; > - pcdev->dma_chans[1] = > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > - ¶ms, &pdev->dev, "CI_U"); > + pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U"); > if (!pcdev->dma_chans[1]) { > dev_err(&pdev->dev, "Can't request DMA for Y\n"); > err = -ENODEV; > goto exit_free_dma_y; > } > > - params.drcmr = 70; > - pcdev->dma_chans[2] = > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > - ¶ms, &pdev->dev, "CI_V"); > + pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V"); > if (!pcdev->dma_chans[2]) { > dev_err(&pdev->dev, "Can't request DMA for V\n"); > err = -ENODEV; >
On 04/21/2018 09:27 PM, Robert Jarzmik wrote: > Robert Jarzmik <robert.jarzmik@free.fr> writes: > >> From: Robert Jarzmik <robert.jarzmik@renault.com> >> >> As the pxa architecture switched towards the dmaengine slave map, the >> old compatibility mechanism to acquire the dma requestor line number and >> priority are not needed anymore. >> >> This patch simplifies the dma resource acquisition, using the more >> generic function dma_request_slave_channel(). >> >> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> >> --- >> drivers/media/platform/pxa_camera.c | 22 +++------------------- >> 1 file changed, 3 insertions(+), 19 deletions(-) > Hans, could I have your ack please ? Done. Hans > > Cheers. > > -- > Robert > > PS: The submitted patch >> >> diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c >> index c71a00736541..4c82d1880753 100644 >> --- a/drivers/media/platform/pxa_camera.c >> +++ b/drivers/media/platform/pxa_camera.c >> @@ -2357,8 +2357,6 @@ static int pxa_camera_probe(struct platform_device *pdev) >> .src_maxburst = 8, >> .direction = DMA_DEV_TO_MEM, >> }; >> - dma_cap_mask_t mask; >> - struct pxad_param params; >> char clk_name[V4L2_CLK_NAME_SIZE]; >> int irq; >> int err = 0, i; >> @@ -2432,34 +2430,20 @@ static int pxa_camera_probe(struct platform_device *pdev) >> pcdev->base = base; >> >> /* request dma */ >> - dma_cap_zero(mask); >> - dma_cap_set(DMA_SLAVE, mask); >> - dma_cap_set(DMA_PRIVATE, mask); >> - >> - params.prio = 0; >> - params.drcmr = 68; >> - pcdev->dma_chans[0] = >> - dma_request_slave_channel_compat(mask, pxad_filter_fn, >> - ¶ms, &pdev->dev, "CI_Y"); >> + pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y"); >> if (!pcdev->dma_chans[0]) { >> dev_err(&pdev->dev, "Can't request DMA for Y\n"); >> return -ENODEV; >> } >> >> - params.drcmr = 69; >> - pcdev->dma_chans[1] = >> - dma_request_slave_channel_compat(mask, pxad_filter_fn, >> - ¶ms, &pdev->dev, "CI_U"); >> + pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U"); >> if (!pcdev->dma_chans[1]) { >> dev_err(&pdev->dev, "Can't request DMA for Y\n"); >> err = -ENODEV; >> goto exit_free_dma_y; >> } >> >> - params.drcmr = 70; >> - pcdev->dma_chans[2] = >> - dma_request_slave_channel_compat(mask, pxad_filter_fn, >> - ¶ms, &pdev->dev, "CI_V"); >> + pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V"); >> if (!pcdev->dma_chans[2]) { >> dev_err(&pdev->dev, "Can't request DMA for V\n"); >> err = -ENODEV;
Em Sun, 22 Apr 2018 13:06:12 +0200 Hans Verkuil <hverkuil@xs4all.nl> escreveu: > On 04/02/2018 04:26 PM, Robert Jarzmik wrote: > > From: Robert Jarzmik <robert.jarzmik@renault.com> > > > > As the pxa architecture switched towards the dmaengine slave map, the > > old compatibility mechanism to acquire the dma requestor line number and > > priority are not needed anymore. > > > > This patch simplifies the dma resource acquisition, using the more > > generic function dma_request_slave_channel(). > > > > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> > > Acked-by: Hans Verkuil <hans.verkuil@cisco.com> I'm assuming that you'll be applying it together with other PXA patches. So: Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Regards, Mauro > > Regards, > > Hans > > > --- > > drivers/media/platform/pxa_camera.c | 22 +++------------------- > > 1 file changed, 3 insertions(+), 19 deletions(-) > > > > diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c > > index c71a00736541..4c82d1880753 100644 > > --- a/drivers/media/platform/pxa_camera.c > > +++ b/drivers/media/platform/pxa_camera.c > > @@ -2357,8 +2357,6 @@ static int pxa_camera_probe(struct platform_device *pdev) > > .src_maxburst = 8, > > .direction = DMA_DEV_TO_MEM, > > }; > > - dma_cap_mask_t mask; > > - struct pxad_param params; > > char clk_name[V4L2_CLK_NAME_SIZE]; > > int irq; > > int err = 0, i; > > @@ -2432,34 +2430,20 @@ static int pxa_camera_probe(struct platform_device *pdev) > > pcdev->base = base; > > > > /* request dma */ > > - dma_cap_zero(mask); > > - dma_cap_set(DMA_SLAVE, mask); > > - dma_cap_set(DMA_PRIVATE, mask); > > - > > - params.prio = 0; > > - params.drcmr = 68; > > - pcdev->dma_chans[0] = > > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > > - ¶ms, &pdev->dev, "CI_Y"); > > + pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y"); > > if (!pcdev->dma_chans[0]) { > > dev_err(&pdev->dev, "Can't request DMA for Y\n"); > > return -ENODEV; > > } > > > > - params.drcmr = 69; > > - pcdev->dma_chans[1] = > > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > > - ¶ms, &pdev->dev, "CI_U"); > > + pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U"); > > if (!pcdev->dma_chans[1]) { > > dev_err(&pdev->dev, "Can't request DMA for Y\n"); > > err = -ENODEV; > > goto exit_free_dma_y; > > } > > > > - params.drcmr = 70; > > - pcdev->dma_chans[2] = > > - dma_request_slave_channel_compat(mask, pxad_filter_fn, > > - ¶ms, &pdev->dev, "CI_V"); > > + pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V"); > > if (!pcdev->dma_chans[2]) { > > dev_err(&pdev->dev, "Can't request DMA for V\n"); > > err = -ENODEV; > > > Thanks, Mauro
diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c index c71a00736541..4c82d1880753 100644 --- a/drivers/media/platform/pxa_camera.c +++ b/drivers/media/platform/pxa_camera.c @@ -2357,8 +2357,6 @@ static int pxa_camera_probe(struct platform_device *pdev) .src_maxburst = 8, .direction = DMA_DEV_TO_MEM, }; - dma_cap_mask_t mask; - struct pxad_param params; char clk_name[V4L2_CLK_NAME_SIZE]; int irq; int err = 0, i; @@ -2432,34 +2430,20 @@ static int pxa_camera_probe(struct platform_device *pdev) pcdev->base = base; /* request dma */ - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - dma_cap_set(DMA_PRIVATE, mask); - - params.prio = 0; - params.drcmr = 68; - pcdev->dma_chans[0] = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶ms, &pdev->dev, "CI_Y"); + pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y"); if (!pcdev->dma_chans[0]) { dev_err(&pdev->dev, "Can't request DMA for Y\n"); return -ENODEV; } - params.drcmr = 69; - pcdev->dma_chans[1] = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶ms, &pdev->dev, "CI_U"); + pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U"); if (!pcdev->dma_chans[1]) { dev_err(&pdev->dev, "Can't request DMA for Y\n"); err = -ENODEV; goto exit_free_dma_y; } - params.drcmr = 70; - pcdev->dma_chans[2] = - dma_request_slave_channel_compat(mask, pxad_filter_fn, - ¶ms, &pdev->dev, "CI_V"); + pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V"); if (!pcdev->dma_chans[2]) { dev_err(&pdev->dev, "Can't request DMA for V\n"); err = -ENODEV;