From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: mchehab@osg.samsung.com, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel
Date: Wed, 02 Nov 2016 23:19:36 +0200 [thread overview]
Message-ID: <1758201.F0bdTd4b9u@avalon> (raw)
In-Reply-To: <20161102123959.6098-1-peter.ujfalusi@ti.com>
Hi Peter,
Thank you for the patch.
On Wednesday 02 Nov 2016 14:39:59 Peter Ujfalusi wrote:
> With the new dma_request_chan() the client driver does not need to look for
> the DMA resource and it does not need to pass filter_fn anymore.
> By switching to the new API the driver can now support deferred probing
> against DMA.
I believe this breaks the OMAP3 ISP driver. dma_request_slave_channel_compat()
is a superset of dma_request_chan() that will, when called with
omap_dma_filter_fn, return as a fallback any free channel handled by the OMAP
DMA engine driver. This feature is actively used by this driver and must be
preserved.
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> CC: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
> Hi,
>
> the original patch was sent 29.04.2016:
> https://patchwork.kernel.org/patch/8981811/
>
> I have rebased it on top of linux-next.
>
> Regards,
> Peter
>
> drivers/media/platform/omap3isp/isphist.c | 27 +++++++++------------------
> 1 file changed, 9 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/media/platform/omap3isp/isphist.c
> b/drivers/media/platform/omap3isp/isphist.c index
> 7138b043a4aa..e163e3d92517 100644
> --- a/drivers/media/platform/omap3isp/isphist.c
> +++ b/drivers/media/platform/omap3isp/isphist.c
> @@ -18,7 +18,6 @@
> #include <linux/delay.h>
> #include <linux/device.h>
> #include <linux/dmaengine.h>
> -#include <linux/omap-dmaengine.h>
> #include <linux/slab.h>
> #include <linux/uaccess.h>
>
> @@ -486,27 +485,19 @@ int omap3isp_hist_init(struct isp_device *isp)
> hist->isp = isp;
>
> if (HIST_CONFIG_DMA) {
> - struct platform_device *pdev = to_platform_device(isp->dev);
> - struct resource *res;
> - unsigned int sig = 0;
> - dma_cap_mask_t mask;
> -
> - dma_cap_zero(mask);
> - dma_cap_set(DMA_SLAVE, mask);
> -
> - res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
> - "hist");
> - if (res)
> - sig = res->start;
> -
> - hist->dma_ch = dma_request_slave_channel_compat(mask,
> - omap_dma_filter_fn, &sig, isp->dev, "hist");
> - if (!hist->dma_ch)
> + hist->dma_ch = dma_request_chan(isp->dev, "hist");
> + if (IS_ERR(hist->dma_ch)) {
> + ret = PTR_ERR(hist->dma_ch);
> + if (ret == -EPROBE_DEFER)
> + return ret;
> +
> + hist->dma_ch = NULL;
> dev_warn(isp->dev,
> "hist: DMA channel request failed, using
PIO\n");
> - else
> + } else {
> dev_dbg(isp->dev, "hist: using DMA channel %s\n",
> dma_chan_name(hist->dma_ch));
> + }
> }
>
> hist->ops = &hist_ops;
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2016-11-02 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 12:39 [PATCH RESEND] media: omap3isp: Use dma_request_chan() to requesting DMA channel Peter Ujfalusi
2016-11-02 21:19 ` Laurent Pinchart [this message]
2016-11-03 9:23 ` Peter Ujfalusi
2016-11-03 13:14 ` Peter Ujfalusi
2016-11-03 15:12 ` Laurent Pinchart
2016-11-04 8:05 ` Peter Ujfalusi
2016-11-03 15:09 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1758201.F0bdTd4b9u@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=peter.ujfalusi@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).