mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm/rockchip: dsi: set vop2 standby before command mode in rk3566/rk3568
Change-Id: I49bd967dfb6c561a7c187cb075ff0192f6caf69a Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
This commit is contained in:
@@ -876,20 +876,28 @@ static void dw_mipi_dsi_post_disable(struct dw_mipi_dsi *dsi)
|
||||
static void dw_mipi_dsi_bridge_post_disable(struct drm_bridge *bridge)
|
||||
{
|
||||
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
|
||||
const struct dw_mipi_dsi_plat_data *pdata = dsi->plat_data;
|
||||
|
||||
if (dsi->panel)
|
||||
drm_panel_unprepare(dsi->panel);
|
||||
|
||||
dw_mipi_dsi_post_disable(dsi);
|
||||
|
||||
if (pdata->stream_standby)
|
||||
pdata->stream_standby(pdata->priv_data, 0);
|
||||
}
|
||||
|
||||
static void dw_mipi_dsi_bridge_disable(struct drm_bridge *bridge)
|
||||
{
|
||||
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
|
||||
const struct dw_mipi_dsi_plat_data *pdata = dsi->plat_data;
|
||||
|
||||
if (dsi->panel)
|
||||
drm_panel_disable(dsi->panel);
|
||||
|
||||
if (pdata->stream_standby)
|
||||
pdata->stream_standby(pdata->priv_data, 1);
|
||||
|
||||
dw_mipi_dsi_disable(dsi);
|
||||
}
|
||||
|
||||
@@ -975,6 +983,10 @@ static void dw_mipi_dsi_pre_enable(struct dw_mipi_dsi *dsi)
|
||||
static void dw_mipi_dsi_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
{
|
||||
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
|
||||
const struct dw_mipi_dsi_plat_data *pdata = dsi->plat_data;
|
||||
|
||||
if (pdata->stream_standby)
|
||||
pdata->stream_standby(pdata->priv_data, 1);
|
||||
|
||||
dw_mipi_dsi_pre_enable(dsi);
|
||||
|
||||
@@ -1006,9 +1018,13 @@ static void dw_mipi_dsi_enable(struct dw_mipi_dsi *dsi)
|
||||
static void dw_mipi_dsi_bridge_enable(struct drm_bridge *bridge)
|
||||
{
|
||||
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
|
||||
const struct dw_mipi_dsi_plat_data *pdata = dsi->plat_data;
|
||||
|
||||
dw_mipi_dsi_enable(dsi);
|
||||
|
||||
if (pdata->stream_standby)
|
||||
pdata->stream_standby(pdata->priv_data, 0);
|
||||
|
||||
if (dsi->panel)
|
||||
drm_panel_enable(dsi->panel);
|
||||
|
||||
|
||||
@@ -1101,6 +1101,15 @@ static int dw_mipi_dsi_rockchip_component_del(struct dw_mipi_dsi_rockchip *dsi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
dw_mipi_dsi_rockchip_stream_standby(void *priv_data, bool standby)
|
||||
{
|
||||
struct dw_mipi_dsi_rockchip *dsi = priv_data;
|
||||
struct drm_encoder *encoder = &dsi->encoder;
|
||||
|
||||
rockchip_drm_crtc_standby(encoder->crtc, standby);
|
||||
}
|
||||
|
||||
static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -1209,6 +1218,10 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
|
||||
dsi->pdata.max_data_lanes = dsi->cdata->max_data_lanes;
|
||||
dsi->pdata.phy_ops = &dw_mipi_dsi_rockchip_phy_ops;
|
||||
dsi->pdata.priv_data = dsi;
|
||||
|
||||
if (dsi->cdata->soc_type == RK3568)
|
||||
dsi->pdata.stream_standby = dw_mipi_dsi_rockchip_stream_standby;
|
||||
|
||||
platform_set_drvdata(pdev, dsi);
|
||||
|
||||
dsi->dmd = dw_mipi_dsi_probe(pdev, &dsi->pdata);
|
||||
|
||||
@@ -55,6 +55,7 @@ struct dw_mipi_dsi_plat_data {
|
||||
|
||||
const struct dw_mipi_dsi_phy_ops *phy_ops;
|
||||
const struct dw_mipi_dsi_host_ops *host_ops;
|
||||
void (*stream_standby)(void *priv_data, bool standby);
|
||||
|
||||
void *priv_data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user