soc/rockchip: split edp_enable() function
To avoid garbage display in firmware on warm reset, we need to enable eDP display in depthcharge instead when the framebuffer is cleared. Therefore limit edp_enable() in coreboot to just configure eDP, and leave enabling the display to depthcharge. CQ-DEPEND=CL:402071 BUG=chrome-os-partner:58675 BRANCH=none TEST=Boot from kevin, and display work Change-Id: I9d937ead33ebba58e33e02fd73b80d6e11bb69aa Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 38b0d18c3fae37dfccb18fe809f763b98703167c Original-Change-Id: Ibbc283a5892b98f4922f02fd67465fe2e1d01b71 Original-Signed-off-by: Lin Huang <hl@rock-chips.com> Original-Reviewed-on: https://chromium-review.googlesource.com/402095 Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/17207 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
1d6957e9a9
commit
a09b338362
|
@ -921,10 +921,7 @@ static int rk_edp_config_video(struct rk_edp *edp)
|
||||||
/* Disable video mute */
|
/* Disable video mute */
|
||||||
clrbits_le32(&edp->regs->video_ctl_1, VIDEO_MUTE);
|
clrbits_le32(&edp->regs->video_ctl_1, VIDEO_MUTE);
|
||||||
|
|
||||||
/* Enable video at next frame */
|
return 0;
|
||||||
setbits_le32(&edp->regs->video_ctl_1, VIDEO_EN);
|
|
||||||
|
|
||||||
return rk_edp_is_video_stream_on(edp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rockchip_edp_force_hpd(struct rk_edp *edp)
|
static void rockchip_edp_force_hpd(struct rk_edp *edp)
|
||||||
|
@ -985,7 +982,7 @@ int rk_edp_get_edid(struct edid *edid)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rk_edp_enable(void)
|
int rk_edp_prepare(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -1002,6 +999,14 @@ int rk_edp_enable(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int rk_edp_enable(void)
|
||||||
|
{
|
||||||
|
/* Enable video at next frame */
|
||||||
|
setbits_le32(&rk_edp.regs->video_ctl_1, VIDEO_EN);
|
||||||
|
|
||||||
|
return rk_edp_is_video_stream_on(&rk_edp);
|
||||||
|
}
|
||||||
|
|
||||||
void rk_edp_init(void)
|
void rk_edp_init(void)
|
||||||
{
|
{
|
||||||
rk_edp.regs = (struct rk_edp_regs *)EDP_BASE;
|
rk_edp.regs = (struct rk_edp_regs *)EDP_BASE;
|
||||||
|
|
|
@ -651,6 +651,7 @@ struct rk_edp {
|
||||||
u8 train_set[4];
|
u8 train_set[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int rk_edp_prepare(void);
|
||||||
int rk_edp_enable(void);
|
int rk_edp_enable(void);
|
||||||
void rk_edp_init(void);
|
void rk_edp_init(void);
|
||||||
int rk_edp_get_edid(struct edid *edid);
|
int rk_edp_get_edid(struct edid *edid);
|
||||||
|
|
|
@ -128,6 +128,10 @@ void rk_display_init(device_t dev, u32 lcdbase,
|
||||||
|
|
||||||
case VOP_MODE_EDP:
|
case VOP_MODE_EDP:
|
||||||
default:
|
default:
|
||||||
|
if (rk_edp_prepare()) {
|
||||||
|
printk(BIOS_WARNING, "edp prepare err\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (rk_edp_enable()) {
|
if (rk_edp_enable()) {
|
||||||
printk(BIOS_WARNING, "edp enable err\n");
|
printk(BIOS_WARNING, "edp enable err\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -99,8 +99,9 @@ void rk_display_init(device_t dev)
|
||||||
return;
|
return;
|
||||||
case VOP_MODE_EDP:
|
case VOP_MODE_EDP:
|
||||||
default:
|
default:
|
||||||
if (rk_edp_enable()) {
|
/* will enable edp in depthcharge */
|
||||||
printk(BIOS_WARNING, "edp enable error\n");
|
if (rk_edp_prepare()) {
|
||||||
|
printk(BIOS_WARNING, "edp prepare error\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mainboard_power_on_backlight();
|
mainboard_power_on_backlight();
|
||||||
|
|
Loading…
Reference in New Issue