From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8D9D27F756 for ; Fri, 20 Jun 2025 09:08:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750410533; cv=none; b=MT/1itGhSZQjED22RD0UlGHzlrLc/R2GJ02URh/aJXaksLGgdMLM5W3tp6TYhS37br9ZbkHCHuHI2fcXWRAKKx53iOKx//ZNySrmxFj/37FNTvjAxXOhnOEqVvyKIaNNovYtXvV6oqxaN9lhBb++IoHRbGmDgXjlyv1WHexk9Z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750410533; c=relaxed/simple; bh=dDVmpM/COxsoBz7tDjteiYO2m2l7K0K3ciF8eOD34fk=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Jm5gbXQa43/UukhDwwGcY+i5mC8Yy6og/Cq9kG6GruoiC0h6qypXyGJosIU7aUqhuh6an5u/ZapIVovblwaZRhk3+C+Z8A8v/6UXsjYUwmjAzF7rZJJnzlpPubn/avGELos87Myjf3La2R98XleBmwcnkemNsK1DTodJgxfDU+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WgoV4zrL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WgoV4zrL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD3C3C4CEEE; Fri, 20 Jun 2025 09:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750410533; bh=dDVmpM/COxsoBz7tDjteiYO2m2l7K0K3ciF8eOD34fk=; h=Subject:To:Cc:From:Date:From; b=WgoV4zrL1Eqr9n7Yt6wWn1up3psb9ks0M9R0suGlHX9/eEuwEFOkJx7U7+KcGRjZ3 3UKVZ/uMMCYUT0NTRheOeVn+fjn8l1/JwarRplYIyvF63nZkvDR+uzRdpP771xQKuW L6yXY1ojdUMhHzQcY4VBR7DztomQSSQJet6Q8amM= Subject: FAILED: patch "[PATCH] sysfb: Fix screen_info type check for VGA" failed to apply to 6.1-stable tree To: tzimmermann@suse.de,alexander.deucher@amd.com,deller@gmx.de,javierm@redhat.com,soci@c64.rulez.org,stable@vger.kernel.org,tzungbi@kernel.org,u.kleine-koenig@baylibre.com Cc: From: Date: Fri, 20 Jun 2025 11:08:42 +0200 Message-ID: <2025062042-pummel-upstart-6086@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x f670b50ef5e4a69bf4d2ec5ac6a9228d93b13a7a # git commit -s git send-email --to '' --in-reply-to '2025062042-pummel-upstart-6086@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From f670b50ef5e4a69bf4d2ec5ac6a9228d93b13a7a Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 3 Jun 2025 17:48:20 +0200 Subject: [PATCH] sysfb: Fix screen_info type check for VGA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the helper screen_info_video_type() to get the framebuffer type from struct screen_info. Handle supported values in sorted switch statement. Reading orig_video_isVGA is unreliable. On most systems it is a VIDEO_TYPE_ constant. On some systems with VGA it is simply set to 1 to signal the presence of a VGA output. See vga_probe() for an example. Retrieving the screen_info type with the helper screen_info_video_type() detects these cases and returns the appropriate VIDEO_TYPE_ constant. For VGA, sysfb creates a device named "vga-framebuffer". The sysfb code has been taken from vga16fb, where it likely didn't work correctly either. With this bugfix applied, vga16fb loads for compatible vga-framebuffer devices. Fixes: 0db5b61e0dc0 ("fbdev/vga16fb: Create EGA/VGA devices in sysfb code") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Alex Deucher Cc: Tzung-Bi Shih Cc: Helge Deller Cc: "Uwe Kleine-König" Cc: Zsolt Kajtar Cc: # v6.1+ Signed-off-by: Thomas Zimmermann Reviewed-by: Tzung-Bi Shih Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20250603154838.401882-1-tzimmermann@suse.de diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c index 7c5c03f274b9..889e5b05c739 100644 --- a/drivers/firmware/sysfb.c +++ b/drivers/firmware/sysfb.c @@ -143,6 +143,7 @@ static __init int sysfb_init(void) { struct screen_info *si = &screen_info; struct device *parent; + unsigned int type; struct simplefb_platform_data mode; const char *name; bool compatible; @@ -170,17 +171,26 @@ static __init int sysfb_init(void) goto put_device; } + type = screen_info_video_type(si); + /* if the FB is incompatible, create a legacy framebuffer device */ - if (si->orig_video_isVGA == VIDEO_TYPE_EFI) - name = "efi-framebuffer"; - else if (si->orig_video_isVGA == VIDEO_TYPE_VLFB) - name = "vesa-framebuffer"; - else if (si->orig_video_isVGA == VIDEO_TYPE_VGAC) - name = "vga-framebuffer"; - else if (si->orig_video_isVGA == VIDEO_TYPE_EGAC) + switch (type) { + case VIDEO_TYPE_EGAC: name = "ega-framebuffer"; - else + break; + case VIDEO_TYPE_VGAC: + name = "vga-framebuffer"; + break; + case VIDEO_TYPE_VLFB: + name = "vesa-framebuffer"; + break; + case VIDEO_TYPE_EFI: + name = "efi-framebuffer"; + break; + default: name = "platform-framebuffer"; + break; + } pd = platform_device_alloc(name, 0); if (!pd) {