drm/amd/display: remove redundant CONFIG_DRM_AMD_DC_DCN in gpio
authorAlex Hung <alex.hung@amd.com>
Mon, 25 Apr 2022 19:40:05 +0000 (13:40 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 May 2022 21:53:12 +0000 (17:53 -0400)
[Why & How]
CONFIG_DRM_AMD_DC_DCN is used by pass the compilation failures, but DC
code should be OS-agnostic.

This patch fixes it by removing unnecessasry CONFIG_DRM_AMD_DC_DCN
in gpio directory.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/gpio/Makefile
drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_factory_dcn30.c
drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_factory_dcn30.h
drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_translate_dcn30.c
drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_translate_dcn30.h
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c

index d1c2ec5..0f4a22b 100644 (file)
@@ -73,7 +73,6 @@ AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCE120)
 ###############################################################################
 # DCN 1x
 ###############################################################################
-ifdef CONFIG_DRM_AMD_DC_DCN
 GPIO_DCN10 = hw_translate_dcn10.o hw_factory_dcn10.o
 
 AMD_DAL_GPIO_DCN10 = $(addprefix $(AMDDALPATH)/dc/gpio/dcn10/,$(GPIO_DCN10))
@@ -114,7 +113,7 @@ GPIO_DCN315 = hw_translate_dcn315.o hw_factory_dcn315.o
 AMD_DAL_GPIO_DCN315 = $(addprefix $(AMDDALPATH)/dc/gpio/dcn315/,$(GPIO_DCN315))
 
 AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCN315)
-endif
+
 ###############################################################################
 # Diagnostics on FPGA
 ###############################################################################
index 3b7df1a..687d4f1 100644 (file)
@@ -22,7 +22,6 @@
  * Authors: AMD
  *
  */
-#if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dm_services.h"
 #include "include/gpio_types.h"
 #include "../hw_factory.h"
@@ -266,4 +265,3 @@ void dal_hw_factory_dcn30_init(struct hw_factory *factory)
        factory->funcs = &funcs;
 }
 
-#endif
index 131e742..e491af8 100644 (file)
@@ -22,7 +22,6 @@
  * Authors: AMD
  *
  */
-#if defined(CONFIG_DRM_AMD_DC_DCN)
 #ifndef __DAL_HW_FACTORY_DCN30_H__
 #define __DAL_HW_FACTORY_DCN30_H__
 
@@ -30,4 +29,3 @@
 void dal_hw_factory_dcn30_init(struct hw_factory *factory);
 
 #endif /* __DAL_HW_FACTORY_DCN30_H__ */
-#endif
index 6b6b7c7..3169c56 100644 (file)
@@ -26,7 +26,6 @@
 /*
  * Pre-requisites: headers required by header of this unit
  */
-#if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "hw_translate_dcn30.h"
 
 #include "dm_services.h"
@@ -384,4 +383,3 @@ void dal_hw_translate_dcn30_init(struct hw_translate *tr)
        tr->funcs = &funcs;
 }
 
-#endif
index ed55410..511a0dd 100644 (file)
@@ -22,7 +22,6 @@
  * Authors: AMD
  *
  */
-#if defined(CONFIG_DRM_AMD_DC_DCN)
 #ifndef __DAL_HW_TRANSLATE_DCN30_H__
 #define __DAL_HW_TRANSLATE_DCN30_H__
 
@@ -32,4 +31,3 @@ struct hw_translate;
 void dal_hw_translate_dcn30_init(struct hw_translate *tr);
 
 #endif /* __DAL_HW_TRANSLATE_DCN30_H__ */
-#endif
index 5c00ffd..ef4f696 100644 (file)
 #include "dce80/hw_factory_dce80.h"
 #include "dce110/hw_factory_dce110.h"
 #include "dce120/hw_factory_dce120.h"
-#if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_factory_dcn10.h"
 #include "dcn20/hw_factory_dcn20.h"
 #include "dcn21/hw_factory_dcn21.h"
 #include "dcn30/hw_factory_dcn30.h"
 #include "dcn315/hw_factory_dcn315.h"
-#endif
 
 #include "diagnostics/hw_factory_diag.h"
 
@@ -98,7 +96,6 @@ bool dal_hw_factory_init(
        case DCE_VERSION_12_1:
                dal_hw_factory_dce120_init(factory);
                return true;
-#if defined(CONFIG_DRM_AMD_DC_DCN)
        case DCN_VERSION_1_0:
        case DCN_VERSION_1_01:
                dal_hw_factory_dcn10_init(factory);
@@ -121,7 +118,6 @@ bool dal_hw_factory_init(
        case DCN_VERSION_3_15:
                dal_hw_factory_dcn315_init(factory);
                return true;
-#endif
        default:
                ASSERT_CRITICAL(false);
                return false;
index 7a39cbc..1db4f14 100644 (file)
 #include "dce80/hw_translate_dce80.h"
 #include "dce110/hw_translate_dce110.h"
 #include "dce120/hw_translate_dce120.h"
-#if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_translate_dcn10.h"
 #include "dcn20/hw_translate_dcn20.h"
 #include "dcn21/hw_translate_dcn21.h"
 #include "dcn30/hw_translate_dcn30.h"
 #include "dcn315/hw_translate_dcn315.h"
-#endif
 
 #include "diagnostics/hw_translate_diag.h"
 
@@ -93,7 +91,6 @@ bool dal_hw_translate_init(
        case DCE_VERSION_12_1:
                dal_hw_translate_dce120_init(translate);
                return true;
-#if defined(CONFIG_DRM_AMD_DC_DCN)
        case DCN_VERSION_1_0:
        case DCN_VERSION_1_01:
                dal_hw_translate_dcn10_init(translate);
@@ -116,7 +113,6 @@ bool dal_hw_translate_init(
        case DCN_VERSION_3_15:
                dal_hw_translate_dcn315_init(translate);
                return true;
-#endif
 
        default:
                BREAK_TO_DEBUGGER();