lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Oct 2019 18:32:29 -0500
From:   Rob Herring <rob.e.herring@...il.com>
To:     John Stultz <john.stultz@...aro.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Laura Abbott <labbott@...hat.com>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Liam Mark <lmark@...eaurora.org>,
        Pratik Patel <pratikp@...eaurora.org>,
        Brian Starkey <Brian.Starkey@....com>,
        "Andrew F . Davis" <afd@...com>, Chenbo Feng <fengc@...gle.com>,
        Alistair Strachan <astrachan@...gle.com>,
        Sandeep Patil <sspatil@...gle.com>,
        Hridya Valsaraju <hridya@...gle.com>,
        devicetree <devicetree@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [RFC][PATCH 1/3] dt-bindings: dma-buf: heaps: Describe CMA
 regions to be added to dmabuf heaps interface.

On Fri, Oct 25, 2019 at 5:51 PM John Stultz <john.stultz@...aro.org> wrote:
>
> This binding specifies which CMA regions should be added to the
> dmabuf heaps interface.

Is this an ION DT binding in disguise? I thought I killed that. ;)

>
> Cc: Rob Herring <robh+dt@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Laura Abbott <labbott@...hat.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@...aro.org>
> Cc: Sumit Semwal <sumit.semwal@...aro.org>
> Cc: Liam Mark <lmark@...eaurora.org>
> Cc: Pratik Patel <pratikp@...eaurora.org>
> Cc: Brian Starkey <Brian.Starkey@....com>
> Cc: Andrew F. Davis <afd@...com>
> Cc: Chenbo Feng <fengc@...gle.com>
> Cc: Alistair Strachan <astrachan@...gle.com>
> Cc: Sandeep Patil <sspatil@...gle.com>
> Cc: Hridya Valsaraju <hridya@...gle.com>
> Cc: devicetree@...r.kernel.org
> Cc: dri-devel@...ts.freedesktop.org
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> ---
>  .../bindings/dma/dmabuf-heap-cma.txt          | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt
>
> diff --git a/Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt b/Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt
> new file mode 100644
> index 000000000000..bde7b1f1c269
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt
> @@ -0,0 +1,31 @@
> +* DMA-BUF CMA Heap
> +
> +Specifies a CMA region that should be added to the dma-buf heaps
> +interface.
> +
> +Required properties:
> +- compatible: Must be "dmabuf-heap-cma"
> +- memory-region: phandle to a CMA reserved memory node
> +
> +Example:
> +This example has a camera CMA node in reserved memory, which is then
> +referenced by the dmabuf-heap-cma node.
> +
> +
> +       reserved-memory {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +               ...
> +               cma_camera: cma-camera {
> +                       compatible = "shared-dma-pool";
> +                       reg = <0x0 0x24C00000 0x0 0x4000000>;
> +                       reusable;
> +               };
> +               ...
> +       };
> +
> +       cma_heap {
> +               compatible = "dmabuf-heap-cma";
> +               memory-region = <&cma_camera>;

Why the indirection here? Can't you just add a flag property to
reserved-memory nodes like we do to flag CMA nodes?

As I suspected, it's because in patch 2 you're just abusing DT to
instantiate platform devices. We already support binding drivers to
reserved-memory nodes directly.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ