Skip to content

Commit c645e4b

Browse files
committed
drm/amdgpu/display: properly guard dc_dsc_stream_bandwidth_in_kbps
Move the function protoype to the right header and guard the call with CONFIG_DRM_AMD_DC_DCN as DSC is only available with DCN. Fixes: 8c2f14c ("drm/amd/display: Add changes for dsc bpp in 16ths and unify bw calculations") Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Dillon Varone <[email protected]> Cc: Stephen Rothwell <[email protected]>
1 parent 7a78e2b commit c645e4b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_link.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3498,17 +3498,17 @@ void dc_link_enable_hpd_filter(struct dc_link *link, bool enable)
34983498
}
34993499
}
35003500

3501-
uint32_t dc_dsc_stream_bandwidth_in_kbps(uint32_t pix_clk_100hz, uint32_t bpp_x16);
3502-
35033501
uint32_t dc_bandwidth_in_kbps_from_timing(
35043502
const struct dc_crtc_timing *timing)
35053503
{
35063504
uint32_t bits_per_channel = 0;
35073505
uint32_t kbps;
35083506

3507+
#if defined(CONFIG_DRM_AMD_DC_DCN)
35093508
if (timing->flags.DSC) {
35103509
return dc_dsc_stream_bandwidth_in_kbps(timing->pix_clk_100hz, timing->dsc_cfg.bits_per_pixel);
35113510
}
3511+
#endif
35123512

35133513
switch (timing->display_color_depth) {
35143514
case COLOR_DEPTH_666:

drivers/gpu/drm/amd/display/dc/dc_dsc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,6 @@ void dc_dsc_policy_set_max_target_bpp_limit(uint32_t limit);
8888

8989
void dc_dsc_policy_set_enable_dsc_when_not_needed(bool enable);
9090

91+
uint32_t dc_dsc_stream_bandwidth_in_kbps(uint32_t pix_clk_100hz, uint32_t bpp_x16);
92+
9193
#endif

0 commit comments

Comments
 (0)