<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_fbdev_generic.c, branch v6.12.78</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.78</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.78'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-05-02T09:33:32+00:00</updated>
<entry>
<title>drm/fbdev-generic: Convert to fbdev-ttm</title>
<updated>2024-05-02T09:33:32+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2024-04-19T08:29:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aae4682e5d66c1e1dc181fa341652e037237f144'/>
<id>urn:sha1:aae4682e5d66c1e1dc181fa341652e037237f144</id>
<content type='text'>
Only TTM-based drivers use fbdev-generic. Rename it to fbdev-ttm and
change the symbol infix from _generic_ to _ttm_. Link the source file
into TTM helpers, so that it is only build if TTM-based drivers have
been selected. Select DRM_TTM_HELPER for loongson.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-43-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Do not set physical framebuffer address</title>
<updated>2024-05-02T09:33:11+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2024-04-19T08:28:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73ef0aecba78aa9ebd309b10b6cd17d94e632892'/>
<id>urn:sha1:73ef0aecba78aa9ebd309b10b6cd17d94e632892</id>
<content type='text'>
Framebuffer memory is allocated via vzalloc() from non-contiguous
physical pages. The physical framebuffer start address is therefore
meaningless. Do not set it.

The value is not used within the kernel and only exported to userspace
on dedicated ARM configs. No functional change is expected.

v2:
- refer to vzalloc() in commit message (Javier)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: a5b44c4adb16 ("drm/fbdev-generic: Always use shadow buffering")
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Cc: Zack Rusin &lt;zackr@vmware.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v6.4+
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Zack Rusin &lt;zack.rusin@broadcom.com&gt;
Reviewed-by: Sui Jingfeng &lt;sui.jingfeng@linux.dev&gt;
Tested-by: Sui Jingfeng &lt;sui.jingfeng@linux.dev&gt;
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Fix locking with drm_client_buffer_vmap_local()</title>
<updated>2024-03-11T12:33:50+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2024-02-27T10:14:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b4b0193e83cb987143583e2b4011b35331f429bd'/>
<id>urn:sha1:b4b0193e83cb987143583e2b4011b35331f429bd</id>
<content type='text'>
Temporarily lock the fbdev buffer object during updates to prevent
memory managers from evicting/moving the buffer. Moving a buffer
object while update its content results in undefined behaviour.

Fbdev-generic updates its buffer object from a shadow buffer. Gem-shmem
and gem-dma helpers do not move buffer objects, so they are safe to be
used with fbdev-generic. Gem-vram and qxl are based on TTM, but pin
buffer objects are part of the vmap operation. So both are also safe
to be used with fbdev-generic.

Amdgpu and nouveau do not pin or lock the buffer object during an
update. Their TTM-based memory management could move the buffer object
while the update is ongoing.

The new vmap_local and vunmap_local helpers hold the buffer object's
reservation lock during the buffer update. This prevents moving the
buffer object on all memory managers.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Tested-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt; # virtio-gpu
Acked-by: Zack Rusin &lt;zack.rusin@broadcom.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240227113853.8464-11-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>fbdev: Align deferred I/O with naming of helpers</title>
<updated>2023-07-31T18:07:24+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-07-29T19:26:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=744d35d3436fbeed9131f6ab717aeb3f775b19c4'/>
<id>urn:sha1:744d35d3436fbeed9131f6ab717aeb3f775b19c4</id>
<content type='text'>
Deferred-I/O generator macros generate callbacks for struct fb_ops
that operate on memory ranges in I/O address space or system address
space. Rename the macros to use the _IOMEM_ and _SYSMEM_ infixes of
their underlying helpers. Adapt all users. No functional changes.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Helge Deller &lt;deller@gmx.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230729193157.15446-5-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm: Remove flag FBINFO_DEFAULT from fbdev emulation</title>
<updated>2023-07-24T14:50:38+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-07-15T18:51:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40e324e0d859d7645f9331d10986b2b96aed8e10'/>
<id>urn:sha1:40e324e0d859d7645f9331d10986b2b96aed8e10</id>
<content type='text'>
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by framebuffer_alloc(). So do not set it.

Flags should signal differences from the default values. After cleaning
up all occurrences of FBINFO_DEFAULT, the token will be removed.

v2:
	* fix commit message (Miguel)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Cc: "Pan, Xinhui" &lt;Xinhui.Pan@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/client: Send hotplug event after registering a client</title>
<updated>2023-07-11T12:02:01+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-07-10T09:10:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27655b9bb9f0d9c32b8de8bec649b676898c52d5'/>
<id>urn:sha1:27655b9bb9f0d9c32b8de8bec649b676898c52d5</id>
<content type='text'>
Generate a hotplug event after registering a client to allow the
client to configure its display. Remove the hotplug calls from the
existing clients for fbdev emulation. This change fixes a concurrency
bug between registering a client and receiving events from the DRM
core. The bug is present in the fbdev emulation of all drivers.

The fbdev emulation currently generates a hotplug event before
registering the client to the device. For each new output, the DRM
core sends an additional hotplug event to each registered client.

If the DRM core detects first output between sending the artificial
hotplug and registering the device, the output's hotplug event gets
lost. If this is the first output, the fbdev console display remains
dark. This has been observed with amdgpu and fbdev-generic.

Fix this by adding hotplug generation directly to the client's
register helper drm_client_register(). Registering the client and
receiving events are serialized by struct drm_device.clientlist_mutex.
So an output is either configured by the initial hotplug event, or
the client has already been registered.

The bug was originally added in commit 6e3f17ee73f7 ("drm/fb-helper:
generic: Call drm_client_add() after setup is done"), in which adding
a client and receiving a hotplug event switched order. It was hidden,
as most hardware and drivers have at least on static output configured.
Other drivers didn't use the internal DRM client or still had struct
drm_mode_config_funcs.output_poll_changed set. That callback handled
hotplug events as well. After not setting the callback in amdgpu in
commit 0e3172bac3f4 ("drm/amdgpu: Don't set struct
drm_driver.output_poll_changed"), amdgpu did not show a framebuffer
console if output events got lost. The bug got copy-pasted from
fbdev-generic into the other fbdev emulation.

Reported-by: Moritz Duge &lt;MoritzDuge@kolahilft.de&gt;
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2649
Fixes: 6e3f17ee73f7 ("drm/fb-helper: generic: Call drm_client_add() after setup is done")
Fixes: 8ab59da26bc0 ("drm/fb-helper: Move generic fbdev emulation into separate source file")
Fixes: b79fe9abd58b ("drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers")
Fixes: 63c381552f69 ("drm/armada: Implement fbdev emulation as in-kernel client")
Fixes: 49953b70e7d3 ("drm/exynos: Implement fbdev emulation as in-kernel client")
Fixes: 8f1aaccb04b7 ("drm/gma500: Implement client-based fbdev emulation")
Fixes: 940b869c2f2f ("drm/msm: Implement fbdev emulation as in-kernel client")
Fixes: 9e69bcd88e45 ("drm/omapdrm: Implement fbdev emulation as in-kernel client")
Fixes: e317a69fe891 ("drm/radeon: Implement client-based fbdev emulation")
Fixes: 71ec16f45ef8 ("drm/tegra: Implement fbdev emulation as in-kernel client")
Fixes: 0e3172bac3f4 ("drm/amdgpu: Don't set struct drm_driver.output_poll_changed")
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Moritz Duge &lt;MoritzDuge@kolahilft.de&gt;
Tested-by: Torsten Krah &lt;krah.tm@gmail.com&gt;
Tested-by: Paul Schyska &lt;pschyska@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: David Airlie &lt;airlied@gmail.com&gt;
Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Inki Dae &lt;inki.dae@samsung.com&gt;
Cc: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Cc: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Abhinav Kumar &lt;quic_abhinavk@quicinc.com&gt;
Cc: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Cc: "Pan, Xinhui" &lt;Xinhui.Pan@amd.com&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Mikko Perttunen &lt;mperttunen@nvidia.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: &lt;stable@vger.kernel.org&gt; # v5.2+
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt; # msm
Link: https://patchwork.freedesktop.org/patch/msgid/20230710091029.27503-1-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Implement dedicated fbdev I/O helpers</title>
<updated>2023-06-01T10:41:40+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-05-30T15:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6baad68d4e9e5c4c085045c70b99352d4825e05'/>
<id>urn:sha1:c6baad68d4e9e5c4c085045c70b99352d4825e05</id>
<content type='text'>
Implement dedicated fbdev helpers for framebuffer I/O instead
of using DRM's helpers. Use an fbdev generator macro for
deferred I/O to create the callbacks. Fbdev-generic was the
only caller of the DRM helpers, so remove them from the helper
module.

v4:
	* generate deferred-I/O helpers
	* use initializer macros for fb_ops
v2:
	* use FB_SYS_HELPERS_DEFERRED option

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Reviewed-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230530151228.22979-13-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Rename symbols</title>
<updated>2023-03-22T12:32:54+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-20T15:07:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9c93f4ec737bbc6b6601284df3a14814feb53fe'/>
<id>urn:sha1:b9c93f4ec737bbc6b6601284df3a14814feb53fe</id>
<content type='text'>
Rename symbols to match the style of other fbdev-emulation source
code. No functional changes.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Acked-by: Zack Rusin &lt;zackr@vmware.com&gt;
Tested-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-9-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Clean up after failed probing</title>
<updated>2023-03-22T12:32:52+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-20T15:07:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61b5d0072a88cfd8c5fda31a7c19d105187c8841'/>
<id>urn:sha1:61b5d0072a88cfd8c5fda31a7c19d105187c8841</id>
<content type='text'>
Clean up fbdev and client state if the probe function fails. It
used to leak allocated resources. Also reorder the individual steps
to simplify cleanup.

v2:
	* move screen_size update into separate patches

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Acked-by: Zack Rusin &lt;zackr@vmware.com&gt;
Tested-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-7-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Set screen size to size of GEM buffer</title>
<updated>2023-03-22T12:32:51+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-20T15:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8fbc9af55de0b274745e70118e20e0964e98bb05'/>
<id>urn:sha1:8fbc9af55de0b274745e70118e20e0964e98bb05</id>
<content type='text'>
The size of the screen memory should be equivalent to the size of
the screen's GEM buffer. Don't recalculate the value.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Tested-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-6-tzimmermann@suse.de
</content>
</entry>
</feed>
