From: Thomas Zimmermann <tzimmermann@suse.de>
To: Helge Deller <deller@gmx.de>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 0/7] vga_switcheroo, drm: Push fbcon handling into DRM clients
Date: Mon, 20 Jul 2026 13:58:29 +0200 [thread overview]
Message-ID: <345d7f81-e86e-48ef-af23-277dc0ae16d1@suse.de> (raw)
In-Reply-To: <88fa0f85-0960-464a-a602-f797785f0c2e@gmx.de>
Hi
Am 18.07.26 um 21:08 schrieb Helge Deller:
> Hi Thomas,
>
> On 7/9/26 11:15, Thomas Zimmermann wrote:
>> Vga_switcheroo currently invokes fb_switch_outputs() to inform fbcon
>> about switching of the physical outputs among framebuffer devices. But
>> new DRM clients to not use fbdev/fbcon and might require their own
>> vga_switcheroo support. Let's strictly separate them from each other.
>>
>> Remove fbdev/fbcon from vga_switcheroo. Introduce a pre_switch callback
>> for vga_switcheroo clients to do the fbcon update. Allows for removing
>> all direct interactions between vga_switcheroo and fbdev/fbcon.
>>
>> There are only four drivers that support vga_switcheroo: amdgpu,
>> radeon, i915 and nouveau. Update each of them with the new callback.
>> When vga_switcheroo now invokes pre_switch, each DRM driver forwards
>> to aquire_outputs and lets the DRM clients handle the new outputs.
>>
>> At the same time, push the fbcon update into DRM's client for fbdev
>> emulation. Do this with the new DRM client callback acquire_outputs,
>> so that other clients can have their own handling of vga_switcheroo.
>>
>> Also replace the existing reprobe hook with post_switch for symetry.
>> For nouveau, this is merely a rename of the helper function. The other
>> drivers dor not implement reprobe.
>>
>> Tested with radeon on a notebook with Radeon HD 4225 and HD 5430.
>>
>> v2:
>> - implement all of pre_switch in a single commit to avoid possible
>> deadlock in intermediate state (Sashiko)
>> - fix erroneous docs (Sashiko)
>>
>> Thomas Zimmermann (7):
>> drm/edid: Include <linux/fb.h>
>> drm/client: Add acquire_outputs callback; implement for fbdev
>> emulation
>> vga_switcheroo: Add pre_switch callback to client ops
>> vga_switcheroo: Add post_switch callback to client ops
>> drm: Implement struct vga_switcheroo_client_ops.pre_switch
>> drm: Implement vga_switcheroo_client_ops.post_switch
>> vga-switcheroo: Remove unused interfaces
>>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++++-
>> drivers/gpu/drm/clients/drm_fbdev_client.c | 23 ++++++++----
>> drivers/gpu/drm/drm_client_event.c | 18 ++++++++++
>> drivers/gpu/drm/drm_edid.c | 1 +
>> drivers/gpu/drm/i915/i915_switcheroo.c | 11 +++++-
>> drivers/gpu/drm/nouveau/nouveau_vga.c | 28 +++++++++------
>> drivers/gpu/drm/radeon/radeon_device.c | 9 ++++-
>> drivers/gpu/vga/vga_switcheroo.c | 41 +++++-----------------
>> drivers/video/fbdev/core/fbcon.c | 8 -----
>> include/drm/drm_client.h | 14 ++++++++
>> include/drm/drm_client_event.h | 3 ++
>> include/linux/vga_switcheroo.h | 29 ++++++++-------
>> 12 files changed, 121 insertions(+), 73 deletions(-)
> You may add a
> Acked-by: Helge Deller <deller@gmx.de>
> to the series.
Thank you so much.
>
> Just in case you want me to take the series through the fbdev git tree,
> please let me know.
The series is supposed to go though DRM trees. I'm still waiting for
reviews from the rsp devs.
Best regards
Thomas
>
> Helge
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
prev parent reply other threads:[~2026-07-20 11:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 9:15 [PATCH v2 0/7] vga_switcheroo, drm: Push fbcon handling into DRM clients Thomas Zimmermann
2026-07-09 9:15 ` [PATCH v2 1/7] drm/edid: Include <linux/fb.h> Thomas Zimmermann
2026-07-09 9:15 ` [PATCH v2 2/7] drm/client: Add acquire_outputs callback; implement for fbdev emulation Thomas Zimmermann
2026-07-09 9:15 ` [PATCH v2 3/7] vga_switcheroo: Add pre_switch callback to client ops Thomas Zimmermann
2026-07-09 9:16 ` [PATCH v2 4/7] vga_switcheroo: Add post_switch " Thomas Zimmermann
2026-07-09 9:16 ` [PATCH v2 5/7] drm: Implement struct vga_switcheroo_client_ops.pre_switch Thomas Zimmermann
2026-07-09 9:16 ` [PATCH v2 6/7] drm: Implement vga_switcheroo_client_ops.post_switch Thomas Zimmermann
2026-07-09 9:16 ` [PATCH v2 7/7] vga-switcheroo: Remove unused interfaces Thomas Zimmermann
2026-07-18 19:08 ` [PATCH v2 0/7] vga_switcheroo, drm: Push fbcon handling into DRM clients Helge Deller
2026-07-20 11:58 ` Thomas Zimmermann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=345d7f81-e86e-48ef-af23-277dc0ae16d1@suse.de \
--to=tzimmermann@suse.de \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox