Skip to content

Commit ad604f0

Browse files
author
Thomas Zimmermann
committed
firmware/sysfb: Disable sysfb for firmware buffers with unknown parent
The sysfb framebuffer handling only operates on graphics devices that provide the system's firmware framebuffer. If that device is not known, assume that any graphics device has been initialized by firmware. Fixes a problem on i915 where sysfb does not release the firmware framebuffer after the native graphics driver loaded. Reported-by: Borah, Chaitanya Kumar <[email protected]> Closes: https://lore.kernel.org/dri-devel/SJ1PR11MB6129EFB8CE63D1EF6D932F94B96F2@SJ1PR11MB6129.namprd11.prod.outlook.com/ Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12160 Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: b49420d ("video/aperture: optionally match the device in sysfb_disable()") Cc: Javier Martinez Canillas <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Helge Deller <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Cc: Linux regression tracking (Thorsten Leemhuis) <[email protected]> Cc: <[email protected]> # v6.11+ Acked-by: Alex Deucher <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 8b0d2f6 commit ad604f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/firmware/sysfb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ static bool sysfb_unregister(void)
6767
void sysfb_disable(struct device *dev)
6868
{
6969
struct screen_info *si = &screen_info;
70+
struct device *parent;
7071

7172
mutex_lock(&disable_lock);
72-
if (!dev || dev == sysfb_parent_dev(si)) {
73+
parent = sysfb_parent_dev(si);
74+
if (!dev || !parent || dev == parent) {
7375
sysfb_unregister();
7476
disabled = true;
7577
}

0 commit comments

Comments
 (0)