aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/dc_dsc.h
diff options
context:
space:
mode:
authorNikola Cornij <nikola.cornij@amd.com>2019-04-05 15:02:18 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-22 09:34:10 -0500
commit9c0ab2dd070db6282c27690e7b57976485055ff7 (patch)
treece14da05263e1b44b2dfcfc563e7c48a166b32e7 /drivers/gpu/drm/amd/display/dc/dc_dsc.h
parentdrm/amd/display: enable abm on dcn2 (diff)
downloadlinux-dev-9c0ab2dd070db6282c27690e7b57976485055ff7.tar.xz
linux-dev-9c0ab2dd070db6282c27690e7b57976485055ff7.zip
drm/amd/display: Consider DSC target bpp precision when calculating DSC target bpp
[why] DSC target bpp precision is a decoder DPCD and an AMD encoder capability. It must be taken into account when calculating target bitrate. [how] Add a DC DSC function that does this calculation. Signed-off-by: Nikola Cornij <nikola.cornij@amd.com> Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com> Acked-by: Tony Cheng <Tony.Cheng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc_dsc.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc_dsc.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dsc.h b/drivers/gpu/drm/amd/display/dc/dc_dsc.h
index ddaf7532bb59..be0f7b09086a 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_dsc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_dsc.h
@@ -24,12 +24,13 @@
*
* Author: AMD
*/
+
struct dc_dsc_bw_range {
- uint32_t min_kbps;
+ uint32_t min_kbps; /* Bandwidth if min_target_bpp_x16 is used */
uint32_t min_target_bpp_x16;
- uint32_t max_kbps;
+ uint32_t max_kbps; /* Bandwidth if max_target_bpp_x16 is used */
uint32_t max_target_bpp_x16;
- uint32_t stream_kbps;
+ uint32_t stream_kbps; /* Uncompressed stream bandwidth */
};
@@ -43,10 +44,11 @@ bool dc_dsc_compute_bandwidth_range(
const struct dsc_dec_dpcd_caps *dsc_sink_caps,
const struct dc_crtc_timing *timing,
struct dc_dsc_bw_range *range);
+
bool dc_dsc_compute_config(
const struct dc *dc,
const struct dsc_dec_dpcd_caps *dsc_sink_caps,
- int target_bandwidth,
+ uint32_t target_bandwidth_kbps,
const struct dc_crtc_timing *timing,
struct dc_dsc_config *dsc_cfg);
#endif