Commit 7367540b authored by Tim Huang's avatar Tim Huang Committed by Alex Deucher

drm/amd/display: Fix unused variable warning

[Why]
It will build failed with unused variable 'dc' with
'-Werror=unused-variable'enabled when CONFIG_DRM_AMD_DC_DCN
is not defined.
Signed-off-by: default avatarTim Huang <tim.huang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarAaron Liu <aaron.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bee7f8d0
...@@ -1027,7 +1027,6 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev) ...@@ -1027,7 +1027,6 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
const unsigned char *fw_inst_const, *fw_bss_data; const unsigned char *fw_inst_const, *fw_bss_data;
uint32_t i, fw_inst_const_size, fw_bss_data_size; uint32_t i, fw_inst_const_size, fw_bss_data_size;
bool has_hw_support; bool has_hw_support;
struct dc *dc = adev->dm.dc;
if (!dmub_srv) if (!dmub_srv)
/* DMUB isn't supported on the ASIC. */ /* DMUB isn't supported on the ASIC. */
...@@ -1123,7 +1122,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev) ...@@ -1123,7 +1122,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
case IP_VERSION(3, 1, 3): /* Only for this asic hw internal rev B0 */ case IP_VERSION(3, 1, 3): /* Only for this asic hw internal rev B0 */
hw_params.dpia_supported = true; hw_params.dpia_supported = true;
#if defined(CONFIG_DRM_AMD_DC_DCN) #if defined(CONFIG_DRM_AMD_DC_DCN)
hw_params.disable_dpia = dc->debug.dpia_debug.bits.disable_dpia; hw_params.disable_dpia = adev->dm.dc->debug.dpia_debug.bits.disable_dpia;
#endif #endif
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment