Commit 2debe0ec authored by Timur Kristóf's avatar Timur Kristóf Committed by Alex Deucher
Browse files

drm/amd/display: Add DCE BIOS_SCRATCH_0 register



The BIOS uses this register to write the results of the
DAC_LoadDetection command, so we'll need to read this
in order to make DAC load detection work.

As a reference, I used the mmBIOS_SCRATCH_0 definition from
the amdgpu legacy display code.

Signed-off-by: default avatarTimur Kristóf <timur.kristof@gmail.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c4f3f114
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ struct dc_vbios_funcs {
};

struct bios_registers {
	uint32_t BIOS_SCRATCH_0;
	uint32_t BIOS_SCRATCH_3;
	uint32_t BIOS_SCRATCH_6;
};
+2 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@
#endif

#ifndef mmBIOS_SCRATCH_2
	#define mmBIOS_SCRATCH_0 0x05C9
	#define mmBIOS_SCRATCH_2 0x05CB
	#define mmBIOS_SCRATCH_3 0x05CC
	#define mmBIOS_SCRATCH_6 0x05CF
@@ -369,6 +370,7 @@ static const struct dce_abm_mask abm_mask = {
#define DCFE_MEM_PWR_CTRL_REG_BASE 0x1b03

static const struct bios_registers bios_regs = {
	.BIOS_SCRATCH_0 = mmBIOS_SCRATCH_0,
	.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3,
	.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6
};
+2 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@
#endif

#ifndef mmBIOS_SCRATCH_2
	#define mmBIOS_SCRATCH_0 0x05C9
	#define mmBIOS_SCRATCH_2 0x05CB
	#define mmBIOS_SCRATCH_3 0x05CC
	#define mmBIOS_SCRATCH_6 0x05CF
@@ -377,6 +378,7 @@ static const struct dce110_clk_src_mask cs_mask = {
};

static const struct bios_registers bios_regs = {
	.BIOS_SCRATCH_0 = mmBIOS_SCRATCH_0,
	.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3,
	.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6
};
+2 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@
#endif

#ifndef mmBIOS_SCRATCH_2
	#define mmBIOS_SCRATCH_0 0x05C9
	#define mmBIOS_SCRATCH_2 0x05CB
	#define mmBIOS_SCRATCH_3 0x05CC
	#define mmBIOS_SCRATCH_6 0x05CF
@@ -385,6 +386,7 @@ static const struct dce110_clk_src_mask cs_mask = {
};

static const struct bios_registers bios_regs = {
	.BIOS_SCRATCH_0 = mmBIOS_SCRATCH_0,
	.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3,
	.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6
};
+1 −0
Original line number Diff line number Diff line
@@ -491,6 +491,7 @@ static struct dce_i2c_hw *dce120_i2c_hw_create(
	return dce_i2c_hw;
}
static const struct bios_registers bios_regs = {
	.BIOS_SCRATCH_0 = mmBIOS_SCRATCH_0 + NBIO_BASE(mmBIOS_SCRATCH_0_BASE_IDX),
	.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3 + NBIO_BASE(mmBIOS_SCRATCH_3_BASE_IDX),
	.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6 + NBIO_BASE(mmBIOS_SCRATCH_6_BASE_IDX)
};
Loading