Commit 2200eb9e authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Alex Deucher
Browse files

drm/amd/display: Drop CONFIG_DRM_AMD_DC_DMUB guards



[Why]
Support for DMUB only depends on support for DC. It doesn't use floating
point so we don't need to guard it by any specific DCN revision.

[How]
Drop the guards and cleanup the newlines around each one.

Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: default avatarHersen Wu <hersenxs.wu@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9a71c7d3
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ config DRM_AMD_DC_DCN2_1
	bool "DCN 2.1 family"
	depends on DRM_AMD_DC && X86
	depends on DRM_AMD_DC_DCN2_0
	select DRM_AMD_DC_DMUB
	help
	  Choose this option if you want to have
	  Renoir support for display engine
@@ -53,11 +52,6 @@ config DRM_AMD_DC_HDCP
	 if you want to support
	 HDCP authentication

config DRM_AMD_DC_DMUB
        def_bool n
        help
          DMUB support for display engine

config DEBUG_KERNEL_DC
	bool "Enable kgdb break in DC"
	depends on DRM_AMD_DC
+3 −9
Original line number Diff line number Diff line
@@ -34,27 +34,21 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/freesync
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/color
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/info_packet
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/power
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dmub/inc

ifdef CONFIG_DRM_AMD_DC_HDCP
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/hdcp
endif

ifdef CONFIG_DRM_AMD_DC_DMUB
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dmub/inc
endif

#TODO: remove when Timing Sync feature is complete
subdir-ccflags-y += -DBUILD_FEATURE_TIMING_SYNC=0

DAL_LIBS = amdgpu_dm dc	modules/freesync modules/color modules/info_packet modules/power
DAL_LIBS = amdgpu_dm dc	modules/freesync modules/color modules/info_packet modules/power dmub/src

ifdef CONFIG_DRM_AMD_DC_HDCP
DAL_LIBS += modules/hdcp
endif

ifdef CONFIG_DRM_AMD_DC_DMUB
DAL_LIBS += dmub/src
endif

AMD_DAL = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/,$(DAL_LIBS)))

include $(AMD_DAL)
+1 −19
Original line number Diff line number Diff line
@@ -30,12 +30,10 @@
#include "dc.h"
#include "dc/inc/core_types.h"
#include "dal_asic_id.h"
#ifdef CONFIG_DRM_AMD_DC_DMUB
#include "dmub/inc/dmub_srv.h"
#include "dc/inc/hw/dmcu.h"
#include "dc/inc/hw/abm.h"
#include "dc/dc_dmub_srv.h"
#endif

#include "vid.h"
#include "amdgpu.h"
@@ -93,10 +91,9 @@
#include "modules/power/power_helpers.h"
#include "modules/inc/mod_info_packet.h"

#ifdef CONFIG_DRM_AMD_DC_DMUB
#define FIRMWARE_RENOIR_DMUB "amdgpu/renoir_dmcub.bin"
MODULE_FIRMWARE(FIRMWARE_RENOIR_DMUB);
#endif

#define FIRMWARE_RAVEN_DMCU		"amdgpu/raven_dmcu.bin"
MODULE_FIRMWARE(FIRMWARE_RAVEN_DMCU);

@@ -677,7 +674,6 @@ void amdgpu_dm_audio_eld_notify(struct amdgpu_device *adev, int pin)
	}
}

#ifdef CONFIG_DRM_AMD_DC_DMUB
static int dm_dmub_hw_init(struct amdgpu_device *adev)
{
	const unsigned int psp_header_bytes = 0x100;
@@ -816,16 +812,13 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
	return 0;
}

#endif
static int amdgpu_dm_init(struct amdgpu_device *adev)
{
	struct dc_init_data init_data;
#ifdef CONFIG_DRM_AMD_DC_HDCP
	struct dc_callback_init init_params;
#endif
#ifdef CONFIG_DRM_AMD_DC_DMUB
	int r;
#endif

	adev->dm.ddev = adev->ddev;
	adev->dm.adev = adev;
@@ -902,14 +895,12 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)

	dc_hardware_init(adev->dm.dc);

#ifdef CONFIG_DRM_AMD_DC_DMUB
	r = dm_dmub_hw_init(adev);
	if (r) {
		DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r);
		goto error;
	}

#endif
	adev->dm.freesync_module = mod_freesync_create(adev->dm.dc);
	if (!adev->dm.freesync_module) {
		DRM_ERROR(
@@ -982,7 +973,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
	if (adev->dm.dc)
		dc_deinit_callbacks(adev->dm.dc);
#endif
#ifdef CONFIG_DRM_AMD_DC_DMUB
	if (adev->dm.dc->ctx->dmub_srv) {
		dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
		adev->dm.dc->ctx->dmub_srv = NULL;
@@ -992,7 +982,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
		amdgpu_bo_free_kernel(&adev->dm.dmub_bo,
				      &adev->dm.dmub_bo_gpu_addr,
				      &adev->dm.dmub_bo_cpu_addr);
#endif

	/* DC Destroy TODO: Replace destroy DAL */
	if (adev->dm.dc)
@@ -1104,7 +1093,6 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
	return 0;
}

#ifdef CONFIG_DRM_AMD_DC_DMUB
static uint32_t amdgpu_dm_dmub_reg_read(void *ctx, uint32_t address)
{
	struct amdgpu_device *adev = ctx;
@@ -1190,19 +1178,15 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
	return 0;
}

#endif
static int dm_sw_init(void *handle)
{
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
#ifdef CONFIG_DRM_AMD_DC_DMUB
	int r;

	r = dm_dmub_sw_init(adev);
	if (r)
		return r;

#endif

	return load_dmcu_fw(adev);
}

@@ -1210,7 +1194,6 @@ static int dm_sw_fini(void *handle)
{
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;

#ifdef CONFIG_DRM_AMD_DC_DMUB
	if (adev->dm.dmub_srv) {
		dmub_srv_destroy(adev->dm.dmub_srv);
		adev->dm.dmub_srv = NULL;
@@ -1221,7 +1204,6 @@ static int dm_sw_fini(void *handle)
		adev->dm.dmub_fw = NULL;
	}

#endif
	if(adev->dm.fw_dmcu) {
		release_firmware(adev->dm.fw_dmcu);
		adev->dm.fw_dmcu = NULL;
+0 −4
Original line number Diff line number Diff line
@@ -57,10 +57,8 @@ struct amdgpu_device;
struct drm_device;
struct amdgpu_dm_irq_handler_data;
struct dc;
#ifdef CONFIG_DRM_AMD_DC_DMUB
struct amdgpu_bo;
struct dmub_srv;
#endif

struct common_irq_params {
	struct amdgpu_device *adev;
@@ -125,7 +123,6 @@ struct amdgpu_display_manager {

	struct dc *dc;

#ifdef CONFIG_DRM_AMD_DC_DMUB
	/**
	 * @dmub_srv:
	 *
@@ -170,7 +167,6 @@ struct amdgpu_display_manager {
	 */
	uint32_t dmcub_fw_version;

#endif
	/**
	 * @cgs_device:
	 *
+0 −3
Original line number Diff line number Diff line
@@ -70,9 +70,6 @@ AMD_DM_REG_UPDATE = $(addprefix $(AMDDALPATH)/dc/,dc_helper.o)
AMD_DISPLAY_FILES += $(AMD_DISPLAY_CORE)
AMD_DISPLAY_FILES += $(AMD_DM_REG_UPDATE)

ifdef CONFIG_DRM_AMD_DC_DMUB
DC_DMUB += dc_dmub_srv.o
AMD_DISPLAY_DMUB = $(addprefix $(AMDDALPATH)/dc/,$(DC_DMUB))
AMD_DISPLAY_FILES += $(AMD_DISPLAY_DMUB)
endif
Loading