From: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
To: "Lowry Li (Arm Technology China)" <Lowry.Li@arm.com>
Cc: Liviu Dudau <Liviu.Dudau@arm.com>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"seanpaul@chromium.org" <seanpaul@chromium.org>,
"airlied@linux.ie" <airlied@linux.ie>,
Brian Starkey <Brian.Starkey@arm.com>,
Ayan Halder <Ayan.Halder@arm.com>,
"Jonathan Chai (Arm Technology China)" <Jonathan.Chai@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Julien Yin (Arm Technology China)" <Julien.Yin@arm.com>,
nd <nd@arm.com>
Subject: Re: [RFC,v2] drm/komeda: fixing of DMA mapping sg segment warning
Date: Mon, 8 Apr 2019 07:31:41 +0000 [thread overview]
Message-ID: <20190408073134.GA1371@james-ThinkStation-P300> (raw)
In-Reply-To: <1554372474-3594-1-git-send-email-lowry.li@arm.com>
On Thu, Apr 04, 2019 at 10:08:04AM +0000, Lowry Li (Arm Technology China) wrote:
> Fixing the DMA mapping sg segment warning, which shows "DMA-API: mapping
> sg segment longer than device claims to support [len=921600] [max=65536]".
> Fixed by setting the max segment size at Komeda driver.
>
> This patch depends on:
> - https://patchwork.freedesktop.org/series/54448/
> - https://patchwork.freedesktop.org/series/54449/
> - https://patchwork.freedesktop.org/series/54450/
> - https://patchwork.freedesktop.org/series/58976/
>
> Changes since v1:
> - Adds member description
> - Adds patch denpendency in the comment
>
> Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 4 ++++
> drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> index 7f25e6a..b4902ae 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
> @@ -8,6 +8,7 @@
> #include <linux/of_device.h>
> #include <linux/of_graph.h>
> #include <linux/platform_device.h>
> +#include <linux/dma-iommu.h>
> #ifdef CONFIG_DEBUG_FS
> #include <linux/debugfs.h>
> #include <linux/seq_file.h>
> @@ -245,6 +246,9 @@ struct komeda_dev *komeda_dev_create(struct device *dev)
> goto err_cleanup;
> }
>
> + dev->dma_parms = &mdev->dma_parms;
> + dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
> +
> err = sysfs_create_group(&dev->kobj, &komeda_sysfs_attr_group);
> if (err) {
> DRM_ERROR("create sysfs group failed.\n");
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> index 29e03c4..83ace71 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> @@ -149,6 +149,8 @@ struct komeda_dev {
> struct device *dev;
> /** @reg_base: the base address of komeda io space */
> u32 __iomem *reg_base;
> + /** @dma_parms: the dma parameters of komeda */
> + struct device_dma_parameters dma_parms;
>
> /** @chip: the basic chip information */
> struct komeda_chip_info chip;
Looks good to me.
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
next prev parent reply other threads:[~2019-04-08 7:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 10:08 [RFC PATCH v2] drm/komeda: fixing of DMA mapping sg segment warning Lowry Li (Arm Technology China)
2019-04-08 7:31 ` james qian wang (Arm Technology China) [this message]
2019-05-16 12:48 ` Ayan Halder
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=20190408073134.GA1371@james-ThinkStation-P300 \
--to=james.qian.wang@arm.com \
--cc=Ayan.Halder@arm.com \
--cc=Brian.Starkey@arm.com \
--cc=Jonathan.Chai@arm.com \
--cc=Julien.Yin@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=Lowry.Li@arm.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=nd@arm.com \
--cc=seanpaul@chromium.org \
/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