Skip to content

Commit e10517b

Browse files
Aurabindo Pillaialexdeucher
authored andcommitted
drm/amd/display: Add additional config guards for DCN
[Why&How] Fix build error by protecting code with config guard to enable building amdgpu without CONFIG_DRM_AMD_DC_DCN enabled. This option is disabled by default for allmodconfig. Signed-off-by: Aurabindo Pillai <[email protected]> Reviewed-by: Nicholas Kazlauskas <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 18c4686 commit e10517b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8469,7 +8469,7 @@ dm_determine_update_type_for_commit(struct amdgpu_display_manager *dm,
84698469
*out_type = update_type;
84708470
return ret;
84718471
}
8472-
8472+
#if defined(CONFIG_DRM_AMD_DC_DCN)
84738473
static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm_crtc *crtc)
84748474
{
84758475
struct drm_connector *connector;
@@ -8492,6 +8492,7 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm
84928492

84938493
return drm_dp_mst_add_affected_dsc_crtcs(state, &aconnector->mst_port->mst_mgr);
84948494
}
8495+
#endif
84958496

84968497
/**
84978498
* amdgpu_dm_atomic_check() - Atomic check implementation for AMDgpu DM.
@@ -8545,6 +8546,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
85458546
if (ret)
85468547
goto fail;
85478548

8549+
#if defined(CONFIG_DRM_AMD_DC_DCN)
85488550
if (adev->asic_type >= CHIP_NAVI10) {
85498551
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
85508552
if (drm_atomic_crtc_needs_modeset(new_crtc_state)) {
@@ -8554,7 +8556,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
85548556
}
85558557
}
85568558
}
8557-
8559+
#endif
85588560
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
85598561
if (!drm_atomic_crtc_needs_modeset(new_crtc_state) &&
85608562
!new_crtc_state->color_mgmt_changed &&

0 commit comments

Comments
 (0)