All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-5.3] drm/omap: ensure we have a valid dma_mask
@ 2019-08-08 10:10 Christoph Hellwig
  2019-08-09  6:40   ` Tomi Valkeinen
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2019-08-08 10:10 UTC (permalink / raw)
  To: tomi.valkeinen
  Cc: airlied, daniel, dri-devel, linux-kernel, H. Nikolaus Schaller

The omapfb platform devices does not have a DMA mask set.  The
traditional arm DMA code ignores, but the generic dma-direct/swiotlb
has stricter checks and thus fails mappings without a DMA mask.
As we use swiotlb for arm with LPAE now, omap needs to catch up
and actually set a DMA mask.

Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs")
Reported-by: "H. Nikolaus Schaller" <hns@goldelico.com>
Tested-by: "H. Nikolaus Schaller" <hns@goldelico.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 561c4812545b..2c8abf07e617 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -232,6 +232,8 @@ void omap_fbdev_init(struct drm_device *dev)
 	if (!priv->num_pipes)
 		return;
 
+	dma_coerce_mask_and_coherent(dev->dev, DMA_BIT_MASK(32));
+
 	fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
 	if (!fbdev)
 		goto fail;
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-12  5:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-08 10:10 [PATCH for-5.3] drm/omap: ensure we have a valid dma_mask Christoph Hellwig
2019-08-09  6:40 ` Tomi Valkeinen
2019-08-09  6:40   ` Tomi Valkeinen
2019-08-09  8:07   ` Christoph Hellwig
2019-08-09 10:00     ` Tomi Valkeinen
2019-08-09 10:00       ` Tomi Valkeinen
2019-08-09 14:31       ` Christoph Hellwig
2019-08-12  5:56       ` Peter Ujfalusi
2019-08-12  5:56         ` Peter Ujfalusi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.