summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
diff options
context:
space:
mode:
authorJoshua Aberback <joshua.aberback@amd.com>2019-04-01 15:18:29 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-22 09:34:09 -0500
commit254eb07cb090374d0e1e90790395ead77f6f6ad5 (patch)
treee8e3e08e14a735329d80aa93460f216867678711 /drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
parent776c1f569f94e39a1776c22f29137661f294ff03 (diff)
drm/amd/display: Optimize bandwidth validation by adding early return
We can split validation into three parts: getting voltage level, getting watermarks, and rq/dlg calculations. The voltage level is enough to answer the question "do we support this state", and the rest of it is to determine what hardware programming is needed to support the state. Most of the calls to validate_bandwidth only care about the first part, so we added an early return in that case Signed-off-by: Joshua Aberback <joshua.aberback@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 542f144f807f..dc34ce28505c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -1415,9 +1415,8 @@ bool dcn20_update_bandwidth(
int i;
/* recalculate DML parameters */
- if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
+ if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false))
return false;
- }
/* apply updated bandwidth parameters */
dc->hwss.prepare_bandwidth(dc, context);