mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm/rockchip: vop2: update dsc pd status when show logo with dsc
In normal case, dsc power domain will enable when crtc enable and disabled when crtc disable. When enable dsc in uboot to show logo, the dsc in kernel driver can't know the real power domain status, which will trigger something wrong when disable/endale dsc power domain. To avoid this issue, we check the dsc power domain status when vop_initial. the dsc power domain get in vop_initial function is enabled only when dsc is enabled in uboot and enter into kernel driver. It need to update dsc power domain status in this case. Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: I9641373c2c8facc17ff90d4141909bcc3ac6b13d
This commit is contained in:
@@ -4398,6 +4398,41 @@ static void vop2_initial(struct drm_crtc *crtc)
|
||||
* immediately.
|
||||
*/
|
||||
VOP_CTRL_SET(vop2, if_ctrl_cfg_done_imd, 1);
|
||||
|
||||
/* Close dynamic turn on/off rk3588 PD_ESMART and keep esmart pd on when enable */
|
||||
if (vop2->version == VOP_VERSION_RK3588) {
|
||||
struct vop2_power_domain *esmart_pd = vop2_find_pd_by_id(vop2, VOP2_PD_ESMART);
|
||||
|
||||
if (vop2_power_domain_status(esmart_pd))
|
||||
esmart_pd->on = true;
|
||||
else
|
||||
vop2_power_domain_on(esmart_pd);
|
||||
|
||||
if (vop2->data->nr_dscs) {
|
||||
struct vop2_dsc *dsc;
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i < vop2->data->nr_dscs; i++) {
|
||||
dsc = &vop2->dscs[i];
|
||||
|
||||
if (!dsc->pd)
|
||||
continue;
|
||||
|
||||
if (!vop2_power_domain_status(dsc->pd))
|
||||
continue;
|
||||
|
||||
dsc->enabled = VOP_MODULE_GET(vop2, dsc, dsc_en);
|
||||
|
||||
if (dsc->enabled) {
|
||||
dsc->attach_vp_id = VOP_MODULE_GET(vop2, dsc,
|
||||
dsc_port_sel);
|
||||
dsc->pd->vp_mask = BIT(dsc->attach_vp_id);
|
||||
dsc->pd->on = true;
|
||||
dsc->pd->ref_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
vop2_layer_map_initial(vop2, current_vp_id);
|
||||
vop2_axi_irqs_enable(vop2);
|
||||
vop2->is_enabled = true;
|
||||
|
||||
Reference in New Issue
Block a user