From: sashiko-bot@kernel.org
To: "Thomas Zimmermann" <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 5/7] drm: Implement struct vga_switcheroo_client_ops.pre_switch
Date: Thu, 09 Jul 2026 09:36:28 +0000 [thread overview]
Message-ID: <20260709093629.4FF0E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709092215.168172-6-tzimmermann@suse.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] `vga_switcheroo_client_fb_set()` and the `fb_info` field in `struct vga_switcheroo_client` are orphaned and remain as dead code.
--
--- Patch [5]: [PATCH v2 5/7] drm: Implement struct vga_switcheroo_client_ops.pre_switch ---
commit d5ba75db20f40c6dde86b90da7c25acad6f23b57
Author: Thomas Zimmermann <tzimmermann@suse.de>
drm: Implement struct vga_switcheroo_client_ops.pre_switch
This commit implements the pre_switch callback for vga_switcheroo in amdgpu,
i915, nouveau, and radeon drivers. It pushes fbcon updates from vga_switcheroo
into DRM's fbdev emulation and removes calls to vga_switcheroo_client_fb_set()
from fbcon to prevent deadlocks.
> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> index 9f5c4c101581d..974c7dcf52514 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
[ ... ]
> @@ -2987,10 +2983,6 @@ static int do_fb_registered(struct fb_info *info)
> }
> }
>
> - /* Set the fb info for vga_switcheroo clients. Does nothing otherwise. */
> - if (info->device && dev_is_pci(info->device))
> - vga_switcheroo_client_fb_set(to_pci_dev(info->device), info);
> -
[Severity: Low]
With the removal of these calls from fbcon, are there any remaining users of
vga_switcheroo_client_fb_set()?
It looks like the exported function in drivers/gpu/vga/vga_switcheroo.c is
now completely unused:
void vga_switcheroo_client_fb_set(struct pci_dev *pdev,
struct fb_info *info)
{
struct vga_switcheroo_client *client;
mutex_lock(&vgasr_mutex);
client = find_client_from_pci(&vgasr_priv.clients, pdev);
if (client)
client->fb_info = info;
mutex_unlock(&vgasr_mutex);
}
EXPORT_SYMBOL(vga_switcheroo_client_fb_set);
Because client->fb_info is never populated, does this also leave dead code
in vga_switchto_stage2() where it checks for the fallback?
#if defined(CONFIG_FB)
else if (new_client->fb_info)
fb_switch_outputs(new_client->fb_info);
#endif
Would it make sense to remove the orphaned vga_switcheroo_client_fb_set()
function, the fb_info field in struct vga_switcheroo_client, and the
unreachable fallback block to complete the cleanup?
> return ret;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709092215.168172-1-tzimmermann@suse.de?part=5
next prev parent reply other threads:[~2026-07-09 9:36 UTC|newest]
Thread overview: 22+ 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 ` Thomas Zimmermann
2026-07-09 9:15 ` [PATCH v2 1/7] drm/edid: Include <linux/fb.h> Thomas Zimmermann
2026-07-09 9:15 ` 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 ` 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:15 ` Thomas Zimmermann
2026-07-09 9:16 ` [PATCH v2 4/7] vga_switcheroo: Add post_switch " Thomas Zimmermann
2026-07-09 9:16 ` Thomas Zimmermann
2026-07-09 9:31 ` sashiko-bot
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 ` Thomas Zimmermann
2026-07-09 9:36 ` sashiko-bot [this message]
2026-07-09 10:38 ` 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 ` Thomas Zimmermann
2026-07-09 9:16 ` [PATCH v2 7/7] vga-switcheroo: Remove unused interfaces Thomas Zimmermann
2026-07-09 9:16 ` Thomas Zimmermann
2026-07-09 9:32 ` sashiko-bot
2026-07-09 11:08 ` ✓ i915.CI.BAT: success for vga_switcheroo, drm: Push fbcon handling into DRM clients (rev2) Patchwork
2026-07-10 6:15 ` ✗ i915.CI.Full: failure " Patchwork
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=20260709093629.4FF0E1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tzimmermann@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.