drm/amdgpu: properly guard DC support in navi code
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Jul 2019 20:39:39 +0000 (15:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Jul 2019 18:56:42 +0000 (13:56 -0500)
Need to add appropriate ifdef.

Acked-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/nv.c

index fc84fbd35a845bffb8b2abb4ae697ff6346da109..ad430cbcd72fcd8e57e654690a086ca3a89c5c12 100644 (file)
@@ -389,8 +389,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
                        amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
                if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
                        amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
                else if (amdgpu_device_has_dc_support(adev))
                        amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#else
+#      warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
+#endif
                amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
                amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
                if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&