aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDavid Francis <David.Francis@amd.com>2018-07-12 10:07:49 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-07-12 10:50:05 -0400
commit8d4235f71513cdccd9dc52b674323c3591552bc1 (patch)
treeb90903bd7ab9ac665ef5711c12285ca4b099d752 /drivers/gpu
parentd89d01f2232b90e8024ae07ff5ab213521875448 (diff)
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 Signed-off-by: David Francis <David.Francis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
index 38ec0d609297..344dd2e69e7c 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -678,9 +678,22 @@ bool dce100_validate_bandwidth(
678 struct dc *dc, 678 struct dc *dc,
679 struct dc_state *context) 679 struct dc_state *context)
680{ 680{
681 /* TODO implement when needed but for now hardcode max value*/ 681 int i;
682 context->bw.dce.dispclk_khz = 681000; 682 bool at_least_one_pipe = false;
683 context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER; 683
684 for (i = 0; i < dc->res_pool->pipe_count; i++) {
685 if (context->res_ctx.pipe_ctx[i].stream)
686 at_least_one_pipe = true;
687 }
688
689 if (at_least_one_pipe) {
690 /* TODO implement when needed but for now hardcode max value*/
691 context->bw.dce.dispclk_khz = 681000;
692 context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER;
693 } else {
694 context->bw.dce.dispclk_khz = 0;
695 context->bw.dce.yclk_khz = 0;
696 }
684 697
685 return true; 698 return true;
686} 699}