amd/dc/dce100: On dce100, set clocks to 0 on suspend
Subsystems (3)
PATCH 1/1 amd/dc/dce100: On dce100, set clocks to 0 on suspend
[Why]
When a dce100 asic was suspended, the clocks were not set to 0. Upon resume, the new clock was compared to the existing clock, they were found to be the same, and so the clock was not set. This resulted in a pernicious blackscreen.
[How]
In atomic commit, check to see if there are any active pipes. If no, set clocks to 0
--- .../amd/display/dc/dce100/dce100_resource.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +16 -3
@@ -678,9 +678,22 @@ bool dce100_validate_bandwidth(struct dc *dc, struct dc_state *context) { -/* TODO implement when needed but for now hardcode max value*/ - context->bw.dce.dispclk_khz = 681000; - context->bw.dce.yclk_khz =250000 *MEMORY_TYPE_MULTIPLIER ; + int i; +bool at_least_one_pipe = false; + +for (i =0 ; i < dc->res_pool->pipe_count; i++) { +if (context->res_ctx.pipe_ctx[i].stream) + at_least_one_pipe = true; + } + +if (at_least_one_pipe) { +/* TODO implement when needed but for now hardcode max value*/ + context->bw.dce.dispclk_khz =681000 ; + context->bw.dce.yclk_khz =250000 *MEMORY_TYPE_MULTIPLIER ; + }else { + context->bw.dce.dispclk_khz =0 ; + context->bw.dce.yclk_khz =0 ; + }return true; }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 10 lines · David Francis
[Why]
When a dce100 asic was suspended, the clocks were not set to 0. Upon resume, the new clock was compared to the existing clock, they were found to be the same, and so the clock was not set. This resulted in a pernicious blackscreen.[How]
In atomic commit, check to see if there are any active pipes. If no, set clocks to 0
Please add Fixes: tag with link to freedesktop bugzilla bug that this fixes.
I believe the issue is older than 4.18. Can you confirm? If so, please add
Harry
Quoted 26 lines
Signed-off-by David Francis <[email protected]>--- .../amd/display/dc/dce100/dce100_resource.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +9
-3@@ -678,9 +678,22 @@ bool dce100_validate_bandwidth(struct dc *dc, struct dc_state *context) { -/* TODO implement when needed but for now hardcode max value*/ - context->bw.dce.dispclk_khz = 681000; - context->bw.dce.yclk_khz =250000 *MEMORY_TYPE_MULTIPLIER ; + int i; +bool at_least_one_pipe = false; + +for (i =0 ; i < dc->res_pool->pipe_count; i++) { +if (context->res_ctx.pipe_ctx[i].stream) + at_least_one_pipe = true; + } + +if (at_least_one_pipe) {
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c bool dce100_validate_bandwidth( · line 699
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +7
-0+/* TODO implement when needed but for now hardcode max value*/ + context->bw.dce.dispclk_khz =681000 ; + context->bw.dce.yclk_khz =250000 *MEMORY_TYPE_MULTIPLIER ; + }else { + context->bw.dce.dispclk_khz =0 ; + context->bw.dce.yclk_khz =0 ; + }return true; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Harry Wentland
Quoted 6 lines · David Francis
[Why]
When a dce100 asic was suspended, the clocks were not set to 0. Upon resume, the new clock was compared to the existing clock, they were found to be the same, and so the clock was not set. This resulted in a pernicious blackscreen.
Quoted 6 lines
Quoted 4 lines
[How]
In atomic commit, check to see if there are any active pipes. If no, set clocks to 0Please add Fixes: tag with link to freedesktop bugzilla bug that this fixes.
That would be
Bugzilla: https://...
(the Fixes tag is for referencing another commit which is fixed by this one)
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Upon closer inspection, this does not match any FDO bug. The FDO bug I thought this was related to was fixed by Michel Danzer, and this fixes an entirely separate issue.
________________________________
From: Michel Dänzer <[email protected]>
Sent: July 12, 2018 10:18:34 AM
To: Wentland, Harry; Francis, David; [email protected]
Subject: Re: [PATCH] amd/dc/dce100: On dce100, set clocks to 0 on suspend
Quoted 7 lines · Harry Wentland
Quoted 6 lines · David Francis
[Why]
When a dce100 asic was suspended, the clocks were not set to 0. Upon resume, the new clock was compared to the existing clock, they were found to be the same, and so the clock was not set. This resulted in a pernicious blackscreen.
Quoted 6 lines
Quoted 4 lines
[How]
In atomic commit, check to see if there are any active pipes. If no, set clocks to 0Please add Fixes: tag with link to freedesktop bugzilla bug that this fixes.
That would be
Bugzilla: https://...
(the Fixes tag is for referencing another commit which is fixed by this one)
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 2 lines · David
Upon closer inspection, this does not match any FDO bug. The FDO bug I thought this was related to was fixed by Michel Danzer, and this fixes an entirely separate issue.
If I remember right we have a regression change for this. We should add that with the Fixes tag like so
Looks like it's not in any kernel tag yet, so no need to add stable like I previously thought.
Harry
Quoted 19 lines
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*From:* Michel Dänzer <[email protected]>
*Sent:* July 12, 2018 10:18:34 AM
*To:* Wentland, Harry; Francis, David; [email protected] *Subject:* Re: [PATCH] amd/dc/dce100: On dce100, set clocks to 0 on suspendQuoted 12 lines · Harry Wentland
Quoted 10 lines · David Francis
[Why]
When a dce100 asic was suspended, the clocks were not set to 0. Upon resume, the new clock was compared to the existing clock, they were found to be the same, and so the clock was not set. This resulted in a pernicious blackscreen.[How]
In atomic commit, check to see if there are any active pipes. If no, set clocks to 0
Quoted 12 lines
Quoted 1 line
Please add Fixes: tag with link to freedesktop bugzilla bug that this fixes.
That would be
Bugzilla: https://...
(the Fixes tag is for referencing another commit which is fixed by this one)
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx