Skip to contentSkip to conversation

drm/amdgpu/display: protect dc_dsc_stream_bandwidth_in_kbps with CONFIG_DRM_AMD_DC_DCN

PATCH In review Alex Deucher 2 participants 2 messages Jul 28, 2021 – Jul 29, 2021

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/display: protect dc_dsc_stream_bandwidth_in_kbps with CONFIG_DRM_AMD_DC_DCN

It's only used and enabled with DCN, so protect it.

Fixes b6b76b0315ed7b ("drm/amd/display: Fixed EdidUtility build errors")
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -0
index 5be9d6c70ea6..8bd7f42a8053 100644
@@ -3729,11 +3729,13 @@ uint32_t dc_bandwidth_in_kbps_from_timing(
 	uint32_t bits_per_channel = 0;
 	uint32_t kbps;
 
+#if defined(CONFIG_DRM_AMD_DC_DCN)
 	if (timing->flags.DSC)
 		return dc_dsc_stream_bandwidth_in_kbps(timing,
 				timing->dsc_cfg.bits_per_pixel,
 				timing->dsc_cfg.num_slices_h,
 				timing->dsc_cfg.is_dp);
+#endif
 
 	switch (timing->display_color_depth) {
 	case COLOR_DEPTH_666:
Signature · 6 lines
2.31.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alex Deucher

It's only used and enabled with DCN, so protect it.

Fixes b6b76b0315ed7b ("drm/amd/display: Fixed EdidUtility build errors")

Harry

Quoted 13 lines
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +0 -0
index 5be9d6c70ea6..8bd7f42a8053 100644
@@ -3729,11 +3729,13 @@ uint32_t dc_bandwidth_in_kbps_from_timing(
 	uint32_t bits_per_channel = 0;
 	uint32_t kbps;
 

drivers/gpu/drm/amd/display/dc/core/dc_link.c uint32_t dc_bandwidth_in_kbps_from_timing( · line 3741

Quoted 10 lines
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -0
+#if defined(CONFIG_DRM_AMD_DC_DCN)
 	if (timing->flags.DSC)
 		return dc_dsc_stream_bandwidth_in_kbps(timing,
 				timing->dsc_cfg.bits_per_pixel,
 				timing->dsc_cfg.num_slices_h,
 				timing->dsc_cfg.is_dp);
+#endif
 
 	switch (timing->display_color_depth) {
 	case COLOR_DEPTH_666:

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx