<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/drm_fbdev_generic.c, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-03-22T12:32:54Z</updated>
<entry>
<title>drm/fbdev-generic: Rename symbols</title>
<updated>2023-03-22T12:32:54Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-20T15:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:52Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-20T15:07:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:51Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-20T15:07:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>
<entry>
<title>drm/fbdev-generic: Always use shadow buffering</title>
<updated>2023-03-22T12:32:46Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-20T15:07:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5b44c4adb1699661d22e5152fb26885f30a2e4c'/>
<id>urn:sha1:a5b44c4adb1699661d22e5152fb26885f30a2e4c</id>
<content type='text'>
Remove all codepaths that implement fbdev output directly on GEM
buffers. Always allocate a shadow buffer in system memory and set
up deferred I/O for mmap.

The fbdev code that operated directly on GEM buffers was used by
drivers based on GEM DMA helpers. Those drivers have been migrated
to use fbdev-dma, a dedicated fbdev emulation for DMA memory. All
remaining users of fbdev-generic require shadow buffering.

Memory management of the remaining callers uses TTM, GEM SHMEM
helpers or a variant of GEM DMA helpers that is incompatible with
fbdev-dma. Therefore remove the unused codepaths from fbdev-generic
and simplify the code.

Using a shadow buffer with deferred I/O is probably the best case
for most remaining callers. Some of the TTM-based drivers might
benefit from a dedicated fbdev emulation that operates directly on
the driver's video memory.

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-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()</title>
<updated>2023-02-21T12:26:18Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-02-16T14:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fb1f62f80a1d249260db5ea9e22c51e52fab9ae'/>
<id>urn:sha1:3fb1f62f80a1d249260db5ea9e22c51e52fab9ae</id>
<content type='text'>
Move drm_fb_helper_unprepare() from drm_fb_helper_fini() into the
calling fbdev implementation. Avoids a possible stale mutex with
generic fbdev code.

As indicated by its name, drm_fb_helper_prepare() prepares struct
drm_fb_helper before setting up the fbdev support with a call to
drm_fb_helper_init(). In legacy fbdev emulation, this happens next
to each other. If successful, drm_fb_helper_fini() later tear down
the fbdev device and also unprepare via drm_fb_helper_unprepare().

Generic fbdev emulation prepares struct drm_fb_helper immediately
after allocating the instance. It only calls drm_fb_helper_init()
as part of processing a hotplug event. If the hotplug-handling fails,
it runs drm_fb_helper_fini(). This unprepares the fb-helper instance
and the next hotplug event runs on stale data.

Solve this by moving drm_fb_helper_unprepare() from drm_fb_helper_fini()
into the fbdev implementations. Call it right before freeing the
fb-helper instance.

Fixes: 643231b28380 ("drm/fbdev-generic: Minimize hotplug error handling")
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: David Airlie &lt;airlied@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230216140620.17699-1-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>Merge v6.2-rc6 into drm-next</title>
<updated>2023-01-31T11:23:23Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2023-01-31T10:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aebd8f0c6f8280ba35bc989f4a9ea47469d3589a'/>
<id>urn:sha1:aebd8f0c6f8280ba35bc989f4a9ea47469d3589a</id>
<content type='text'>
Due to holidays we started -next with more -fixes in-flight than
usual, and people have been asking where they are. Backmerge to get
things better in sync.

Conflicts:
- Tiny conflict in drm_fbdev_generic.c between variable rename and
  missing error handling that got added.
- Conflict in drm_fb_helper.c between the added call to vgaswitcheroo
  in drm_fb_helper_single_fb_probe and a refactor patch that extracted
  lots of helpers and incidentally removed the dev local variable.
  Readd it to make things compile.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Rename struct fb_info 'fbi' to 'info'</title>
<updated>2023-01-26T07:52:36Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ca80b9e5cc0120c37e2e7dd367b08e3e0eb8289'/>
<id>urn:sha1:6ca80b9e5cc0120c37e2e7dd367b08e3e0eb8289</id>
<content type='text'>
The generic fbdev emulation names variables of type struct fb_info
both 'fbi' and 'info'. The latter seems to be more common in fbdev
code, so name fbi accordingly.

Also replace the duplicate variable in drm_fbdev_fb_destroy().

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/20230125200415.14123-11-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Inline clean-up helpers into drm_fbdev_fb_destroy()</title>
<updated>2023-01-26T07:52:35Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f5fe873968d49aeb9d805235acf57641a691b8f'/>
<id>urn:sha1:7f5fe873968d49aeb9d805235acf57641a691b8f</id>
<content type='text'>
The fbdev framebuffer cleanup in drm_fbdev_fb_destroy() calls
drm_fbdev_release() and drm_fbdev_cleanup(). Inline both into the
caller. No functional changes.

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/20230125200415.14123-10-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Minimize client unregistering</title>
<updated>2023-01-26T07:52:34Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=032116bbe152594f5528683c671a04259e6b4ed7'/>
<id>urn:sha1:032116bbe152594f5528683c671a04259e6b4ed7</id>
<content type='text'>
For uninitialized framebuffers, only release the DRM client and
free the fbdev memory. Do not attempt to clean up the framebuffer.

DRM fbdev clients have a two-step initialization: first create
the DRM client; then create the framebuffer device on the first
successful hotplug event. In cases where the client never creates
the framebuffer, only the client state needs to be released. We
can detect which case it is, full or client-only cleanup, by
looking at the presence of fb_helper's info field.

v3:
	* fix typo in commit message (Javier)
	* release client before unpreparing fbdev
v2:
	* remove test for (fbi != NULL) in drm_fbdev_cleanup() (Sam)

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/20230125200415.14123-9-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Minimize hotplug error handling</title>
<updated>2023-01-26T07:52:33Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=643231b28380c9e9cba11675ef8f480016feaec3'/>
<id>urn:sha1:643231b28380c9e9cba11675ef8f480016feaec3</id>
<content type='text'>
Call drm_fb_helper_fini() in the generic-fbdev hotplug helper
to revert the effects of drm_fb_helper_init(). No full cleanup
is required.

v3:
	* fix error in commit message (Javier)

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/20230125200415.14123-8-tzimmermann@suse.de
</content>
</entry>
</feed>
