-
Notifications
You must be signed in to change notification settings - Fork 105
[Deepin-Kernel-SIG] [linux 6.6-y] [Backport] [Aspeed] [wxiat] drm/ast: Fix io access error when resuming from sleep #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Deepin-Kernel-SIG] [linux 6.6-y] [Backport] [Aspeed] [wxiat] drm/ast: Fix io access error when resuming from sleep #603
Conversation
commit 12c35c5 upstream. 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: 5b71707 ("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 [ wxiat: Redefine some APIs to fix compile error. ] Signed-off-by: Zhou Xuemei <zhouxuemei@wxiat.com> [ deepin: Backport - keep out-of-tree, unlikely to merge 6.6.y. ] Signed-off-by: wenlunpeng <wenlunpeng@uniontech.com> Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewer's Guide by SourceryThis pull request addresses an issue where the Aspeed GPU fails to properly resume after a suspend operation. The fix involves re-enabling VGA and MMIO access during the resume sequence within the Sequence diagram for ast_drm_thaw functionsequenceDiagram
participant DRM Device
participant ast_device
DRM Device->>ast_device: ast_drm_thaw()
activate ast_device
ast_device->>DRM Device: ast_enable_vga(dev)
DRM Device->>ast_device: ast_open_key(ast)
DRM Device->>ast_device: ast_enable_mmio(ast)
DRM Device->>DRM Device: ast_post_gpu(dev)
DRM Device->>DRM Device: drm_mode_config_helper_resume(dev)
deactivate ast_device
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Avenger-285714 - I've reviewed your changes - here's some feedback:
Overall Comments:
- It looks like
ast_open_keywas moved to the header file, but it wasn't declaredstatic inlinethere - is that intentional?
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sourcery-ai[bot] The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
4e2dcfe
into
deepin-community:linux-6.6.y
commit 12c35c5 upstream.
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:
Fixes: 5b71707 ("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+
Reviewed-by: Thomas Zimmermann tzimmermann@suse.de
Link: https://patchwork.freedesktop.org/patch/msgid/20240718030352.654155-1-jammy_huang@aspeedtech.com
[ wxiat: Redefine some APIs to fix compile error. ]
[ deepin: Backport - keep out-of-tree, unlikely to merge 6.6.y. ]
Summary by Sourcery
Re-initialize the AST hardware after resuming from sleep. This fix addresses an IO access error that occurs when the PCIe device is disabled during suspend and not properly re-initialized upon resume.
Bug Fixes: