drm/amd/display: Optimize bandwidth validation by adding early return
authorJoshua Aberback <joshua.aberback@amd.com>
Mon, 1 Apr 2019 19:18:29 +0000 (15:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 22 Jun 2019 14:34:09 +0000 (09:34 -0500)
commit254eb07cb090374d0e1e90790395ead77f6f6ad5
treee8e3e08e14a735329d80aa93460f216867678711
parent776c1f569f94e39a1776c22f29137661f294ff03
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>
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c