Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp397567ybz; Fri, 1 May 2020 00:41:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKfq7mS8cwHZ4HvBGKFfK65QF/zOQu1VZGLbHd1ENAY9jz4UgQVDMcQ/+eYLWbEfbgQ6eWa X-Received: by 2002:a17:906:7f13:: with SMTP id d19mr2012221ejr.57.1588318897671; Fri, 01 May 2020 00:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588318897; cv=none; d=google.com; s=arc-20160816; b=xuaC1Nu3MIJ+7Oj+sU2KC4rnNrk3cqQ1sHslffj80Tf3+Rm9NPuJH2dapY3aSWdQCx KDgM/94zx+oMarhHZjEFKfECC1N1de3l717JVJUUnP2l0vLiGf4RfYlxRA2HVJNQKLoc iv9tmaUlqSxbGzdvwvoTPRqpoznpCbyVXkQx2fB0lWqsm4dmK5eIjAz9cSSlJHiHe7Wu 8c/IwvbYJxsNk36K0NJYtRtanI5ayByF5p1xWZtwZH9BjUkUJ7WfLKXHKlT6N++gLXzy ZKkIyr8wqavGlNDpdZH3e4ErUfTD8WRRi+TKEo9qUd0TmzkaMezh+/NWWpPamQkX8ui9 yAGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=7dbuQPhIsTcQHi6Sc8OBXbUFsIKd1Ghgu7yJHTjcrBA=; b=vlLm8BbGkD7DpVNlVYKOiYxU76le/bNgrjXpkS5chOvBWBtssCEyrSZKY5nq97qx3r /8qYRc41cVk7NW4WKY+JBWH6jZTPygJ4WoLzCJO9Z3b1A5QAZLUY2kCjJqdJbNN9Y/eB LEMr8b0u53Y6JfBZ3X4ZK5zn+iJNz+7yA7xmiX7P/2unWfKFz7tH2Er04JxldnXH7fLF M6XnOWfF23UNLMKEh5l2KbqChREDkox6o+1jImqWmMUz+y5TJHOt+KTuG9evxovXL2th mafQdz5u2GcKa08uPzhzyxS0ty5JHCRT9YiZP5gmNJN0J53b9jXXT1D6/AcqenakHUQ2 fneQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uSMKBOO6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l64si1473723ede.47.2020.05.01.00.41.14; Fri, 01 May 2020 00:41:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uSMKBOO6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728321AbgEAHj6 (ORCPT + 99 others); Fri, 1 May 2020 03:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728293AbgEAHj6 (ORCPT ); Fri, 1 May 2020 03:39:58 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF8C1C035495 for ; Fri, 1 May 2020 00:39:56 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id 18so1279127pfx.6 for ; Fri, 01 May 2020 00:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=7dbuQPhIsTcQHi6Sc8OBXbUFsIKd1Ghgu7yJHTjcrBA=; b=uSMKBOO6QIs4uLVfahwgnBUw2gO5QWpFhQb6F1MFxTptPMF+Z0o/WwC6bov2PX1B+z GpMi0QLlCm5bjeCQb1Ib4KAhIABJItLI42QmCZQZGMtFoAd5BloKynNn9kQq3/e29zu2 9IyjzXDmbfN8mJesTXXH8vGo6U5pKfc97OK3wq90VHEBym+PgXw/vn++YmU/npiUaTr5 EKndS27RG5ykIcMNfuIjRBSN+x85vpHDVdCcNP20vltiVGnPnJOhrLIPCacJWk+nw8H5 h/1ZfEiY9PDJtMZv9WMs5aKqGIRak+Cy8hyL1nVn2z4TqrdRTnPu7SgigutOZnbMfMx7 2gGg== 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=7dbuQPhIsTcQHi6Sc8OBXbUFsIKd1Ghgu7yJHTjcrBA=; b=iusXlkYu+fsHrc9iNfgQx673pk3V0uf1qBwpx3g5jJ9xMEbHnwSLsC+k8MlPNx10si 2JYYK8htf9YozZ8wtCOFRSc04pZuZy9czG01yeDXfif+pcsCL0t/yE+3yaq1kYbyWAW7 KP+Uwx1WhLsEtEoZHwidrrkeMlc8//k3vwGcEm3grVJT/g0aA0eta+7Pwd4ffnXm5YcB lvHEZEzqBn3R/NERS4w6a4XF48AbxWpLSnhVpE18QcbyzOOJxSlGOo4BoO4CuqVeCsCA h8tsvQWCsTTilnhHHeJFLtiP8w27nfpVdogd539lGaTQkrz349hLUSfMvKP6/KsNrR35 cI6A== X-Gm-Message-State: AGi0PuZ42O5gmPALxghsC+vEq5ujCqky6lc3U5PMJstUzuGYvHuNlogx +TtAJvucZYdlImii5i00BWnvmg91UnM= X-Received: by 2002:a62:7bcf:: with SMTP id w198mr2002566pfc.226.1588318796201; Fri, 01 May 2020 00:39:56 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id w12sm1557841pfq.133.2020.05.01.00.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2020 00:39:55 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Rob Herring , Sumit Semwal , "Andrew F. Davis" , Benjamin Gaignard , Liam Mark , Pratik Patel , Laura Abbott , Brian Starkey , Chenbo Feng , Alistair Strachan , Sandeep Patil , Hridya Valsaraju , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Andrew Morton , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org Subject: [RFC][PATCH 0/4] Support non-default CMA regions to the dmabuf heaps interface Date: Fri, 1 May 2020 07:39:45 +0000 Message-Id: <20200501073949.120396-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a much belated second stab at allowing non-default CMA regions to be exposed via the dmabuf heaps interface. Previous attempt was here: https://lore.kernel.org/lkml/20191025225009.50305-2-john.stultz@linaro.org/T/ This pass tried to take Rob's earlier suggestion to use a flag property. Feedback would be greatly welcome! thanks -john Cc: Rob Herring Cc: Sumit Semwal Cc: "Andrew F. Davis" Cc: Benjamin Gaignard Cc: Liam Mark Cc: Pratik Patel Cc: Laura Abbott Cc: Brian Starkey Cc: Chenbo Feng Cc: Alistair Strachan Cc: Sandeep Patil Cc: Hridya Valsaraju Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: Andrew Morton Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-mm@kvack.org John Stultz (4): devicetree: bindings: Add linux,cma-heap tag for reserved memory mm: cma: Add dma_heap flag to cma structure dma-buf: cma_heap: Extend logic to export CMA regions tagged with "linux,cma-heap" example: dts: hi3660-hikey960: Add dts entries to test cma heap binding .../reserved-memory/reserved-memory.txt | 3 +++ .../boot/dts/hisilicon/hi3660-hikey960.dts | 7 +++++++ drivers/dma-buf/heaps/cma_heap.c | 18 +++++++++--------- include/linux/cma.h | 3 +++ kernel/dma/contiguous.c | 3 +++ mm/cma.c | 11 +++++++++++ mm/cma.h | 1 + 7 files changed, 37 insertions(+), 9 deletions(-) -- 2.17.1