Skip to content

Commit a6c0fd3

Browse files
khfengThomas Zimmermann
authored andcommitted
efifb: Ensure graphics device for efifb stays at PCI D0
We are seeing root ports on some desktop boards support D3cold for discrete graphics card. So when efifb is in use while graphics device isn't bound to a driver, PCI and ACPI will put the graphics to D3cold when runtime suspend kicks in, makes efifb stop working. So ensure the graphics device won't be runtime suspended, to keep efifb work all the time. Signed-off-by: Kai-Heng Feng <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c00697b commit a6c0fd3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/video/fbdev/efifb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/platform_device.h>
1717
#include <linux/printk.h>
1818
#include <linux/screen_info.h>
19+
#include <linux/pm_runtime.h>
1920
#include <video/vga.h>
2021
#include <asm/efi.h>
2122
#include <drm/drm_utils.h> /* For drm_get_panel_orientation_quirk */
@@ -574,6 +575,7 @@ static int efifb_probe(struct platform_device *dev)
574575
goto err_fb_dealoc;
575576
}
576577
fb_info(info, "%s frame buffer device\n", info->fix.id);
578+
pm_runtime_get_sync(&efifb_pci_dev->dev);
577579
return 0;
578580

579581
err_fb_dealoc:
@@ -600,6 +602,7 @@ static int efifb_remove(struct platform_device *pdev)
600602
unregister_framebuffer(info);
601603
sysfs_remove_groups(&pdev->dev.kobj, efifb_groups);
602604
framebuffer_release(info);
605+
pm_runtime_put(&efifb_pci_dev->dev);
603606

604607
return 0;
605608
}

0 commit comments

Comments
 (0)