<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/dma-buf/heaps, branch v6.2.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.2.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.2.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2022-11-11T20:49:51Z</updated>
<entry>
<title>dma-buf/heaps: Assert held reservation lock for dma-buf mmapping</title>
<updated>2022-11-11T20:49:51Z</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2022-11-10T20:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=27f3733a104950169797407fea330a2e1d42f16b'/>
<id>urn:sha1:27f3733a104950169797407fea330a2e1d42f16b</id>
<content type='text'>
When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be
held. Add locking sanity checks to the dma-buf mmaping callbacks to ensure
that the locking assumptions won't regress in the future.

Suggested-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221110201349.351294-5-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>dma-buf-map: Rename to iosys-map</title>
<updated>2022-02-08T00:35:35Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@intel.com</email>
</author>
<published>2022-02-04T17:05:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7938f4218168ae9fc4bdddb15976f9ebbae41999'/>
<id>urn:sha1:7938f4218168ae9fc4bdddb15976f9ebbae41999</id>
<content type='text'>
Rename struct dma_buf_map to struct iosys_map and corresponding APIs.
Over time dma-buf-map grew up to more functionality than the one used by
dma-buf: in fact it's just a shim layer to abstract system memory, that
can be accessed via regular load and store, from IO memory that needs to
be acessed via arch helpers.

The idea is to extend this API so it can fulfill other needs, internal
to a single driver. Example: in the i915 driver it's desired to share
the implementation for integrated graphics, which uses mostly system
memory, with discrete graphics, which may need to access IO memory.

The conversion was mostly done with the following semantic patch:

	@r1@
	@@
	- struct dma_buf_map
	+ struct iosys_map

	@r2@
	@@
	(
	- DMA_BUF_MAP_INIT_VADDR
	+ IOSYS_MAP_INIT_VADDR
	|
	- dma_buf_map_set_vaddr
	+ iosys_map_set_vaddr
	|
	- dma_buf_map_set_vaddr_iomem
	+ iosys_map_set_vaddr_iomem
	|
	- dma_buf_map_is_equal
	+ iosys_map_is_equal
	|
	- dma_buf_map_is_null
	+ iosys_map_is_null
	|
	- dma_buf_map_is_set
	+ iosys_map_is_set
	|
	- dma_buf_map_clear
	+ iosys_map_clear
	|
	- dma_buf_map_memcpy_to
	+ iosys_map_memcpy_to
	|
	- dma_buf_map_incr
	+ iosys_map_incr
	)

	@@
	@@
	- #include &lt;linux/dma-buf-map.h&gt;
	+ #include &lt;linux/iosys-map.h&gt;

Then some files had their includes adjusted and some comments were
update to remove mentions to dma-buf-map.

Since this is not specific to dma-buf anymore, move the documentation to
the "Bus-Independent Device Accesses" section.

v2:
  - Squash patches

v3:
  - Fix wrong removal of dma-buf.h from MAINTAINERS
  - Move documentation from dma-buf.rst to device-io.rst

v4:
  - Change documentation title and level

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@intel.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220204170541.829227-1-lucas.demarchi@intel.com
</content>
</entry>
<entry>
<title>dma-buf: cma_heap: Fix mutex locking section</title>
<updated>2022-01-13T11:05:21Z</updated>
<author>
<name>Weizhao Ouyang</name>
<email>o451686892@gmail.com</email>
</author>
<published>2022-01-04T07:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=54329e6f7beea6af56c1230da293acc97d6a6ee7'/>
<id>urn:sha1:54329e6f7beea6af56c1230da293acc97d6a6ee7</id>
<content type='text'>
Fix cma_heap_buffer mutex locking critical section to protect vmap_cnt
and vaddr.

Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation")
Signed-off-by: Weizhao Ouyang &lt;o451686892@gmail.com&gt;
Acked-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220104073545.124244-1-o451686892@gmail.com
</content>
</entry>
<entry>
<title>dma-buf: system_heap: Use 'for_each_sgtable_sg' in pages free flow</title>
<updated>2021-12-01T10:00:10Z</updated>
<author>
<name>Guangming</name>
<email>Guangming.Cao@mediatek.com</email>
</author>
<published>2021-11-26T07:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=679d94cd7d900871e5bc9cf780bd5b73af35ab42'/>
<id>urn:sha1:679d94cd7d900871e5bc9cf780bd5b73af35ab42</id>
<content type='text'>
For previous version, it uses 'sg_table.nent's to traverse sg_table in pages
free flow.
However, 'sg_table.nents' is reassigned in 'dma_map_sg', it means the number of
created entries in the DMA adderess space.
So, use 'sg_table.nents' in pages free flow will case some pages can't be freed.

Here we should use sg_table.orig_nents to free pages memory, but use the
sgtable helper 'for each_sgtable_sg'(, instead of the previous rather common
helper 'for_each_sg' which maybe cause memory leak) is much better.

Fixes: d963ab0f15fb0 ("dma-buf: system_heap: Allocate higher order pages if available")
Signed-off-by: Guangming &lt;Guangming.Cao@mediatek.com&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 5.11.*
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20211126074904.88388-1-guangming.cao@mediatek.com
</content>
</entry>
<entry>
<title>dma-buf: system_heap: Avoid warning on mid-order allocations</title>
<updated>2021-09-14T14:55:46Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2021-09-09T02:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5ad2d11feafbb9a51291754c66b35e450ac6ee59'/>
<id>urn:sha1:5ad2d11feafbb9a51291754c66b35e450ac6ee59</id>
<content type='text'>
When trying to do mid-order allocations, set __GFP_NOWARN to
avoid warning messages if the allocation fails, as we will
still fall back to single page allocatitions in that case.
This is the similar to what we already do for large order
allocations.

Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Christian Koenig &lt;christian.koenig@amd.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Liam Mark &lt;lmark@codeaurora.org&gt;
Cc: Chris Goldsworthy &lt;cgoldswo@codeaurora.org&gt;
Cc: Laura Abbott &lt;labbott@kernel.org&gt;
Cc: Brian Starkey &lt;Brian.Starkey@arm.com&gt;
Cc: Hridya Valsaraju &lt;hridya@google.com&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Sandeep Patil &lt;sspatil@google.com&gt;
Cc: Daniel Mentz &lt;danielmentz@google.com&gt;
Cc: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Cc: Simon Ser &lt;contact@emersion.fr&gt;
Cc: James Jones &lt;jajones@nvidia.com&gt;
Cc: Leo Yan &lt;leo.yan@linaro.org&gt;
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210909023741.2592429-1-john.stultz@linaro.org
</content>
</entry>
<entry>
<title>Merge tag 'drm-misc-next-2021-03-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next</title>
<updated>2021-03-16T07:08:46Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2021-03-16T06:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=51c3b916a4d7e24b4918925965867fdd9bd8dd59'/>
<id>urn:sha1:51c3b916a4d7e24b4918925965867fdd9bd8dd59</id>
<content type='text'>
drm-misc-next for 5.13:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
  - %p4cc printk format modifier
  - atomic: introduce drm_crtc_commit_wait, rework atomic plane state
    helpers to take the drm_commit_state structure
  - dma-buf: heaps rework to return a struct dma_buf
  - simple-kms: Add plate state helpers
  - ttm: debugfs support, removal of sysfs

Driver Changes:
  - Convert drivers to shadow plane helpers
  - arc: Move to drm/tiny
  - ast: cursor plane reworks
  - gma500: Remove TTM and medfield support
  - mxsfb: imx8mm support
  - panfrost: MMU IRQ handling rework
  - qxl: rework to better handle resources deallocation, locking
  - sun4i: Add alpha properties for UI and VI layers
  - vc4: RPi4 CEC support
  - vmwgfx: doc cleanup

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;

From: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210303100600.dgnkadonzuvfnu22@gilmour
</content>
</entry>
<entry>
<title>dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name</title>
<updated>2021-02-25T12:58:24Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2021-02-09T19:48:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2eebbdbaab5fcde967c76892bf568a701c62e1d7'/>
<id>urn:sha1:2eebbdbaab5fcde967c76892bf568a701c62e1d7</id>
<content type='text'>
By default dma_buf_export() sets the exporter name to be
KBUILD_MODNAME. Unfortunately this may not be identical to the
string used as the heap name (ie: "system" vs "system_heap").

This can cause some minor confusion with tooling, and there is
the future potential where multiple heap types may be exported
by the same module (but would all have the same name).

So to avoid all this, set the exporter exp_name to the heap name.

Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Liam Mark &lt;lmark@codeaurora.org&gt;
Cc: Chris Goldsworthy &lt;cgoldswo@codeaurora.org&gt;
Cc: Laura Abbott &lt;labbott@kernel.org&gt;
Cc: Brian Starkey &lt;Brian.Starkey@arm.com&gt;
Cc: Hridya Valsaraju &lt;hridya@google.com&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Sandeep Patil &lt;sspatil@google.com&gt;
Cc: Daniel Mentz &lt;danielmentz@google.com&gt;
Cc: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Cc: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Cc: Simon Ser &lt;contact@emersion.fr&gt;
Cc: James Jones &lt;jajones@nvidia.com&gt;
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210209194818.2459062-2-john.stultz@linaro.org
</content>
</entry>
<entry>
<title>dma-buf: heaps: Rework heap allocation hooks to return struct dma_buf instead of fd</title>
<updated>2021-02-24T15:34:54Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2021-01-19T20:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=abf4451b340b09f797c87341b3010f95af9215c0'/>
<id>urn:sha1:abf4451b340b09f797c87341b3010f95af9215c0</id>
<content type='text'>
Every heap needs to create a dmabuf and then export it to a fd
via dma_buf_fd(), so to consolidate things a bit, have the heaps
just return a struct dmabuf * and let the top level
dma_heap_buffer_alloc() call handle creating the fd via
dma_buf_fd().

Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Liam Mark &lt;lmark@codeaurora.org&gt;
Cc: Laura Abbott &lt;labbott@kernel.org&gt;
Cc: Brian Starkey &lt;Brian.Starkey@arm.com&gt;
Cc: Hridya Valsaraju &lt;hridya@google.com&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Sandeep Patil &lt;sspatil@google.com&gt;
Cc: Daniel Mentz &lt;danielmentz@google.com&gt;
Cc: Chris Goldsworthy &lt;cgoldswo@codeaurora.org&gt;
Cc: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Cc: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Cc: Simon Ser &lt;contact@emersion.fr&gt;
Cc: James Jones &lt;jajones@nvidia.com&gt;
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
 [sumits: minor reword of commit message]

Link: https://patchwork.freedesktop.org/patch/msgid/20210119204508.9256-3-john.stultz@linaro.org
(cherry picked from commit c7f59e3dd60313071a989227dcb69094f499d310)
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: system_heap: Make sure to return an error if we abort</title>
<updated>2021-02-24T15:34:25Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2021-01-19T20:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cc84a8e65d87990ebb09f65a745b38e95b4d2721'/>
<id>urn:sha1:cc84a8e65d87990ebb09f65a745b38e95b4d2721</id>
<content type='text'>
If we abort from the allocation due to a fatal_signal_pending(),
be sure we report an error so any return code paths don't trip
over the fact that the allocation didn't succeed.

Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Liam Mark &lt;lmark@codeaurora.org&gt;
Cc: Laura Abbott &lt;labbott@kernel.org&gt;
Cc: Brian Starkey &lt;Brian.Starkey@arm.com&gt;
Cc: Hridya Valsaraju &lt;hridya@google.com&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Sandeep Patil &lt;sspatil@google.com&gt;
Cc: Daniel Mentz &lt;danielmentz@google.com&gt;
Cc: Chris Goldsworthy &lt;cgoldswo@codeaurora.org&gt;
Cc: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Cc: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Cc: Simon Ser &lt;contact@emersion.fr&gt;
Cc: James Jones &lt;jajones@nvidia.com&gt;
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Suggested-by: Suren Baghdasaryan &lt;surenb@google.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210119204508.9256-1-john.stultz@linaro.org
(cherry picked from commit 14a117252f57839bdf0123a1c888a96102e3a843)
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: heaps: Rework heap allocation hooks to return struct dma_buf instead of fd</title>
<updated>2021-01-22T08:04:39Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2021-01-19T20:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c7f59e3dd60313071a989227dcb69094f499d310'/>
<id>urn:sha1:c7f59e3dd60313071a989227dcb69094f499d310</id>
<content type='text'>
Every heap needs to create a dmabuf and then export it to a fd
via dma_buf_fd(), so to consolidate things a bit, have the heaps
just return a struct dmabuf * and let the top level
dma_heap_buffer_alloc() call handle creating the fd via
dma_buf_fd().

Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Liam Mark &lt;lmark@codeaurora.org&gt;
Cc: Laura Abbott &lt;labbott@kernel.org&gt;
Cc: Brian Starkey &lt;Brian.Starkey@arm.com&gt;
Cc: Hridya Valsaraju &lt;hridya@google.com&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Sandeep Patil &lt;sspatil@google.com&gt;
Cc: Daniel Mentz &lt;danielmentz@google.com&gt;
Cc: Chris Goldsworthy &lt;cgoldswo@codeaurora.org&gt;
Cc: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Cc: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Cc: Simon Ser &lt;contact@emersion.fr&gt;
Cc: James Jones &lt;jajones@nvidia.com&gt;
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
 [sumits: minor reword of commit message]

Link: https://patchwork.freedesktop.org/patch/msgid/20210119204508.9256-3-john.stultz@linaro.org
</content>
</entry>
</feed>
