Attached is the revert commit that works for me. Tested with Radeon 6800 and Radeon 7900XTX. Marek Marek On Wed, Jun 19, 2024 at 9:50 AM Thomas Zimmermann <tzimmermann@xxxxxxx> wrote: > > Hi > > Am 13.06.24 um 07:59 schrieb Marek Olšák: > > Hi Thomas, > > > > Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title > > breaks (crashes?) lightdm (login screen) such that all I get is the > > terminal. It's also reproducible with tag v6.9 where the commit is > > present. > > I was able to reproduce the problem with Ubutu 22.04 and later under > qemu plus qxl, sort of. I login via gdm3 and then the quest machine > switches off entirely. > > > > > Reverting the commit fixes lightdm. A workaround is to bypass lightdm > > by triggering auto-login. This is a bug report. > > The problem is that reverting the commit doesn't fix the issue for me. > I'll try to do my own bisecting. > > Best regards > Thomas > > > > > (For AMD folks: It's also reproducible with amd-staging-drm-next.) > > > > Marek > > -- > -- > Thomas Zimmermann > Graphics Driver Developer > SUSE Software Solutions Germany GmbH > Frankenstrasse 146, 90461 Nuernberg, Germany > GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman > HRB 36809 (AG Nuernberg) >
From 2431978beb04ea4f3befe8d6e0aa89e7207f1b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <marek.olsak@amd.com> Date: Thu, 13 Jun 2024 01:32:35 -0400 Subject: [PATCH] Revert "firmware/sysfb: Set firmware-framebuffer parent device" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9eac534db0013aff9b9124985dab114600df9081. Signed-off-by: Marek Olšák <marek.olsak@amd.com> --- drivers/firmware/sysfb.c | 51 +------------------------------ drivers/firmware/sysfb_simplefb.c | 5 +-- include/linux/sysfb.h | 6 ++-- 3 files changed, 4 insertions(+), 58 deletions(-) diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c index 880ffcb50088..defd7a36cb08 100644 --- a/drivers/firmware/sysfb.c +++ b/drivers/firmware/sysfb.c @@ -29,7 +29,6 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/mm.h> -#include <linux/pci.h> #include <linux/platform_data/simplefb.h> #include <linux/platform_device.h> #include <linux/screen_info.h> @@ -70,49 +69,9 @@ void sysfb_disable(void) } EXPORT_SYMBOL_GPL(sysfb_disable); -#if defined(CONFIG_PCI) -static __init bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev) -{ - /* - * TODO: Try to integrate this code into the PCI subsystem - */ - int ret; - u16 command; - - ret = pci_read_config_word(pdev, PCI_COMMAND, &command); - if (ret != PCIBIOS_SUCCESSFUL) - return false; - if (!(command & PCI_COMMAND_MEMORY)) - return false; - return true; -} -#else -static __init bool sysfb_pci_dev_is_enabled(struct pci_dev *pdev) -{ - return false; -} -#endif - -static __init struct device *sysfb_parent_dev(const struct screen_info *si) -{ - struct pci_dev *pdev; - - pdev = screen_info_pci_dev(si); - if (IS_ERR(pdev)) { - return ERR_CAST(pdev); - } else if (pdev) { - if (!sysfb_pci_dev_is_enabled(pdev)) - return ERR_PTR(-ENODEV); - return &pdev->dev; - } - - return NULL; -} - static __init int sysfb_init(void) { struct screen_info *si = &screen_info; - struct device *parent; struct simplefb_platform_data mode; const char *name; bool compatible; @@ -126,16 +85,10 @@ static __init int sysfb_init(void) sysfb_apply_efi_quirks(); - parent = sysfb_parent_dev(si); - if (IS_ERR(parent)) { - ret = PTR_ERR(parent); - goto unlock_mutex; - } - /* try to create a simple-framebuffer device */ compatible = sysfb_parse_mode(si, &mode); if (compatible) { - pd = sysfb_create_simplefb(si, &mode, parent); + pd = sysfb_create_simplefb(si, &mode); if (!IS_ERR(pd)) goto unlock_mutex; } @@ -158,8 +111,6 @@ static __init int sysfb_init(void) goto unlock_mutex; } - pd->dev.parent = parent; - sysfb_set_efifb_fwnode(pd); ret = platform_device_add_data(pd, si, sizeof(*si)); diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c index 75a186bf8f8e..74363ed7501f 100644 --- a/drivers/firmware/sysfb_simplefb.c +++ b/drivers/firmware/sysfb_simplefb.c @@ -91,8 +91,7 @@ __init bool sysfb_parse_mode(const struct screen_info *si, } __init struct platform_device *sysfb_create_simplefb(const struct screen_info *si, - const struct simplefb_platform_data *mode, - struct device *parent) + const struct simplefb_platform_data *mode) { struct platform_device *pd; struct resource res; @@ -144,8 +143,6 @@ __init struct platform_device *sysfb_create_simplefb(const struct screen_info *s if (!pd) return ERR_PTR(-ENOMEM); - pd->dev.parent = parent; - sysfb_set_efifb_fwnode(pd); ret = platform_device_add_resources(pd, &res, 1); diff --git a/include/linux/sysfb.h b/include/linux/sysfb.h index c9cb657dad08..19cb803dd5ec 100644 --- a/include/linux/sysfb.h +++ b/include/linux/sysfb.h @@ -91,8 +91,7 @@ static inline void sysfb_set_efifb_fwnode(struct platform_device *pd) bool sysfb_parse_mode(const struct screen_info *si, struct simplefb_platform_data *mode); struct platform_device *sysfb_create_simplefb(const struct screen_info *si, - const struct simplefb_platform_data *mode, - struct device *parent); + const struct simplefb_platform_data *mode); #else /* CONFIG_SYSFB_SIMPLE */ @@ -103,8 +102,7 @@ static inline bool sysfb_parse_mode(const struct screen_info *si, } static inline struct platform_device *sysfb_create_simplefb(const struct screen_info *si, - const struct simplefb_platform_data *mode, - struct device *parent) + const struct simplefb_platform_data *mode) { return ERR_PTR(-EINVAL); } -- 2.34.1