linux5.7: add Navi hang fix
This commit is contained in:
parent
8c51b886be
commit
856a8cea75
1 changed files with 51 additions and 0 deletions
|
@ -0,0 +1,51 @@
|
|||
From 6eb3cf2e06d22b2b08e6b0ab48cb9c05a8e1a107 Mon Sep 17 00:00:00 2001
|
||||
From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
|
||||
Date: Mon, 29 Jun 2020 13:03:52 -0400
|
||||
Subject: [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast
|
||||
updates
|
||||
|
||||
[Why]
|
||||
Changes that are fast don't require updating DLG parameters making
|
||||
this call unnecessary. Considering this is an expensive call it should
|
||||
not be done on every flip.
|
||||
|
||||
DML touches clocks, p-state support, DLG params and a few other DC
|
||||
internal flags and these aren't expected during fast. A hang has been
|
||||
reported with this change when called on every flip which suggests that
|
||||
modifying these fields is not recommended behavior on fast updates.
|
||||
|
||||
[How]
|
||||
Guard the validation to only happen if update type isn't FAST.
|
||||
|
||||
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1191
|
||||
Fixes: a24eaa5c51255b ("drm/amd/display: Revalidate bandwidth before commiting DC updates")
|
||||
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
|
||||
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Reviewed-by: Roman Li <Roman.Li@amd.com>
|
||||
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
|
||||
index 6f93a6ca4cf0c..d016f50e187c8 100644
|
||||
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
|
||||
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
|
||||
@@ -2538,10 +2538,12 @@ void dc_commit_updates_for_stream(struct dc *dc,
|
||||
|
||||
copy_stream_update_to_stream(dc, context, stream, stream_update);
|
||||
|
||||
- if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
|
||||
- DC_ERROR("Mode validation failed for stream update!\n");
|
||||
- dc_release_state(context);
|
||||
- return;
|
||||
+ if (update_type > UPDATE_TYPE_FAST) {
|
||||
+ if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
|
||||
+ DC_ERROR("Mode validation failed for stream update!\n");
|
||||
+ dc_release_state(context);
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
commit_planes_for_stream(
|
Loading…
Reference in a new issue