Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/fb-helper: Set framebuffer for vga-switcheroo clients" failed to apply to 6.1-stable tree

PATCH [email protected] 1 participant 1 message Jan 22, 2023

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Possible dependencies:

d1d5101452ab ("drm/fb-helper: Set framebuffer for vga-switcheroo clients")
8ab59da26bc0 ("drm/fb-helper: Move generic fbdev emulation into separate source file") e7c5c29a9eb1 ("drm/fb-helper: Set flag in struct drm_fb_helper for leaking physical addresses") 7ce19535e9b4 ("drm/fb-helper: Always initialize generic fbdev emulation")
983780918c75 ("drm/fb-helper: Perform all fbdev I/O with the same implementation")
3add5f97734d ("drm/fb-helper: Call fb_sync in I/O functions")
f231af498c29 ("drm/fb-helper: Disconnect damage worker from update logic")
afb0ff78c13c ("drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to use _info postfix") 7fd50bc39d12 ("drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix") 9877d8f6bc37 ("drm/fb_helper: Rename field fbdev to info in struct drm_fb_helper")
2b1966c65b6d ("Merge tag 'drm-misc-next-2022-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From d1d5101452ab04e5a3f010bdd200971d78956e5a Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <[email protected]>
Date: Mon, 16 Jan 2023 12:54:24 +0100
Subject: [PATCH] drm/fb-helper: Set framebuffer for vga-switcheroo clients
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Set the framebuffer info for drivers that support VGA switcheroo. Only affects the amdgpu and nouveau drivers, which use VGA switcheroo and generic fbdev emulation. For other drivers, this does nothing.

This fixes a potential regression in the console code. Both, amdgpu and nouveau, invoked vga_switcheroo_client_fb_set() from their internal fbdev code. But the call got lost when the drivers switched to the generic emulation.

Fixes 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.")
Fixes 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers")
Cc Ben Skeggs <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Lyude Paul <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Evan Quan <[email protected]>
Cc Christian König <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Hawking Zhang <[email protected]>
Cc Likun Gao <[email protected]>
Cc "Christian König" <[email protected]>
Cc Stanley Yang <[email protected]>
Cc "Tianci.Yin" <[email protected]>
Cc Xiaojian Du <[email protected]>
Cc Andrey Grodzovsky <[email protected]>
Cc YiPeng Chai <[email protected]>
Cc Somalapuram Amaranath <[email protected]>
Cc Bokun Zhang <[email protected]>
Cc Guchun Chen <[email protected]>
Cc Hamza Mahfooz <[email protected]>
Cc Aurabindo Pillai <[email protected]>
Cc Mario Limonciello <[email protected]>
Cc Solomon Chiu <[email protected]>
Cc Kai-Heng Feng <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc "Marek Olšák" <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Hans de Goede <[email protected]>
Cc "Ville Syrjälä" <[email protected]>
Cc <[email protected]> # v5.17+
drivers/gpu/drm/drm_fb_helper.c +7 -0
index b3a731b9170a..0d0c26ebab90 100644
@@ -30,7 +30,9 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/console.h>
+#include <linux/pci.h>
 #include <linux/sysrq.h>
+#include <linux/vga_switcheroo.h>
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_drv.h>
@@ -1909,6 +1911,11 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 		return ret;
 
 	strcpy(fb_helper->fb->comm, "[fbcon]");
+
+	/* Set the fb info for vgaswitcheroo clients. Does nothing otherwise. */
+	if (dev_is_pci(dev->dev))
+		vga_switcheroo_client_fb_set(to_pci_dev(dev->dev), fb_helper->info);
+
 	return 0;
 }