summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/dcn20
diff options
context:
space:
mode:
authorNikola Cornij2019-03-20 00:47:32 +0100
committerAlex Deucher2019-06-22 16:34:08 +0200
commitc2bcd914a2a7917442daf20a7b33d690f5903bea (patch)
tree39a2dc287053ccc8315d44ed4b60adc55d73a732 /drivers/gpu/drm/amd/display/dc/dcn20
parentdrm/amd/display: Add a flags union for 3dlut transformation matrix (diff)
downloadkernel-qcow2-linux-c2bcd914a2a7917442daf20a7b33d690f5903bea.tar.gz
kernel-qcow2-linux-c2bcd914a2a7917442daf20a7b33d690f5903bea.tar.xz
kernel-qcow2-linux-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/dcn20')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c
index d17accc2e009..4865cc341dec 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c
@@ -225,6 +225,7 @@ static void dsc2_disable(struct display_stream_compressor *dsc)
static void dsc_log_pps(struct display_stream_compressor *dsc, struct drm_dsc_config *pps)
{
int i;
+ int bits_per_pixel = pps->bits_per_pixel;
DC_LOG_DSC("programming DSC Picture Parameter Set (PPS):");
DC_LOG_DSC("\tdsc_version_major %d", pps->dsc_version_major);
@@ -235,7 +236,7 @@ static void dsc_log_pps(struct display_stream_compressor *dsc, struct drm_dsc_co
DC_LOG_DSC("\tconvert_rgb %d", pps->convert_rgb);
DC_LOG_DSC("\tsimple_422 %d", pps->simple_422);
DC_LOG_DSC("\tvbr_enable %d", pps->vbr_enable);
- DC_LOG_DSC("\tbits_per_pixel %d", pps->bits_per_pixel);
+ DC_LOG_DSC("\tbits_per_pixel %d (%d.%04d)", bits_per_pixel, bits_per_pixel / 16, ((bits_per_pixel % 16) * 10000) / 16);
DC_LOG_DSC("\tpic_height %d", pps->pic_height);
DC_LOG_DSC("\tpic_width %d", pps->pic_width);
DC_LOG_DSC("\tslice_height %d", pps->slice_height);