firmware/sysfb: Disable sysfb for firmware buffers with unknown parent
Subsystems (2)
Thomas Zimmermann
maintainerPATCH 1/1 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.
--- drivers/firmware/sysfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/firmware/sysfb.c +3 -1
@@ -67,9 +67,11 @@ static bool sysfb_unregister(void)void sysfb_disable (struct device *dev) {struct screen_info *si = &screen_info; +struct device *parent;mutex_lock (&disable_lock); -if (!dev || dev ==sysfb_parent_dev (si)) { + parent =sysfb_parent_dev (si); +if (!dev || !parent || dev == parent) {sysfb_unregister (); disabled = true; }
Signature · 1 line
2.46.0
Quoted 9 lines · Thomas Zimmermann
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.
Quoted 14 lines
Reported-by Borah, Chaitanya Kumar <[email protected]>Closes https://lore.kernel.org/dri-devel/SJ1PR11MB6129EFB8CE63D1EF6D932F94B96F2@SJ1PR11MB6129.namprd11.prod.outlook.com/ open hereSigned-off-by Thomas Zimmermann <[email protected]>Fixes b49420d6a1ae ("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 Linux regression tracking (Thorsten Leemhuis) <[email protected]>Cc <[email protected]> # v6.11+
Thanks for fixing this.
Quoted 24 lines
--- drivers/firmware/sysfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/firmware/sysfb.c +3
-2@@ -67,9 +67,11 @@ static bool sysfb_unregister(void)void sysfb_disable (struct device *dev) {struct screen_info *si = &screen_info; +struct device *parent;mutex_lock (&disable_lock); -if (!dev || dev ==sysfb_parent_dev (si)) { + parent =sysfb_parent_dev (si); +if (!dev || !parent || dev == parent) {sysfb_unregister (); disabled = true; } --2.46.0
Thomas Zimmermann <[email protected]> writes:
Hello Thomas,
Quoted 33 lines
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/ open hereSigned-off-by Thomas Zimmermann <[email protected]>Fixes b49420d6a1ae ("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 Linux regression tracking (Thorsten Leemhuis) <[email protected]>Cc <[email protected]> # v6.11+--- drivers/firmware/sysfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/firmware/sysfb.c +0
-0@@ -67,9 +67,11 @@ static bool sysfb_unregister(void)void sysfb_disable (struct device *dev) {
drivers/firmware/sysfb.c static bool sysfb_unregister(void) · line 77
Quoted 10 lines
drivers/firmware/sysfb.c +3
-1struct screen_info *si = &screen_info; +struct device *parent;mutex_lock (&disable_lock); -if (!dev || dev ==sysfb_parent_dev (si)) { + parent =sysfb_parent_dev (si); +if (!dev || !parent || dev == parent) {sysfb_unregister (); disabled = true; }
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat