devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] dma-buf: heaps: Support carved-out heaps and ECC related-flags
@ 2024-05-15 13:56 Maxime Ripard
  2024-05-15 13:56 ` [PATCH 1/8] dma-buf: heaps: Introduce a new heap for reserved memory Maxime Ripard
                   ` (8 more replies)
  0 siblings, 9 replies; 32+ messages in thread
From: Maxime Ripard @ 2024-05-15 13:56 UTC (permalink / raw)
  To: Rob Herring, Saravana Kannan, Sumit Semwal, Benjamin Gaignard,
	Brian Starkey, John Stultz, T.J. Mercier, Christian König
  Cc: Mattijs Korpershoek, devicetree, linux-kernel, linux-media,
	dri-devel, linaro-mm-sig, Maxime Ripard

Hi,

This series is the follow-up of the discussion that John and I had a few
months ago here:

https://lore.kernel.org/all/CANDhNCquJn6bH3KxKf65BWiTYLVqSd9892-xtFDHHqqyrroCMQ@mail.gmail.com/

The initial problem we were discussing was that I'm currently working on
a platform which has a memory layout with ECC enabled. However, enabling
the ECC has a number of drawbacks on that platform: lower performance,
increased memory usage, etc. So for things like framebuffers, the
trade-off isn't great and thus there's a memory region with ECC disabled
to allocate from for such use cases.

After a suggestion from John, I chose to start using heap allocations
flags to allow for userspace to ask for a particular ECC setup. This is
then backed by a new heap type that runs from reserved memory chunks
flagged as such, and the existing DT properties to specify the ECC
properties.

We could also easily extend this mechanism to support more flags, or
through a new ioctl to discover which flags a given heap supports.

I submitted a draft PR to the DT schema for the bindings used in this
PR:
https://github.com/devicetree-org/dt-schema/pull/138

Let me know what you think,
Maxime

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Maxime Ripard (8):
      dma-buf: heaps: Introduce a new heap for reserved memory
      of: Add helper to retrieve ECC memory bits
      dma-buf: heaps: Import uAPI header
      dma-buf: heaps: Add ECC protection flags
      dma-buf: heaps: system: Remove global variable
      dma-buf: heaps: system: Handle ECC flags
      dma-buf: heaps: cma: Handle ECC flags
      dma-buf: heaps: carveout: Handle ECC flags

 drivers/dma-buf/dma-heap.c            |   4 +
 drivers/dma-buf/heaps/Kconfig         |   8 +
 drivers/dma-buf/heaps/Makefile        |   1 +
 drivers/dma-buf/heaps/carveout_heap.c | 330 ++++++++++++++++++++++++++++++++++
 drivers/dma-buf/heaps/cma_heap.c      |  10 ++
 drivers/dma-buf/heaps/system_heap.c   |  29 ++-
 include/linux/dma-heap.h              |   2 +
 include/linux/of.h                    |  25 +++
 include/uapi/linux/dma-heap.h         |   5 +-
 9 files changed, 407 insertions(+), 7 deletions(-)
---
base-commit: a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6
change-id: 20240515-dma-buf-ecc-heap-28a311d2c94e

Best regards,
-- 
Maxime Ripard <mripard@kernel.org>


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2024-07-12 10:37 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15 13:56 [PATCH 0/8] dma-buf: heaps: Support carved-out heaps and ECC related-flags Maxime Ripard
2024-05-15 13:56 ` [PATCH 1/8] dma-buf: heaps: Introduce a new heap for reserved memory Maxime Ripard
2024-05-15 13:56 ` [PATCH 2/8] of: Add helper to retrieve ECC memory bits Maxime Ripard
2024-05-15 13:56 ` [PATCH 3/8] dma-buf: heaps: Import uAPI header Maxime Ripard
2024-05-16  8:14   ` Christian König
2024-05-15 13:56 ` [PATCH 4/8] dma-buf: heaps: Add ECC protection flags Maxime Ripard
2024-05-15 13:57 ` [PATCH 5/8] dma-buf: heaps: system: Remove global variable Maxime Ripard
2024-05-15 13:57 ` [PATCH 6/8] dma-buf: heaps: system: Handle ECC flags Maxime Ripard
2024-05-15 13:57 ` [PATCH 7/8] dma-buf: heaps: cma: " Maxime Ripard
2024-05-16  5:55   ` kernel test robot
2024-05-16 12:48   ` kernel test robot
2024-05-15 13:57 ` [PATCH 8/8] dma-buf: heaps: carveout: " Maxime Ripard
2024-05-15 18:42 ` [PATCH 0/8] dma-buf: heaps: Support carved-out heaps and ECC related-flags John Stultz
2024-05-16 10:56   ` Daniel Vetter
2024-05-16 12:41     ` Maxime Ripard
2024-05-16 16:51     ` John Stultz
2024-05-21 12:06       ` Daniel Vetter
2024-05-22 13:18         ` Maxime Ripard
2024-05-23  9:45           ` Daniel Vetter
2024-06-28 11:29         ` Thierry Reding
2024-06-28 13:08           ` Maxime Ripard
2024-06-28 14:42             ` Thierry Reding
2024-07-04 12:24               ` Maxime Ripard
2024-07-05 14:31                 ` Thierry Reding
2024-07-05 15:35                   ` Daniel Vetter
2024-07-08  7:14                     ` [Linaro-mm-sig] " Christian König
2024-07-11 12:44                       ` Thierry Reding
2024-07-10 12:10                   ` Maxime Ripard
2024-07-11 12:43                     ` Thierry Reding
2024-07-12 10:37                     ` Thierry Reding
2024-05-16 12:21   ` Maxime Ripard
2024-05-16 17:09     ` John Stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).