From patchwork Fri Oct 25 22:50:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11213139 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B6491515 for ; Fri, 25 Oct 2019 22:50:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70F43222BD for ; Fri, 25 Oct 2019 22:50:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70F43222BD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 240B46EBBE; Fri, 25 Oct 2019 22:50:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id AADDA6EBBA for ; Fri, 25 Oct 2019 22:50:17 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id u23so2518709pgo.0 for ; Fri, 25 Oct 2019 15:50:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/QsSnbqT/vxBzyqQX0KdepymXuDj6dGQtXlO9dbOSkk=; b=FE+uI6mhp8ao02xEnYnjEAOzzVzP3OW7QlHUwAIkABlm/djuHEH4gQDqqQK6iLD+zi 0GD8gYknkDeWvuCMgfnbnNRbxP03MEunCuKNGThp0HeBrtPPo0RWZzcpiQwqFg2k9ngQ 6eRk/2E5Xta6rwmGLZh09tjTg9aqC1pXXE2yBMjolsqYdIsJUncx5oreGBMrFPOQby5N HA8RjhXEuHRuWF5kOtx0bGRGVKP0cCei3lhoXGxYw7MT8v/6/UHUqZIIjR2v2vrzVRlB 9z8fH8gsHlcYoS+EPL+9+UnMqmaxyNOKWGE4PRNiCne+7mQH2+py0UeXDFLIcU2yx4/z BDyA== X-Gm-Message-State: APjAAAXHnQ32fjFUMEBj3bLQ7B3JW0q5qngLUQEaRPcDhh/bplgH7FXx phGNDV9L8q9rg3ErNMLWM/eM6A== X-Google-Smtp-Source: APXvYqziC/rX8OG0ZvE60odRUgM4+OMxyzH9YT1VE6orCRtoxz0Nkzr2UbFad4Lx05yIE7lyxETSEw== X-Received: by 2002:a63:5c21:: with SMTP id q33mr7104380pgb.78.1572043817153; Fri, 25 Oct 2019 15:50:17 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id o15sm2758018pjs.14.2019.10.25.15.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 15:50:16 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 1/3] dt-bindings: dma-buf: heaps: Describe CMA regions to be added to dmabuf heaps interface. Date: Fri, 25 Oct 2019 22:50:07 +0000 Message-Id: <20191025225009.50305-2-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191025225009.50305-1-john.stultz@linaro.org> References: <20191025225009.50305-1-john.stultz@linaro.org> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/QsSnbqT/vxBzyqQX0KdepymXuDj6dGQtXlO9dbOSkk=; b=QuTmYOTqrurVmJ/xuipLBhM7GLFY5pGr1iJX3QKVdcKK/H8I/5AdYHQwYMY2NUiqXc AxSegHg7VxQ7X/0azpl7Q8w46j+KDFXLJrEkkWcH6302yTkS51/vcbuJFQHzVwUgBWj6 JzKzOF5iC3EH7xZqAoCQULcCl2yXADIIzruVCenqNO7lW51zLg2HmLfFuT1VYsYAmSL3 3hnxUHcxN+1kHcPwaaGoAQ+jv/eXxBlLQUSk4/h9aGt3i0AK0wdV7K8dTsU2mZ3h+46J Faj4npHwJnvDE245x+lkyKBoXHWzL1LDqC/pK//cfEiAkdcXSCixwBIguLUCDpUHNjem amjg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Sandeep Patil , Chenbo Feng , Alistair Strachan , Liam Mark , Rob Herring , dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Hridya Valsaraju , Pratik Patel MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This binding specifies which CMA regions should be added to the dmabuf heaps interface. Cc: Rob Herring Cc: Mark Rutland Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: Sandeep Patil Cc: Hridya Valsaraju Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- .../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>; + }; From patchwork Fri Oct 25 22:50:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11213141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2C1A1515 for ; Fri, 25 Oct 2019 22:50:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8806821872 for ; Fri, 25 Oct 2019 22:50:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8806821872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D20366EBBC; Fri, 25 Oct 2019 22:50:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0089A6EBBB for ; Fri, 25 Oct 2019 22:50:18 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id w3so2502999pgt.5 for ; Fri, 25 Oct 2019 15:50:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KxqkayFb7m9sYPELw0DxQ5VjRvj+WqO4uI8I+KYabjE=; b=CJSRBjgVzHsc3mJcWBYbCAwy9BpRMUzUx3CKF++OJRZHcHi2vBZUDgJqdp1tF7XzIV oDhBMry4LNOfHqlXRV5WVbh5tFPw9b4YzYXwJVFj/IcRwHFZJUvthgl+QbFrHd8ngdzo f748sxsB+zOJZ1JyH5IkrNm7E/wEVIgqPDf0+abDdANcv/6h72kIXhhretExiwqOHFfF HNN7UKkvI/6MZ/9TxPaPSw+7/FYZotMApi8O07+GpC0ajFGXGkZR5B1O/Bsh7TMnOWWa I1Sls2SkgxcRAzX0CCYlfwwO8VuJ3YQCf/q8K2RZF6lmJtgKW0QRrqSsLze6ttb2/kfO mYow== X-Gm-Message-State: APjAAAXyZf0NpIOKr+CbsIMB8iohAjp8W2JDmfvD0AcI1cRLHJ9lJGFG DDE9sd2hSTM8liEX5Vb6k95xlQ== X-Google-Smtp-Source: APXvYqwH7FDeikwYbqOx/o7f38x/ORIOox29XW0WwLYwBPb50atXz5l+ZpfB/8ub7NnMSoQQiqTbow== X-Received: by 2002:a65:638a:: with SMTP id h10mr7136687pgv.388.1572043818363; Fri, 25 Oct 2019 15:50:18 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id o15sm2758018pjs.14.2019.10.25.15.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 15:50:17 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 2/3] dma-buf: heaps: Allow adding specified non-default CMA heaps Date: Fri, 25 Oct 2019 22:50:08 +0000 Message-Id: <20191025225009.50305-3-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191025225009.50305-1-john.stultz@linaro.org> References: <20191025225009.50305-1-john.stultz@linaro.org> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KxqkayFb7m9sYPELw0DxQ5VjRvj+WqO4uI8I+KYabjE=; b=YPNNxVZOZJlLKs7oXdvUCzvzCrltQPL8eWMoKdZWWv6dR9YRavL7O8GUrDdJN+aF1c NONSin6KYmGXn/ghUVTQuPQPS7fDeC0To+Axtws+gmTPLAZH8XKDibrwFAtn9aXa44zn z3R6iQ02U7OFyhYvs8GNx7UWmkS60YLobBM9GP1y/oHOBiWjS0KRzPNBiXLalgKt0/lk luVuTeAece9hd7my2vsqWp2iOIEILuRyhxB675rOPv/o+UmDNg2pK5vP4bAZ5+L+q3Bu EBPnMKcpO1TROkAZXERNtRg70QdVQbrEdXao1+P4SsHD5z1hkzgeGU7RNdmqeG+6JL4B pVhQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Sandeep Patil , Chenbo Feng , Alistair Strachan , Liam Mark , Rob Herring , dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Hridya Valsaraju , Pratik Patel MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In earlier versions of the dmabuf CMA heap, we added all CMA areas as CMA heaps. Andrew noted this might not be desired, and so we changed the code to only add the default CMA area. This patch extends the earlier effort so that devices can specifiy which CMA areas they want to add as dmabuf heaps via DT, and we'll only add those. This allows multiple CMA areas to be exported via the dmabuf heaps interface. Cc: Rob Herring Cc: Mark Rutland Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: Sandeep Patil Cc: Hridya Valsaraju Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/dma-buf/heaps/cma_heap.c | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c index 064926b5d735..0d5231a1e561 100644 --- a/drivers/dma-buf/heaps/cma_heap.c +++ b/drivers/dma-buf/heaps/cma_heap.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -174,5 +177,40 @@ static int add_default_cma_heap(void) return ret; } module_init(add_default_cma_heap); + +static int cma_heaps_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + struct cma *cma_area; + int ret; + + ret = of_reserved_mem_device_init_by_idx(&pdev->dev, np, 0); + if (ret) { + pr_err("Error %s(): of_reserved_mem_device_init_by_idx failed!\n", __func__); + return ret; + } + + cma_area = dev_get_cma_area(&pdev->dev); + if (cma_area) + ret = __add_cma_heap(cma_area, NULL); + + return ret; +} + +static const struct of_device_id cma_heap_dt_ids[] = { + { .compatible = "dmabuf-heap-cma" }, + {}, +}; +MODULE_DEVICE_TABLE(of, cma_heap_dt_ids); + +static struct platform_driver cma_heaps_driver = { + .driver = { + .name = "CMA Heaps", + .of_match_table = cma_heap_dt_ids, + }, + .probe = cma_heaps_probe, +}; + +module_platform_driver(cma_heaps_driver); MODULE_DESCRIPTION("DMA-BUF CMA Heap"); MODULE_LICENSE("GPL v2"); From patchwork Fri Oct 25 22:50:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11213137 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47DC7139A for ; Fri, 25 Oct 2019 22:50:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2DDAB21872 for ; Fri, 25 Oct 2019 22:50:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DDAB21872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D3C36EBBB; Fri, 25 Oct 2019 22:50:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B1736EBBB for ; Fri, 25 Oct 2019 22:50:20 +0000 (UTC) Received: by mail-pl1-x643.google.com with SMTP id w8so2063076plq.5 for ; Fri, 25 Oct 2019 15:50:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=osNStqGe/+pixQ+TIIwo4hgOQ0iCE+khF0tMpALPhbA=; b=TcyWQGG/YyNGqsuAqU+IKkta/JkY0FwsyCHy2fQNo0wTxASjtrcE795GermrsOlxRB FwSTbLA6xdnoQK2Q+sUN8TrKX7nckkRQ2UWOMvMmqMBM5KIKOjHrKv0B1vdwWvxOKQS0 YFvE9lxkvhsEgeIz/wJRL6PIl2fFdZEq6GG+Dnj1qSCwIHBpYBFSjaO0wF+AByVSZEJL pTVxZTbvF43WC9S+XfwMTf+wqVzz2XPWj7sOmvJTG1PX9msoF97uRiVD7eN8sfpy9LdH SzGIJ8Q8092aSfobdMvJFgxCt6nVgjvWSW8/K4J4amlyRYwxkaoAaWcRumNWazzGNMDv ed2Q== X-Gm-Message-State: APjAAAVscHLavLlrpY/+tubIz2U2TH6X/OtotoY58VB0wvdhRpoVOmx5 kusi1c5ZXGqbmh3JwYIFqij29w== X-Google-Smtp-Source: APXvYqwEfPgMUzNALdpaZ7hIfRdBK9Sl+x7omJQowf6j1uRY6bjZJnZXHQcn0Yn6ut98Jyy0zAwi0g== X-Received: by 2002:a17:902:8a96:: with SMTP id p22mr6280974plo.272.1572043819516; Fri, 25 Oct 2019 15:50:19 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id o15sm2758018pjs.14.2019.10.25.15.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 15:50:19 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 3/3] example: dts: hi3660-hikey960: Add dts entries to test cma heap binding Date: Fri, 25 Oct 2019 22:50:09 +0000 Message-Id: <20191025225009.50305-4-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191025225009.50305-1-john.stultz@linaro.org> References: <20191025225009.50305-1-john.stultz@linaro.org> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=osNStqGe/+pixQ+TIIwo4hgOQ0iCE+khF0tMpALPhbA=; b=t7oj1A8/ELwYNKEiPY/Pw18dHmD+od22U+4C5NhOE2wd5jiFHCseOjSRPgNDzrSyKq dPtd5CcVf9iIPtDONddh2eO4eP3j6pOkNRnByhXulltB5XaUZ4VBvTkOfFT3PuuTpbgR fm3I84wjJaEQhBPHt7WSbAUDubIimzLHWBCLSLWX5sMsbyrT3fCHo5F1xVc6KrpAYg6a AgjQBcwoRkdatjyjUVB6aSuWoLUrCrbKujOVSG/5gs8lzDyIeWuQNxGe2iKOkrtKXEpq 1wh9xGKkBGFWOlUKiBuDHcJfU/9wkfMXegJLC9PRvNvTK7V02u/r9lQ0YSfzf7FIX6cd JAlA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Sandeep Patil , Chenbo Feng , Alistair Strachan , Liam Mark , Rob Herring , dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Hridya Valsaraju , Pratik Patel MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Adds example test entry to create and expose a camera cma region via the dmabuf heaps interface This isn't a patch I'm submitting to merge, but just an example of how this functionality can be used, which I've used for testing. Cc: Rob Herring Cc: Mark Rutland Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Andrew F. Davis Cc: Chenbo Feng Cc: Alistair Strachan Cc: Sandeep Patil Cc: Hridya Valsaraju Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts index 190ac29b9e2f..783c5b2abd2d 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts @@ -75,12 +75,23 @@ }; /* global autoconfigured region for contiguous allocations */ - linux,cma { + cma_default: linux,cma { compatible = "shared-dma-pool"; reg = <0x0 0x20C00000 0x0 0x4000000>; reusable; linux,cma-default; }; + + cma_camera: cma-camera { + compatible = "shared-dma-pool"; + reg = <0x0 0x24C00000 0x0 0x4000000>; + reusable; + }; + }; + + cma_heap { + compatible = "dmabuf-heap-cma"; + memory-region = <&cma_camera>; }; reboot-mode-syscon@32100000 {