diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2021-10-27 18:39:14 -0400 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2021-10-27 19:50:26 -0400 |
commit | 00f965e700ef5aa2d889e7e65c7458531d2a4bcf (patch) | |
tree | b00c0b25e3532624f62dcc80e9301ac4b0c98837 | |
parent | 41724ea273cdda5261db4fabd6bfb1375fbc96b2 (diff) |
drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not settopic/amdgpu-dp2.0-mst-2021-10-27
Need to guard some things with CONFIG_DRM_AMD_DC_DCN.
Fixes: 41724ea273cdda ("drm/amd/display: Add DP 2.0 MST DM Support")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Dave Airlie <airlied@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211027223914.1776061-1-alexander.deucher@amd.com
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index ecdeeedb1cde..ee02776980b6 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -10683,9 +10683,9 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, struct dm_crtc_state *dm_old_crtc_state; #if defined(CONFIG_DRM_AMD_DC_DCN) struct dsc_mst_fairness_vars vars[MAX_PIPES]; -#endif struct drm_dp_mst_topology_state *mst_state; struct drm_dp_mst_topology_mgr *mgr; +#endif trace_amdgpu_dm_atomic_check_begin(state); diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index 53b5cc7b0679..8cbeeb7c986d 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -219,7 +219,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table( struct drm_dp_mst_topology_mgr *mst_mgr; struct drm_dp_mst_port *mst_port; bool ret; - u8 link_coding_cap; + u8 link_coding_cap = DP_8b_10b_ENCODING; aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context; /* Accessing the connector state is required for vcpi_slots allocation @@ -239,7 +239,9 @@ bool dm_helpers_dp_mst_write_payload_allocation_table( mst_port = aconnector->port; +#if defined(CONFIG_DRM_AMD_DC_DCN) link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link); +#endif if (enable) { |