* [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast updates
@ 2020-06-29 20:49 Nicholas Kazlauskas
2020-06-29 21:58 ` Alex Deucher
2020-06-30 15:26 ` Li, Roman
0 siblings, 2 replies; 3+ messages in thread
From: Nicholas Kazlauskas @ 2020-06-29 20:49 UTC (permalink / raw)
To: amd-gfx
Cc: Bhawanpreet Lakha, Rodrigo Siqueira, Hersen Wu, Nicholas Kazlauskas
[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: e1995f0909e3 ("drm/amd/display: Revalidate bandwidth before commiting DC updates")
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
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 67402d75e67e..942ceb0f6383 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2607,10 +2607,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(
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast updates
2020-06-29 20:49 [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast updates Nicholas Kazlauskas
@ 2020-06-29 21:58 ` Alex Deucher
2020-06-30 15:26 ` Li, Roman
1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2020-06-29 21:58 UTC (permalink / raw)
To: Nicholas Kazlauskas
Cc: Hersen Wu, Rodrigo Siqueira, Bhawanpreet Lakha, amd-gfx list
On Mon, Jun 29, 2020 at 4:49 PM Nicholas Kazlauskas
<nicholas.kazlauskas@amd.com> wrote:
>
> [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: e1995f0909e3 ("drm/amd/display: Revalidate bandwidth before commiting DC updates")
> Cc: Hersen Wu <hersenxs.wu@amd.com>
> Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> 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 67402d75e67e..942ceb0f6383 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -2607,10 +2607,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(
> --
> 2.25.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast updates
2020-06-29 20:49 [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast updates Nicholas Kazlauskas
2020-06-29 21:58 ` Alex Deucher
@ 2020-06-30 15:26 ` Li, Roman
1 sibling, 0 replies; 3+ messages in thread
From: Li, Roman @ 2020-06-30 15:26 UTC (permalink / raw)
To: Kazlauskas, Nicholas, amd-gfx
Cc: Wu, Hersen, Siqueira, Rodrigo, Lakha, Bhawanpreet, Kazlauskas, Nicholas
[AMD Public Use]
Reviewed-by: Roman Li <Roman.Li@amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Nicholas Kazlauskas
Sent: Monday, June 29, 2020 4:49 PM
To: amd-gfx@lists.freedesktop.org
Cc: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Wu, Hersen <hersenxs.wu@amd.com>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>
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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1191&data=02%7C01%7Croman.li%40amd.com%7Cc98c2d3c363643a4fef208d81c6dfa68%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637290606647861029&sdata=%2B3rZlvLgef1c2FOYTKx37U%2Fbr%2BWOxI9GXVI2K7HjH3E%3D&reserved=0
Fixes: e1995f0909e3 ("drm/amd/display: Revalidate bandwidth before commiting DC updates")
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
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 67402d75e67e..942ceb0f6383 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2607,10 +2607,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(
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Croman.li%40amd.com%7Cc98c2d3c363643a4fef208d81c6dfa68%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637290606647861029&sdata=EPY6DwDOG88a944QieZj%2F8NSeBJTot2z1WLghTM2Iuw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-30 15:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 20:49 [PATCH] drm/amd/display: Only revalidate bandwidth on medium and fast updates Nicholas Kazlauskas
2020-06-29 21:58 ` Alex Deucher
2020-06-30 15:26 ` Li, Roman
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).