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: 177794 Delivered-To: patches@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp168677ill; Fri, 25 Oct 2019 15:50:16 -0700 (PDT) X-Received: by 2002:a17:902:ab91:: with SMTP id f17mr6437349plr.136.1572043816555; Fri, 25 Oct 2019 15:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572043816; cv=none; d=google.com; s=arc-20160816; b=rB5cwUZMkZueoD8q5r4/Mfe8GUPLNGS0IbMQotHDx6FfT8eNyh0sX4nUTtm9FZ+Nd2 jduyS8pHWy3D3dfpsl2nVWkMCjZ0g64vDmZ9NjXsTSeWKbk2yjrXejQW24j7VvlbrkA4 OBvAt49p9kKVFVq73+At5KVqX0BFywZv+zif6q0yTHDE47xj72WIkSAt3N01RD5yOV1i 8zNx/k5u3/YkwP20i4LYV3lIN//w3FNQQ9Sw5laEeNEPGfuM0GKIiusgfRvLq7aizKuX en0Yzvwk80oqxdprYdEioPjlGE3a9S18hop9GD4W6ZIw1t5KTdivAA7fcd4OrlCsVJFj hesQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=WK3SlUf5Gs26MRGfMYO+sZq/r8if+NvP4msj/EMhnDI=; b=pJ3XuQWb/X/UtVKBdM1srGgmcWpLJZiPBfASHpQCKNsbuwYOYAFL3vzOS9+4NBxhg/ QPvqekbK07hE+/rw0kjdyjwvQR0URYDH2yD6Yg7wBBB+yt14g+PV5N9YWWmUppHc/kNv hCA0FvzzQt06FwdSfY1yZ5tYMH4kVB+dWUxDZWlVvUg5HhuzF9AOlDF+/BoQXxDvHgXb i8xxPj4Tkb0KrtcYTcsVuenEJ2uDp3eKmn4t925rkD+xmLu/MVCEVTqX5adBEFY25ZYz N+GmWY0efBXZ8zO+Ch8/cTYEmmfYN2fggS7bQkzkIVxotr8QJvXkAY34a00cXbqV2BSa WYiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W06oXB6I; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d14sor4788337plj.72.2019.10.25.15.50.16 for (Google Transport Security); Fri, 25 Oct 2019 15:50:16 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W06oXB6I; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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=Ps5BINQKeajyqueA9DWDzXqyJGkV6v246aIcXdQvMgywbTvGSLhgf0E4y2vacF6/kD RFDkuHXu86pHWgvmLuFC/sEIfvuWV1goa24UJ02XzFTRJ7z61qQZTTuLP3QN1txkMUEG yDxuwkdspuoJs3xI+s4DAaRc+PnTNhtFwtB4JLmRPhO2ngXpwvBo2STYHO5g1mbAA7yL aYzyOv9sRMEQ50Hs6MbEhoJFsQ/EojcDa+tOWlTybflzumocKaQwf+QWTRjQh2rMeO+Z dnHCTYxqC0aV/BHteZP4iqVedtwJ3j6aYyO/IJZ6d4xaeIrkbTJb6js2uU6OjfXqnc88 KHtw== X-Gm-Message-State: APjAAAX6S4sM5TyfDrdlI6CuoZ4oO2b2Rs0im8Lottz9HTqUvM1bQUAE cKAVPXalDg7Wie37uAh62gFOLItP 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) Return-Path: 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 Cc: John Stultz , Rob Herring , Mark Rutland , Laura Abbott , Benjamin Gaignard , Sumit Semwal , Liam Mark , Pratik Patel , Brian Starkey , "Andrew F . Davis" , Chenbo Feng , Alistair Strachan , Sandeep Patil , Hridya Valsaraju , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org 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 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 -- 2.17.1