[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190227004255.GG39872@atomide.com>
Date: Tue, 26 Feb 2019 16:42:55 -0800
From: Tony Lindgren <tony@...mide.com>
To: Robin Murphy <robin.murphy@....com>
Cc: Nicolin Chen <nicoleotsuka@...il.com>, hch@....de,
m.szyprowski@...sung.com, vdumpa@...dia.com,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
tomi.valkeinen@...com, laurent.pinchart@...asonboard.com,
sre@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-omap@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] Revert "dma-contiguous: do not allocate a single page
from CMA area"
* Robin Murphy <robin.murphy@....com> [190226 23:36]:
> On 2019-02-26 8:23 pm, Nicolin Chen wrote:
> > This reverts commit d222e42e88168fd67e6d131984b86477af1fc256.
> >
> > The original change breaks omap dss:
> > omapdss_dispc 58001000.dispc:
> > dispc_errata_i734_wa_init: dma_alloc_writecombine failed
> >
> > Let's revert it first and then find a safer solution instead.
Sounds like a good idea since we're only have few days left
before the merge window.
> Ah, I think I see the problem - once arch/arm's __dma_alloc() has decided to
> use CMA (because dev_get_cma_area(dev) returns the global area), it then
> won't fall back to trying a regular page allocation if
> dma_alloc_from_contiguous() returns NULL. Thus anything on 32-bit Arm trying
> to allocate a single-page buffer in blockable context with a CMA-enabled
> config is just going to fail. Similarly, it looks like none of the
> DMA_ATTR_FORCE_CONTIGUOUS cases are prepared to handle this change either
> (amd_iommu appears technically affected, but is already using
> dma_alloc_from_contiguous() backwards compared to everyone else, hmm).
>
> I guess the question is whether to add alloc_page()/free_page() fallbacks to
> those call sites, or stuff them directly into the CMA helpers here.
Well if you come up with some test patch, I can easily test it :)
> > Would you please test and verify? Thanks!
Yes this revert works for me:
Tested-by: Tony Lindgren <tony@...mide.com>
Powered by blists - more mailing lists