On 02/03/18 12:37, Linus Walleij wrote:
On Fri, Mar 2, 2018 at 1:11 PM, Robin Murphy <robin.mur...@arm.com> wrote:
On 02/03/18 09:09, Linus Walleij wrote:


Also the Versatile Express CLCD on the motherboard has
a dedicated video memory, and cannot use CMA (ha! complex!)
and I will need to figure out a way to work around that.
The CLCDs synthesized on the core tiles for CA9 work
fine with this though.

Out of curiosity, what's the issue with declaring the VRAM as a CMA region?
That's certainly worked for stuff like local RAM on FPGA tiles in the past,
and I can't think offhand of any way in which VExpress is wildly different
(but I am of course open to being wrong...)

There is nothing wrong with that apart from my ignorance
of that solution. So thanks! :D

My experience with CMA is limited to using the 7 areas
that are defined by default in Kconfig and the DRM helpers
just plugging in on the front.

Do you have some pointers? Is this something I can
handily just set up in the device tree?

It should be - the inner workings of dma-{coherent,contiguous} are a maze of twisty little passages, all alike, and it'll take me a while to page the details back in, but IIRC it's mostly just a case of having a reserved-memory node covering the VRAM with the right combination of magic properties for rmem_dma_setup() to pick up, such that it gets assigned as the CLCD's private region. The subsequent "just plugging in" aspect doesn't change, it just makes allocations start taking this route under the covers:

  drm_gem_cma_create()
    dma_alloc_wc()
      dma_alloc_attrs()
        dma_alloc_from_dev_coherent()

I could have sworn I've exchanged relevant FPGA DT fragments with Liviu in the past, but now I can't seem to find one to refer back to :(

Robin.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to