Re: linux-next: build failure after merge of the drm tree

From: Paul Cercueil
Date: Mon Sep 28 2020 - 07:47:11 EST




Le lun. 28 sept. 2020 à 13:34, Christoph Hellwig <hch@xxxxxx> a écrit :
On Mon, Sep 28, 2020 at 12:15:56PM +0200, Paul Cercueil wrote:
Hi Christoph,

Le lun. 28 sept. 2020 à 8:04, Christoph Hellwig <hch@xxxxxx> a écrit :
On Mon, Sep 28, 2020 at 01:54:05PM +1000, Stephen Rothwell wrote:
Hi all,

After merging the drm tree, today's linux-next build (x86_64
allmodconfig)
failed like this:

The driver needs to switch do dma_alloc_noncoherent + dma_sync_single*
like the other drivers converted in the dma tree. Paul, let me know if
you have any questions.

I don't dma_alloc* anything, DRM core does. I use the
DMA_ATTR_NON_CONSISTENT attr with dma_mmap_attrs(). Is there a replacement
for that?

dma_mmap_attrs can only be used on allocations from dma_mmap_attrs with
the same attrs. As there is no allocation using DMA_ATTR_NON_CONSISTENT
in the drm core, something looks very fishy here.

Is that a fact? I don't see why you couldn't change the cache settings after allocation. In practice it works just fine.

Where does the allocation you try to mmap come from? All the allocations
in drivers/gpu/drm/drm_gem_cma_helper.c seems to use dma_alloc_wc (aka
dma_allloc_attrs with the DMA_ATTR_WRITE_COMBINE flag).

It's the dma_alloc_wc.

-Paul