From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Robin Murphy <robin.murphy@arm.com>,
stanimir.varbanov@linaro.org, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] media: venus: core: Drop local dma_parms
Date: Fri, 4 Sep 2020 23:26:42 +0300 [thread overview]
Message-ID: <c474d49b-7800-28c6-d73b-20a6d2258e9e@linaro.org> (raw)
In-Reply-To: <e5384b296a0af099dc502572752df149127b7947.1599167568.git.robin.murphy@arm.com>
Hi Robin,
Thanks for the patch!
On 9/4/20 12:14 AM, Robin Murphy wrote:
> Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms
> for platform devices"), struct platform_device already provides a
> dma_parms structure, so we can save allocating another one.
>
> Also the DMA segment size is simply a size, not a bitmask.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> drivers/media/platform/qcom/venus/core.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 203c6538044f..2fa9275d75ff 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -226,13 +226,7 @@ static int venus_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - if (!dev->dma_parms) {
> - dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
> - GFP_KERNEL);
> - if (!dev->dma_parms)
> - return -ENOMEM;
> - }
> - dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
> + dma_set_max_seg_size(dev, UINT_MAX);
To be correct we should check for EIO error?
>
> INIT_LIST_HEAD(&core->instances);
> mutex_init(&core->lock);
>
--
regards,
Stan
next prev parent reply other threads:[~2020-09-04 20:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 21:14 [PATCH] media: venus: core: Drop local dma_parms Robin Murphy
2020-09-04 11:36 ` Kieran Bingham
2020-09-04 20:26 ` Stanimir Varbanov [this message]
2020-09-10 14:36 ` Robin Murphy
2020-10-02 8:06 ` Sai Prakash Ranjan
2020-10-02 11:27 ` Stanimir Varbanov
2020-10-02 12:45 ` Sai Prakash Ranjan
2020-10-06 1:02 ` Stephen Boyd
2020-10-06 5:23 ` Sai Prakash Ranjan
2020-10-14 16:09 ` Robin Murphy
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=c474d49b-7800-28c6-d73b-20a6d2258e9e@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robin.murphy@arm.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).