]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/ast: Fix black screen after resume
authorJammy Huang <jammy_huang@aspeedtech.com>
Thu, 18 Jul 2024 03:03:52 +0000 (11:03 +0800)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 19 Jul 2024 07:09:17 +0000 (09:09 +0200)
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.

v2:
- fix function-call arguments

Fixes: 5b71707dd13c ("drm/ast: Enable and unlock device access early during init")
Reported-by: Cary Garrett <cogarre@gmail.com>
Closes: https://lore.kernel.org/dri-devel/8ce1e1cc351153a890b65e62fed93b54ccd43f6a.camel@gmail.com/
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.6+
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240718030352.654155-1-jammy_huang@aspeedtech.com
drivers/gpu/drm/ast/ast_drv.c

index f8c49ba68e78997db2123b595d750221e7f3e27d..af2368f6f00f45f9ef7622faec2797f120f92739 100644 (file)
@@ -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(ast->ioregs);
+       ast_open_key(ast->ioregs);
+       ast_enable_mmio(dev->dev, ast->ioregs);
        ast_post_gpu(dev);
 
        return drm_mode_config_helper_resume(dev);