From patchwork Wed Jan 20 21:09:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 367095 Delivered-To: patches@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp813133jam; Wed, 20 Jan 2021 13:09:41 -0800 (PST) X-Received: by 2002:a05:6a00:1716:b029:19e:11b0:7804 with SMTP id h22-20020a056a001716b029019e11b07804mr10803870pfc.57.1611176980972; Wed, 20 Jan 2021 13:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611176980; cv=none; d=google.com; s=arc-20160816; b=WoYN/4qzuCO4FYTAQLmRvpT+bPp6ceQpeeVgS0MOKHF/o0K4ibKC1qYN7UhQzkwYEg e3BtG2yzWM9spkdmdztS5rtaI8pEc3Coiz5ksMhN6MXTOwt6lej9kOG51AWUTiQul32s hcq3hvdp6zByQqcVy6jj8rC1XhGPiMgZWdAUpyquTYZy2HiHR69nHyyMxGLNPZPK01E8 IvmS+/SAWgIdECY54s2d7VY5MUIYlqbB+zVpZJZGndtxDTm0miI9POJDxYPMBTuQoNc5 5mH8gphAELkzYNoBxAB4wCSGeaKblchxCaT0vLQUC3QPM5i63GBpHif9iefGrDJ1vwc+ y1yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=O4d6auqSX1j/vMOr3TsD18PFRnP6mGB4INh2IgrTTG4=; b=xZiCjZuZw2U4EvI3EmyQTWhew6k44KESEj0fJ2DeVoFnVOAOyMcsE8rk9VvbWUU891 8hsS5dPnkf0kW6yXa9NHA5cDeHni9Il7VOSVwgHluNXLq5rs0oypCEVKXhuAsGmUdy91 kYIARUO6E+3e0MAa7xjc2EAGY338i7YImuqZHIUdc3sERCZWmkR0HpqiX4Cd3C3qxziD 29FmRPelubrC0HBSpl+9Hpn3DtAwlxU9WQjnQWjlJbn37OZFZ/RzWcoCeKeUALRxpdvK zODZUUQhy9s2J0ecr/G6B6H3ZApbUxSpIkPOLZvQrRrVBpWqzIYY0y6p1ovZcQwbhEdT ReyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GdhLdiHi; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 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-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id f20sor1694505pgl.61.2021.01.20.13.09.40 for (Google Transport Security); Wed, 20 Jan 2021 13:09:40 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GdhLdiHi; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 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:mime-version :content-transfer-encoding; bh=O4d6auqSX1j/vMOr3TsD18PFRnP6mGB4INh2IgrTTG4=; b=GdhLdiHi2LyrCQQMhzh0pvLH3gzKbpQzt27Y+CanmyiE5UaGiBQNAUzsr9Zaj0Zhr4 KvJdY3Fzc3gckZGSp5QU8M5TxalhTsGKPF+fViwh/lBrax/yFrCK2Xm92/BNDmnnjPeU RZJryXRD7bznQNqVbnISwkIGndj8vzzsDJqNtcRJVPE2eUPb+buDtT72alBwOE5CVd1b 5Zfg0FvQURoty3ptICEh9eSaAUog4x2tJQcdnvQcurrjdvmybFM9BWre3F69jbtW0JpG vKVbrvhCnyOPCsn02flcKhrtprB++yiII+28o7PgAqZ8wjCfT+pX98YN993EZcpX9kF6 FN9g== 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:mime-version :content-transfer-encoding; bh=O4d6auqSX1j/vMOr3TsD18PFRnP6mGB4INh2IgrTTG4=; b=E9R0w+si0CnbGnt/1bRz+0ZOam1ZBlSuWZOhjFVRFpFM17esKvku3OEPw/U84YQ8iO KhK/frtTAOzoi3uZaxzWd4PBAis9uzEdOWZV9rm/eaMcPjAQjWP5KWujJLTRwgYuPuB/ BhDGdP2Nh7hn8kHHxvZ+hSW+cOEVpmU1n1vsF3wSBTXpIasWSbzX95iUytTOlTBZXUG+ fLBpofglIP21G9/J7jK7aAtnzQfnQuyTkcop4oYRCDmGbTieS9a14CxsKlIkohK13Hv7 Sa0b21KBa/z8kFib0L7sW5HaJsfjxXRPQzyeNz2+F4iiHcffUawsJlQLXyJJ+zQAwOvP ipJA== X-Gm-Message-State: AOAM533TqVbg18sWBrX5s4ua38Drsj6NGmACJqn7jqpYcIkgRElmEX7M MF7Lu9uMXs5tc31iBSyBmhB9TYn8 X-Google-Smtp-Source: ABdhPJwVPrD98BzRwSDLgSwObG8PYNxIaFpiX8zRhpHlai6xWuIyDqUItiSV/D8Cpv4EqgdSPtOpcg== X-Received: by 2002:a63:4d59:: with SMTP id n25mr10926215pgl.122.1611176980657; Wed, 20 Jan 2021 13:09:40 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id f15sm3265629pja.24.2021.01.20.13.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 13:09:39 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Daniel Vetter , Sumit Semwal , Liam Mark , Laura Abbott , Brian Starkey , Hridya Valsaraju , Suren Baghdasaryan , Sandeep Patil , Daniel Mentz , Chris Goldsworthy , =?utf-8?q?=C3=98rjan_Eide?= , Robin Murphy , Ezequiel Garcia , Simon Ser , James Jones , Bing Song , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC][PATCH 0/3] dmabuf heaps: system uncached and cma uncached heaps Date: Wed, 20 Jan 2021 21:09:34 +0000 Message-Id: <20210120210937.15069-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 After the last round submitting the system-uncached heap, I got some feedback that Daniel would like to see it demonstrated with a mesa based system. I'm still working on such a gralloc implementation (using the db845c), but along with other work, so I don't yet have something to share there. However, Bing Song reached out and was interested in having a uncached variant for the CMA heap as well, and he shared this patch providing an initial implementation. This gave me some hesitation with regards to the earlier discussion around what sort of attributes would be useful for the flags field of the allocation IOCTL. In earlier discussions, folks seemed happy to provide the uncached system heap functionality as its own heap chardev, as it seemed uncertain that the uncached attribute would truely be generic across all heaps. But with Bing's patch, it seems like it may be generically useful, and utilizing a flag might be a bit cleaner then adding lots of duplicative heap names postfixed with "-uncached". So I wanted to re-submit both of these together to reopen that discussion on the question of if a BUF_FLAG_UNCACHED flag would make sense, or if folks still think separate heap chardevs is the way to go. thanks -john Cc: Daniel Vetter Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: Bing Song Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Bing Song (1): dma-buf: cma_heap: Add a cma-uncached heap re-using the cma heap John Stultz (2): dma-buf: dma-heap: Keep track of the heap device struct dma-buf: system_heap: Add a system-uncached heap re-using the system heap drivers/dma-buf/dma-heap.c | 33 ++++++-- drivers/dma-buf/heaps/cma_heap.c | 119 +++++++++++++++++++++++++--- drivers/dma-buf/heaps/system_heap.c | 111 ++++++++++++++++++++++---- include/linux/dma-heap.h | 9 +++ 4 files changed, 236 insertions(+), 36 deletions(-) -- 2.17.1