Blob Blame History Raw
From: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
Date: Fri, 12 Jan 2018 13:13:11 -0500
Subject: drm/amd/display: Fix multiple definitions of handle_crc_irq
Git-commit: fdb401d03d311399d844b9f23ec5ab98a2811f58
Patch-mainline: v4.17-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166

If CONFIG_DEBUG_FS is disabled, then CRC should also be disabled.
Therefore, amdgpu_dm_crtc_handle_crc_irq was redefined as a no-op
function within amdgpu_dm.h.

However, since amdgpu_dm.h is included in multiple files, this caused
conflicts when linking during compile. Therefore, Use a macro to
define the function as a no-op instead.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -265,7 +265,7 @@ int amdgpu_dm_crtc_set_crc_source(struct
 void amdgpu_dm_crtc_handle_crc_irq(struct drm_crtc *crtc);
 #else
 #define amdgpu_dm_crtc_set_crc_source NULL
-void amdgpu_dm_crtc_handle_crc_irq(struct drm_crtc *crtc) {}
+#define amdgpu_dm_crtc_handle_crc_irq(x)
 #endif
 
 extern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs;