Skip to contentSkip to conversation

drm/amd/display: Fix DC_FP_START/END use on non-DCN builds

PATCH In review [email protected] 2 participants 2 messages Feb 17, 2022

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 drm/amd/display: Fix DC_FP_START/END use on non-DCN builds

From: Leo Li <[email protected]>

DC_FP_START/END is only defined for CONFIG_DRM_AMD_DC_DCN enabled builds, and update_bw_bounding_box() is only valid for DCN ASICs.

Therefore, wrap the entire thing in the ifdef guard.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index 4ea114725d61..b1ce3c0cf477 100644
@@ -987,13 +987,13 @@ static bool dc_construct(struct dc *dc,
 		goto fail;
 #ifdef CONFIG_DRM_AMD_DC_DCN
 	dc->clk_mgr->force_smu_not_present = init_params->force_smu_not_present;
-#endif
 
 	if (dc->res_pool->funcs->update_bw_bounding_box) {
 		DC_FP_START();
 		dc->res_pool->funcs->update_bw_bounding_box(dc, dc->clk_mgr->bw_params);
 		DC_FP_END();
 	}
+#endif
 
 	/* Creation of current_state must occur after dc->dml
 	 * is initialized in dc_create_resource_pool because
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · On 2022-02-17 16:05, [email protected] wrote:

From: Leo Li <[email protected]>

DC_FP_START/END is only defined for CONFIG_DRM_AMD_DC_DCN enabled builds, and update_bw_bounding_box() is only valid for DCN ASICs.

Therefore, wrap the entire thing in the ifdef guard.

Harry

Quoted 23 lines
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index 4ea114725d61..b1ce3c0cf477 100644
@@ -987,13 +987,13 @@ static bool dc_construct(struct dc *dc,
 		goto fail;
 #ifdef CONFIG_DRM_AMD_DC_DCN
 	dc->clk_mgr->force_smu_not_present = init_params->force_smu_not_present;
-#endif
 
 	if (dc->res_pool->funcs->update_bw_bounding_box) {
 		DC_FP_START();
 		dc->res_pool->funcs->update_bw_bounding_box(dc, dc->clk_mgr->bw_params);
 		DC_FP_END();
 	}
+#endif
 
 	/* Creation of current_state must occur after dc->dml
 	 * is initialized in dc_create_resource_pool because