mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/ast: Fix black screen after resume
@ 2024-07-18  3:03 Jammy Huang
  2024-07-18  6:50 ` Thomas Zimmermann
  0 siblings, 1 reply; 4+ messages in thread
From: Jammy Huang @ 2024-07-18  3:03 UTC (permalink / raw)
  To: tzimmermann, jfalempe, maarten.lankhorst, mripard, airlied,
	airlied, daniel
  Cc: dri-devel, linux-kernel

Suspend will disable pcie device. Thus, resume should do full hw
initialization again.
Add some APIs to ast_drm_thaw() before ast_post_gpu() to fix the issue.

Fixes: 5b71707dd13 ("drm/ast: Enable and unlock device access early during init")
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
---
 drivers/gpu/drm/ast/ast_drv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index f8c49ba68e78..45a9c7bf49c8 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -391,6 +391,11 @@ static int ast_drm_freeze(struct drm_device *dev)
 
 static int ast_drm_thaw(struct drm_device *dev)
 {
+	struct ast_device *ast = to_ast_device(dev);
+
+	ast_enable_vga(ioregs);
+	ast_open_key(ioregs);
+	ast_enable_mmio(dev, ioregs);
 	ast_post_gpu(dev);
 
 	return drm_mode_config_helper_resume(dev);

base-commit: e9d22f7a6655941fc8b2b942ed354ec780936b3e
prerequisite-patch-id: a03a33902f33bcc38091e2cdce9d79f630464c30
prerequisite-patch-id: 505779a1e2094f2ee2f2a55ad44aac5cd1d5342f
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-19  0:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-18  3:03 [PATCH] drm/ast: Fix black screen after resume Jammy Huang
2024-07-18  6:50 ` Thomas Zimmermann
2024-07-18  8:01   ` Thomas Zimmermann
2024-07-19  0:57     ` Jammy Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®