mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
c4f3f114e7
commit
2debe0ecb5
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
};
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
|
||||
|
||||
#ifndef mmBIOS_SCRATCH_2
|
||||
#define mmBIOS_SCRATCH_0 0x05C9
|
||||
#define mmBIOS_SCRATCH_2 0x05CB
|
||||
#define mmBIOS_SCRATCH_3 0x05CC
|
||||
#define mmBIOS_SCRATCH_6 0x05CF
|
||||
@@ -368,6 +369,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
|
||||
};
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
|
||||
|
||||
#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 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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user