From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Rob Herring <robh+dt@kernel.org>,
Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Phil Elwell <phil@raspberrypi.org>,
Stefan Wahren <stefan.wahren@i2se.com>
Subject: [PATCH V2 2/4] drm/v3d: Set dma_mask as well as coherent_dma_mask
Date: Wed, 23 Dec 2020 21:35:12 +0100 [thread overview]
Message-ID: <1608755714-18233-3-git-send-email-stefan.wahren@i2se.com> (raw)
In-Reply-To: <1608755714-18233-1-git-send-email-stefan.wahren@i2se.com>
From: Phil Elwell <phil@raspberrypi.org>
Both coherent_dma_mask and dma_mask act as constraints on allocations
and bounce buffer usage, so be sure to set dma_mask to the appropriate
value otherwise the effective mask could be incorrect.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/gpu/drm/v3d/v3d_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index 42d401f..99e22be 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -232,8 +232,8 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
return ret;
mmu_debug = V3D_READ(V3D_MMU_DEBUG_INFO);
- dev->coherent_dma_mask =
- DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH));
+ dma_set_mask_and_coherent(dev,
+ DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH)));
v3d->va_width = 30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_VA_WIDTH);
ident1 = V3D_READ(V3D_HUB_IDENT1);
--
2.7.4
next prev parent reply other threads:[~2020-12-23 20:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 20:35 [PATCH V2 0/4] drm/v3d: Minor improvements Stefan Wahren
2020-12-23 20:35 ` [PATCH V2 1/4] drm/v3d: Use platform_get_irq_optional() to get optional IRQs Stefan Wahren
2021-01-06 15:09 ` Maxime Ripard
2020-12-23 20:35 ` Stefan Wahren [this message]
2020-12-24 13:58 ` [PATCH V2 2/4] drm/v3d: Set dma_mask as well as coherent_dma_mask Nicolas Saenz Julienne
2021-01-06 15:09 ` Maxime Ripard
2020-12-23 20:35 ` [PATCH V2 3/4] drm/v3d: Don't clear MMU control bits on exception Stefan Wahren
2020-12-24 13:59 ` Nicolas Saenz Julienne
2021-01-06 15:09 ` Maxime Ripard
2020-12-23 20:35 ` [PATCH V2 4/4] dt-bindings: gpu: Convert v3d to json-schema Stefan Wahren
2021-01-06 15:12 ` Maxime Ripard
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=1608755714-18233-3-git-send-email-stefan.wahren@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mripard@kernel.org \
--cc=nsaenzjulienne@suse.de \
--cc=phil@raspberrypi.org \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).