diff options
author | Nikola Cornij <nikola.cornij@amd.com> | 2019-03-19 19:47:32 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-22 09:34:08 -0500 |
commit | c2bcd914a2a7917442daf20a7b33d690f5903bea (patch) | |
tree | 39a2dc287053ccc8315d44ed4b60adc55d73a732 /drivers/gpu/drm/amd/display/dc/core/dc_link.c | |
parent | drm/amd/display: Add a flags union for 3dlut transformation matrix (diff) | |
download | linux-dev-c2bcd914a2a7917442daf20a7b33d690f5903bea.tar.xz linux-dev-c2bcd914a2a7917442daf20a7b33d690f5903bea.zip |
drm/amd/display: Calculate link bandwidth in a common function
[why]
Currently link bandwidth is calculated in various places using the same
multi-step formula. Doing this in one common place makes sure the same
formula will indeed be applied to all link bandwidth calculations.
It also makes it possible to apply link-setting-specific adjustments
that affect effective link bandwidth.
[how]
Replace all implementations of link bandwidth calculation with a call
to a function.
Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Nikola Cornij <Nikola.Cornij@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_link.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index 2a9f4661540c..4c31930f1cdf 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -2390,11 +2390,6 @@ static struct fixed31_32 get_pbn_per_slot(struct dc_stream_state *stream) &stream->link->cur_link_settings); link_rate_in_mbytes_per_sec /= 8000; /* Kbits to MBytes */ -#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT - if (stream->link->fec_state != dc_link_fec_not_ready) - link_rate_in_mbytes_per_sec = (link_rate_in_mbytes_per_sec * 970)/1000; -#endif - mbytes_per_sec = dc_fixpt_from_int(link_rate_in_mbytes_per_sec); return dc_fixpt_div_int(mbytes_per_sec, 54); |