Commit c69dffab authored by hersen wu's avatar hersen wu Committed by Alex Deucher

drm/amd/display: fix eDP fast bootup for pre-raven asic

[Why]
For fastboot, Bios will light up eDP before SW driver is loaded. SW
driver will check if eDP is lit by bios through reading the
BIOS_SCRATCH_3 register. If lit, SW driver will not power down eDP
power and phy to save time.

Definition of BIOS_SCRATCH_3 are missing for pre-raven asic. This
causes eDP fast boot to not work property. For some eDP panels, even
if dp tx sends NoVideoStream_flag =1 and dpcd 0x600=2, eDP rx may not
handle properly. This may cause a short flash on screen.

[How] Add definition of BIOS_SCRATCH_3 for all asic
Signed-off-by: default avatarhersen wu <hersenxs.wu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Acked-by: default avatarYongqiang Sun <yongqiang.sun@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3741540e
...@@ -83,8 +83,7 @@ uint32_t bios_get_vga_enabled_displays( ...@@ -83,8 +83,7 @@ uint32_t bios_get_vga_enabled_displays(
{ {
uint32_t active_disp = 1; uint32_t active_disp = 1;
if (bios->regs->BIOS_SCRATCH_3) /*follow up with other asic, todo*/ active_disp = REG_READ(BIOS_SCRATCH_3) & 0XFFFF;
active_disp = REG_READ(BIOS_SCRATCH_3) & 0XFFFF;
return active_disp; return active_disp;
} }
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
#ifndef mmBIOS_SCRATCH_2 #ifndef mmBIOS_SCRATCH_2
#define mmBIOS_SCRATCH_2 0x05CB #define mmBIOS_SCRATCH_2 0x05CB
#define mmBIOS_SCRATCH_3 0x05CC
#define mmBIOS_SCRATCH_6 0x05CF #define mmBIOS_SCRATCH_6 0x05CF
#endif #endif
...@@ -365,6 +366,7 @@ static const struct dce_abm_mask abm_mask = { ...@@ -365,6 +366,7 @@ static const struct dce_abm_mask abm_mask = {
#define DCFE_MEM_PWR_CTRL_REG_BASE 0x1b03 #define DCFE_MEM_PWR_CTRL_REG_BASE 0x1b03
static const struct bios_registers bios_regs = { static const struct bios_registers bios_regs = {
.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3,
.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6 .BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6
}; };
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
#ifndef mmBIOS_SCRATCH_2 #ifndef mmBIOS_SCRATCH_2
#define mmBIOS_SCRATCH_2 0x05CB #define mmBIOS_SCRATCH_2 0x05CB
#define mmBIOS_SCRATCH_3 0x05CC
#define mmBIOS_SCRATCH_6 0x05CF #define mmBIOS_SCRATCH_6 0x05CF
#endif #endif
...@@ -369,6 +370,7 @@ static const struct dce110_clk_src_mask cs_mask = { ...@@ -369,6 +370,7 @@ static const struct dce110_clk_src_mask cs_mask = {
}; };
static const struct bios_registers bios_regs = { static const struct bios_registers bios_regs = {
.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3,
.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6 .BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6
}; };
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
#ifndef mmBIOS_SCRATCH_2 #ifndef mmBIOS_SCRATCH_2
#define mmBIOS_SCRATCH_2 0x05CB #define mmBIOS_SCRATCH_2 0x05CB
#define mmBIOS_SCRATCH_3 0x05CC
#define mmBIOS_SCRATCH_6 0x05CF #define mmBIOS_SCRATCH_6 0x05CF
#endif #endif
...@@ -376,6 +377,7 @@ static const struct dce110_clk_src_mask cs_mask = { ...@@ -376,6 +377,7 @@ static const struct dce110_clk_src_mask cs_mask = {
}; };
static const struct bios_registers bios_regs = { static const struct bios_registers bios_regs = {
.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3,
.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6 .BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6
}; };
......
...@@ -442,6 +442,7 @@ struct dce_i2c_hw *dce120_i2c_hw_create( ...@@ -442,6 +442,7 @@ struct dce_i2c_hw *dce120_i2c_hw_create(
return dce_i2c_hw; return dce_i2c_hw;
} }
static const struct bios_registers bios_regs = { static const struct bios_registers bios_regs = {
.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) .BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6 + NBIO_BASE(mmBIOS_SCRATCH_6_BASE_IDX)
}; };
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
#ifndef mmBIOS_SCRATCH_2 #ifndef mmBIOS_SCRATCH_2
#define mmBIOS_SCRATCH_2 0x05CB #define mmBIOS_SCRATCH_2 0x05CB
#define mmBIOS_SCRATCH_3 0x05CC
#define mmBIOS_SCRATCH_6 0x05CF #define mmBIOS_SCRATCH_6 0x05CF
#endif #endif
...@@ -358,6 +359,7 @@ static const struct dce110_clk_src_mask cs_mask = { ...@@ -358,6 +359,7 @@ static const struct dce110_clk_src_mask cs_mask = {
}; };
static const struct bios_registers bios_regs = { static const struct bios_registers bios_regs = {
.BIOS_SCRATCH_3 = mmBIOS_SCRATCH_3,
.BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6 .BIOS_SCRATCH_6 = mmBIOS_SCRATCH_6
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment