<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_internal.h, branch v6.6.39</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-07-20T10:01:03+00:00</updated>
<entry>
<title>drm/syncobj: add IOCTL to register an eventfd</title>
<updated>2023-07-20T10:01:03+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-07-14T11:13:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7a472297169156252a50d76965eb36b081186e2'/>
<id>urn:sha1:c7a472297169156252a50d76965eb36b081186e2</id>
<content type='text'>
Introduce a new DRM_IOCTL_SYNCOBJ_EVENTFD IOCTL which signals an
eventfd from a syncobj.

This is useful for Wayland compositors to handle wait-before-submit.
Wayland clients can send a timeline point to the compositor
before the point has materialized yet, then compositors can wait
for the point to materialize via this new IOCTL.

The existing DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT IOCTL is not suitable
because it blocks. Compositors want to integrate the wait with
their poll(2)-based event loop.

Requirements for new uAPI:

- User-space patch: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4262
- IGT: https://lists.freedesktop.org/archives/igt-dev/2023-July/057893.html

v2:
- Wait for fence when flags is zero
- Improve documentation (Pekka)
- Rename IOCTL (Christian)
- Fix typo in drm_syncobj_add_eventfd() (Christian)

v3:
- Link user-space + IGT patches
- Add reference from overview docs

v4: fix IOCTL number conflict with GETFB2 (Nicholas Choi, Vitaly Prosyak)

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Cc: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Bas Nieuwenhuizen &lt;bas@basnieuwenhuizen.nl&gt;
Cc: Daniel Stone &lt;daniel@fooishbar.org&gt;
Cc: James Jones &lt;jajones@nvidia.com&gt;
Cc: Austin Shafer &lt;ashafer@nvidia.com&gt;
Cc: Vitaly Prosyak &lt;vprosyak@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230714111257.11940-1-contact@emersion.fr
</content>
</entry>
<entry>
<title>drm: remove dumb_destroy callback</title>
<updated>2023-02-10T11:19:27+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2023-01-26T10:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96a7b60f6ddb2bc966fac800c1dd18876a6e3c3f'/>
<id>urn:sha1:96a7b60f6ddb2bc966fac800c1dd18876a6e3c3f</id>
<content type='text'>
Not used by any driver any more.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230126102814.8722-2-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/debugfs: create debugfs late register functions</title>
<updated>2022-12-22T17:58:55+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2022-12-19T12:06:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dbb23cf57178e1852b53eb544046eb06e3db9b4e'/>
<id>urn:sha1:dbb23cf57178e1852b53eb544046eb06e3db9b4e</id>
<content type='text'>
Although the device-centered debugfs functions can track requests for
the addition of DRM debugfs files at any time and have them added all
at once during drm_dev_register(), they are not able to create debugfs
files for modeset components, as they are registered after the primary
and the render drm_minor are registered.

So, create a drm_debugfs_late_register() function, which is responsible
for dealing with the creation of all the debugfs files for modeset
components at once. Therefore, the functions drm_debugfs_add_file()
and drm_debugfs_add_files() can be used in late_register hooks.

Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-4-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm: Fix potential null-ptr-deref in drm_vblank_destroy_worker()</title>
<updated>2022-11-10T23:49:02+00:00</updated>
<author>
<name>Shang XiaoJing</name>
<email>shangxiaojing@huawei.com</email>
</author>
<published>2022-11-01T07:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4979524f5a2a8210e87fde2f642b0dc060860821'/>
<id>urn:sha1:4979524f5a2a8210e87fde2f642b0dc060860821</id>
<content type='text'>
drm_vblank_init() call drmm_add_action_or_reset() with
drm_vblank_init_release() as action. If __drmm_add_action() failed, will
directly call drm_vblank_init_release() with the vblank whose worker is
NULL. As the resule, a null-ptr-deref will happen in
kthread_destroy_worker(). Add the NULL check before calling
drm_vblank_destroy_worker().

BUG: null-ptr-deref
KASAN: null-ptr-deref in range [0x0000000000000068-0x000000000000006f]
CPU: 5 PID: 961 Comm: modprobe Not tainted 6.0.0-11331-gd465bff130bf-dirty
RIP: 0010:kthread_destroy_worker+0x25/0xb0
  Call Trace:
    &lt;TASK&gt;
    drm_vblank_init_release+0x124/0x220 [drm]
    ? drm_crtc_vblank_restore+0x8b0/0x8b0 [drm]
    __drmm_add_action_or_reset+0x41/0x50 [drm]
    drm_vblank_init+0x282/0x310 [drm]
    vkms_init+0x35f/0x1000 [vkms]
    ? 0xffffffffc4508000
    ? lock_is_held_type+0xd7/0x130
    ? __kmem_cache_alloc_node+0x1c2/0x2b0
    ? lock_is_held_type+0xd7/0x130
    ? 0xffffffffc4508000
    do_one_initcall+0xd0/0x4f0
    ...
    do_syscall_64+0x35/0x80
    entry_SYSCALL_64_after_hwframe+0x46/0xb0

Fixes: 5e6c2b4f9161 ("drm/vblank: Add vblank works")
Signed-off-by: Shang XiaoJing &lt;shangxiaojing@huawei.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221101070716.9189-3-shangxiaojing@huawei.com
</content>
</entry>
<entry>
<title>drm/gem: Fix GEM handle release errors</title>
<updated>2022-08-19T11:38:12+00:00</updated>
<author>
<name>Jeffy Chen</name>
<email>jeffy.chen@rock-chips.com</email>
</author>
<published>2022-08-19T07:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea2aa97ca37a9044ade001aef71dbc06318e8d44'/>
<id>urn:sha1:ea2aa97ca37a9044ade001aef71dbc06318e8d44</id>
<content type='text'>
Currently we are assuming a one to one mapping between dmabuf and
GEM handle when releasing GEM handles.

But that is not always true, since we would create extra handles for the
GEM obj in cases like gem_open() and getfb{,2}().

A similar issue was reported at:
https://lore.kernel.org/all/20211105083308.392156-1-jay.xu@rock-chips.com/

Another problem is that the imported dmabuf might not always have
gem_obj-&gt;dma_buf set, which would cause leaks in
drm_gem_remove_prime_handles().

Let's fix these for now by using handle to find the exact map to remove.

Signed-off-by: Jeffy Chen &lt;jeffy.chen@rock-chips.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220819072834.17888-1-jeffy.chen@rock-chips.com
</content>
</entry>
<entry>
<title>dma-buf-map: Rename to iosys-map</title>
<updated>2022-02-08T00:35:35+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@intel.com</email>
</author>
<published>2022-02-04T17:05:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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>drm: Mark IRQ_BUSID ioctl as legacy</title>
<updated>2021-05-17T19:19:48+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-05-16T19:51:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=644adc3d0ff05f49fae9a7549e27dfd7e9a5afe5'/>
<id>urn:sha1:644adc3d0ff05f49fae9a7549e27dfd7e9a5afe5</id>
<content type='text'>
The functionality is only implemented for legacy drivers. Mark the ioctl
as legacy and move the code behind CONFIG_DRM_LEGACY. If legacy drivers
are disabled, the ioctl call now returns -EINVAL instead of -EOPNOTSUPP.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210516195135.3755-1-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm: Mark PCI AGP helpers as legacy</title>
<updated>2021-05-10T13:46:54+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-05-07T18:57:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6bff2279836ebeb2e8becaf9e30642e4bade0a49'/>
<id>urn:sha1:6bff2279836ebeb2e8becaf9e30642e4bade0a49</id>
<content type='text'>
DRM's AGP helpers for PCI are only required by legacy drivers. Put them
behind CONFIG_DRM_LEGACY and add the _legacy_ infix.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210507185709.22797-4-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/drm_internal.h: Remove repeated struct declaration</title>
<updated>2021-04-08T11:05:38+00:00</updated>
<author>
<name>Wan Jiabing</name>
<email>wanjiabing@vivo.com</email>
</author>
<published>2021-04-01T08:17:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2552fb66ae301f490ea37f64d2cdc5778ae61874'/>
<id>urn:sha1:2552fb66ae301f490ea37f64d2cdc5778ae61874</id>
<content type='text'>
struct drm_gem_object is declared twice. One is declared
at 40th line. The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing &lt;wanjiabing@vivo.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210401081704.1000863-1-wanjiabing@vivo.com
</content>
</entry>
<entry>
<title>drm: Don't export the drm_gem_dumb_destroy() function</title>
<updated>2021-01-05T05:20:25+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2017-09-14T22:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=47f10854ca8958c5bf31c3a3fcd8e2c73ccc9925'/>
<id>urn:sha1:47f10854ca8958c5bf31c3a3fcd8e2c73ccc9925</id>
<content type='text'>
The drm_gem_dumb_destroy() isn't used in drivers, don't export it.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
