From patchwork Fri Oct 25 22:50:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11213133 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 C77F8139A for ; Fri, 25 Oct 2019 22:50:20 +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 AC73121872 for ; Fri, 25 Oct 2019 22:50:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC73121872 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 0680D6EBBA; Fri, 25 Oct 2019 22:50:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92BC46EBBA for ; Fri, 25 Oct 2019 22:50:16 +0000 (UTC) Received: by mail-pl1-x642.google.com with SMTP id q21so2037445plr.13 for ; Fri, 25 Oct 2019 15:50:16 -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; bh=WK3SlUf5Gs26MRGfMYO+sZq/r8if+NvP4msj/EMhnDI=; b=X130BkybS+oavJ1d6Q1n4J+K6/ySjk3SoLuOurcZ5XKCp/XQRNmtiM5UKB0Vz7rrqG NdeHtz6biD3Q9GpZV8AeJEEJVfsXJZrjROpjAzlMunypKNXktxdPqQmNP0HDErxTs/IW mR3qiKUaJN8OvAzRuVANwmGX9g/f3kibc2Z9+1oVpSCewsnxERxs46Q2QjFxDikSBVDj T0loAqjgBnnvvS7V9JpA50L++xx+qbWshyUnFTnfXIAUc2iDpzjF7qNLUGJBM9oSAOFs 6Q3wmUWMb9WCJJ4KcCyj5e7VEkGPPZGMp0XXUTJezsruc/ACISDy5bn5nqjj8Srr2gf6 musw== X-Gm-Message-State: APjAAAXe2E5mCUJuKOMWF3jTKKZidWzUb7g0mSf7dlzDbmARogoRRZ75 6AymGIgo6j4Ylfgysa7TvknB5w== X-Google-Smtp-Source: APXvYqwQLQqa6cIVroIB0jGdxbexLrpc2SfRdat8vKLK45RzjXk9xs4WDP+k4gpJHIg7f7PX43Yojw== X-Received: by 2002:a17:902:d913:: with SMTP id c19mr6398645plz.48.1572043816005; Fri, 25 Oct 2019 15:50:16 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 15:50:15 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 0/3] Support non-default CMA regions to the dmabuf heaps interface Date: Fri, 25 Oct 2019 22:50:06 +0000 Message-Id: <20191025225009.50305-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 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; bh=WK3SlUf5Gs26MRGfMYO+sZq/r8if+NvP4msj/EMhnDI=; b=W06oXB6IMpWhM8dtYxX4fJ2EYFzVUD5CG6VL1kdGUPIGPjDdJOvFUBgYM3ETY3MfKK IGw50t96VojqD+FT/EO1EVcSuM2ummWiEQqaHrpkfnQKdLdjWpXhJPCoDfuncYeLu7yR S/dND9LH65leNIe3NixQsxPxXFhbVLUDu7zLJ2/R8HjgnPgQhadWewKuo7gGRIcEY+jq qd+N/q5dVs390J3XqSeJcYZue+xNm061VT5uIFLhDjYYJPS/W6XuVG89a3yHNM8afRuw gVMVCjzQ/OJ6MmZmisewh8Ds3g1fUbpntD6qrNjczAA+0j4/t78L45JkiT3Nk0mLNoe+ qcKw== 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" Now that the dmabuf heaps core code has been queued, I wanted to submit for initial review some of the changes I have pending. In previous versions, the dmabuf CMA heap added all CMA areas to the dmabuf heaps interface. However, Andrew noted this may not be desirable, so I've come up with a DT binding and code to allow specified CMA regions to be added to the dmabuf heaps interface. This allows additional CMA regions for things like cameras, etc to be allocated from separately from the default region. Review and feedback would be greatly appreciated! thanks -john 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 John Stultz (3): dt-bindings: dma-buf: heaps: Describe CMA regions to be added to dmabuf heaps interface. dma-buf: heaps: Allow adding specified non-default CMA heaps example: dts: hi3660-hikey960: Add dts entries to test cma heap binding .../bindings/dma/dmabuf-heap-cma.txt | 31 +++++++++++++++ .../boot/dts/hisilicon/hi3660-hikey960.dts | 13 ++++++- drivers/dma-buf/heaps/cma_heap.c | 38 +++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt