Skip to contentSkip to conversation

drm/amdgpu/display: fix build without CONFIG_DRM_AMD_DC_DCN3_0

PATCH In review Alex Deucher 2 participants 2 messages Jun 3, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/display: fix build without CONFIG_DRM_AMD_DC_DCN3_0

Need to guard some new DCN3.0 stuff.

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c +4 -1
index 43d0b4e53b5d..2972392f9788 100644
@@ -288,13 +288,16 @@ void optc1_program_timing(
 	if (optc1_is_two_pixels_per_containter(&patched_crtc_timing) || optc1->opp_count == 2)
 		h_div = H_TIMING_DIV_BY2;
 
+#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
 	if (optc1->tg_mask->OTG_H_TIMING_DIV_MODE != 0) {
 		if (optc1->opp_count == 4)
 			h_div = H_TIMING_DIV_BY4;
 
 		REG_UPDATE(OTG_H_TIMING_CNTL,
 		OTG_H_TIMING_DIV_MODE, h_div);
-	} else {
+	} else
+#endif
+	{
 		REG_UPDATE(OTG_H_TIMING_CNTL,
 		OTG_H_TIMING_DIV_BY2, h_div);
 	}
Signature · 6 lines
2.25.4

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

Need to guard some new DCN3.0 stuff.

Thanks!

Nicholas Kazlauskas

Quoted 17 lines
---
  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c +1 -0
index 43d0b4e53b5d..2972392f9788 100644
@@ -288,13 +288,16 @@ void optc1_program_timing(
  	if (optc1_is_two_pixels_per_containter(&patched_crtc_timing) || optc1->opp_count == 2)
  		h_div = H_TIMING_DIV_BY2;
 
+#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
  	if (optc1->tg_mask->OTG_H_TIMING_DIV_MODE != 0) {
  		if (optc1->opp_count == 4)
  			h_div = H_TIMING_DIV_BY4;

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c void optc1_program_timing( · line 303

Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c +3 -1
 
  		REG_UPDATE(OTG_H_TIMING_CNTL,
  		OTG_H_TIMING_DIV_MODE, h_div);
-	} else {
+	} else
+#endif
+	{
  		REG_UPDATE(OTG_H_TIMING_CNTL,
  		OTG_H_TIMING_DIV_BY2, h_div);
  	}

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