mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/rockchip: dsi2: add crtc post enable and pre disable callback
Add crtc post enable and pre disable callback. Setting dsc config done in crtc post enable callback if dsc is enable. Change-Id: I6eb5e3c14ba70c90d2f3337c22754a3a7a96ea81 Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com> Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
This commit is contained in:
@@ -502,6 +502,7 @@ static void dw_mipi_dsi2_encoder_atomic_disable(struct drm_encoder *encoder,
|
||||
struct rockchip_crtc_state *s = to_rockchip_crtc_state(encoder->crtc->state);
|
||||
struct drm_crtc *new_crtc;
|
||||
struct drm_crtc_state *new_crtc_state = NULL;
|
||||
int output_if;
|
||||
|
||||
new_crtc = dw_mipi_dsi2_get_new_crtc(dsi2, old_state);
|
||||
if (new_crtc)
|
||||
@@ -530,6 +531,13 @@ static void dw_mipi_dsi2_encoder_atomic_disable(struct drm_encoder *encoder,
|
||||
|
||||
dw_mipi_dsi2_post_disable(dsi2);
|
||||
|
||||
if (dsi2->slave)
|
||||
output_if = VOP_OUTPUT_IF_MIPI0 | VOP_OUTPUT_IF_MIPI1;
|
||||
else
|
||||
output_if = dsi2->id ? VOP_OUTPUT_IF_MIPI1 : VOP_OUTPUT_IF_MIPI0;
|
||||
|
||||
rockchip_drm_crtc_output_pre_disable(encoder->crtc, output_if);
|
||||
|
||||
dsi2->enabled = false;
|
||||
if (dsi2->slave)
|
||||
dsi2->slave->enabled = false;
|
||||
@@ -1013,7 +1021,7 @@ static void dw_mipi_dsi2_encoder_atomic_enable(struct drm_encoder *encoder,
|
||||
struct dw_mipi_dsi2 *dsi2 = encoder_to_dsi2(encoder);
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state = NULL;
|
||||
int ret;
|
||||
int output_if, ret;
|
||||
|
||||
crtc = dw_mipi_dsi2_get_new_crtc(dsi2, state);
|
||||
if (crtc)
|
||||
@@ -1050,6 +1058,13 @@ static void dw_mipi_dsi2_encoder_atomic_enable(struct drm_encoder *encoder,
|
||||
if (old_crtc_state && old_crtc_state->self_refresh_active)
|
||||
rockchip_drm_crtc_standby(encoder->crtc, 0);
|
||||
|
||||
if (dsi2->slave)
|
||||
output_if = VOP_OUTPUT_IF_MIPI0 | VOP_OUTPUT_IF_MIPI1;
|
||||
else
|
||||
output_if = dsi2->id ? VOP_OUTPUT_IF_MIPI1 : VOP_OUTPUT_IF_MIPI0;
|
||||
|
||||
rockchip_drm_crtc_output_post_enable(encoder->crtc, output_if);
|
||||
|
||||
dsi2->enabled = true;
|
||||
if (dsi2->slave)
|
||||
dsi2->slave->enabled = true;
|
||||
|
||||
Reference in New Issue
Block a user