For both nouveau patches: Reviewed-by: Lyude Paul <[email protected]>
On Tue, 2026-07-07 at 15:38 +0200, 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. > > Also replace the existing reprobe hook with post_switch for symetry. > > 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. > > There are only four drivers that support vga_switcheroo: amdgpu, > radeon, i915 and nouveau. Update each of them with the new callbacks. > When vga_switcheroo now invokes pre_switch, each DRM driver forwards > to aquire_outputs and lets the DRM clients handle the new outputs. > > Tested with radeon on a notebook with Radeon HD 4225 and HD 5430. > > Thomas Zimmermann (10): > 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/amdgpu: Implement struct vga_switcheroo_client_ops.pre_switch > drm/i915: Implement vga_switcheroo_client_ops.pre_switch > drm/nouveau: Implement vga_switcheroo_client_ops.pre_switch > drm/nouveau: Implement vga_switcheroo_client_ops.post_switch > drm/radeon: Implement struct vga_switcheroo_client_ops.pre_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 | 30 +++++++++------- > 12 files changed, 122 insertions(+), 73 deletions(-) > > > base-commit: cd8abe2554ec7eba16c1d48ab508732bf93534eb
