archive mirror
 help / color / mirror / Atom feed
From: Kai-Heng Feng <>
Cc:, Kai-Heng Feng <>, (open list:EFIFB FRAMEBUFFER DRIVER), (open list:FRAMEBUFFER LAYER), (open list)
Subject: [RESEND] [PATCH] efifb: Ensure graphics device for efifb stays at PCI D0
Date: Fri, 29 Jan 2021 19:22:12 +0800	[thread overview]
Message-ID: <> (raw)

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 <>
 drivers/video/fbdev/efifb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index e57c00824965..19edd7206409 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -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 */
@@ -575,6 +576,7 @@ static int efifb_probe(struct platform_device *dev)
 		goto err_fb_dealoc;
 	fb_info(info, "%s frame buffer device\n", info->;
+	pm_runtime_get_sync(&efifb_pci_dev->dev);
 	return 0;
@@ -601,6 +603,7 @@ static int efifb_remove(struct platform_device *pdev)
 	sysfs_remove_groups(&pdev->dev.kobj, efifb_groups);
+	pm_runtime_put(&efifb_pci_dev->dev);
 	return 0;

                 reply	other threads:[~2021-01-29 17:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).