mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
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 <kai.heng.feng@canonical.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210129084327.986630-1-kai.heng.feng@canonical.com
This commit is contained in:
parent
c00697b592
commit
a6c0fd3d5a
@ -16,6 +16,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/screen_info.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <video/vga.h>
|
||||
#include <asm/efi.h>
|
||||
#include <drm/drm_utils.h> /* For drm_get_panel_orientation_quirk */
|
||||
@ -574,6 +575,7 @@ static int efifb_probe(struct platform_device *dev)
|
||||
goto err_fb_dealoc;
|
||||
}
|
||||
fb_info(info, "%s frame buffer device\n", info->fix.id);
|
||||
pm_runtime_get_sync(&efifb_pci_dev->dev);
|
||||
return 0;
|
||||
|
||||
err_fb_dealoc:
|
||||
@ -600,6 +602,7 @@ static int efifb_remove(struct platform_device *pdev)
|
||||
unregister_framebuffer(info);
|
||||
sysfs_remove_groups(&pdev->dev.kobj, efifb_groups);
|
||||
framebuffer_release(info);
|
||||
pm_runtime_put(&efifb_pci_dev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user