<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/drm_fbdev_generic.c, branch v6.3</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.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-02-21T12:26:18Z</updated>
<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>
<entry>
<title>drm/fb-helper: Initialize fb-helper's preferred BPP in prepare function</title>
<updated>2023-01-26T07:52:31Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c80a93be62d398e1854d95069340b2e60f96166'/>
<id>urn:sha1:6c80a93be62d398e1854d95069340b2e60f96166</id>
<content type='text'>
Initialize the fb-helper's preferred_bpp field early from within
drm_fb_helper_prepare(); instead of the later client hot-plugging
callback. This simplifies the generic fbdev setup function.

No real changes, but all drivers' fbdev code has to be adapted.

v3:
	* build with CONFIG_DRM_FBDEV_EMULATION unset (kernel test bot)

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-7-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fbdev-generic: Initialize fb-helper structure in generic setup</title>
<updated>2023-01-26T07:52:29Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f73ab51bfd3ac6b4d2b9d0bbbef3e0cc57a0f079'/>
<id>urn:sha1:f73ab51bfd3ac6b4d2b9d0bbbef3e0cc57a0f079</id>
<content type='text'>
Initialize the fb-helper structure immediately after its allocation
in drm_fbdev_generic_setup(). That will make it easier to fill it with
driver-specific values, such as the preferred BPP.

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-5-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/client: Add hotplug_failed flag</title>
<updated>2023-01-26T07:52:26Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a9d5ad3af65a1e7af97f25bbf83ce97bcfbab72'/>
<id>urn:sha1:6a9d5ad3af65a1e7af97f25bbf83ce97bcfbab72</id>
<content type='text'>
Signal failed hotplugging with a flag in struct drm_client_dev. If set,
the client helpers will not further try to set up the fbdev display.

This used to be signalled with a combination of cleared pointers in
struct drm_fb_helper, which prevents us from initializing these pointers
early after allocation.

The change also harmonizes behavior among DRM clients. Additional DRM
clients will now handle failed hotplugging like fbdev does.

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-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/client: Test for connectors before sending hotplug event</title>
<updated>2023-01-26T07:52:25Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-25T20:04:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2bb3be64eb7182285846123219230375af61abd'/>
<id>urn:sha1:c2bb3be64eb7182285846123219230375af61abd</id>
<content type='text'>
Test for connectors in the client code and remove a similar test
from the generic fbdev emulation. Do nothing if the test fails.
Not having connectors indicates a driver bug.

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