diff options
author | Hyungwon Hwang <human.hwang@samsung.com> | 2015-06-09 11:24:21 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:45:41 +0900 |
commit | 245174640ea9c89f17a78c9ba2dea4fb399260de (patch) | |
tree | a630cbe7695446da740ae2c698bd9f2926195ee6 /drivers/gpu/drm/exynos/exynos_drm_dsi.c | |
parent | 14d2e08d4b9fc9457fad0a00ef059b1f14485b93 (diff) |
drm/exynos: dsi: introduce new state for video output availability
Because DSIM_STATE_ENABLED becomes to represent whether DSI can be used
for data transfer or not, this state can be used for checking whether
video ouput is available or not anymore. So new state have to be
introduced. The stete DSIM_STATE_VIDOUT_AVAILABLE represents whether
DSI is prepared for outputting video to a panel or not.
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_dsi.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 887957efd0e1..f89018b1e22a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -241,6 +241,7 @@ struct exynos_dsi_transfer { #define DSIM_STATE_ENABLED BIT(0) #define DSIM_STATE_INITIALIZED BIT(1) #define DSIM_STATE_CMD_LPM BIT(2) +#define DSIM_STATE_VIDOUT_AVAILABLE BIT(3) struct exynos_dsi_driver_data { unsigned int *regs; @@ -1268,8 +1269,7 @@ static irqreturn_t exynos_dsi_te_irq_handler(int irq, void *dev_id) struct exynos_dsi *dsi = (struct exynos_dsi *)dev_id; struct drm_encoder *encoder = dsi->display.encoder; - if ((dsi->state & DSIM_STATE_ENABLED) && - (dsi->state & DSIM_STATE_INITIALIZED)) + if (dsi->state & DSIM_STATE_VIDOUT_AVAILABLE) exynos_drm_crtc_te_handler(encoder->crtc); return IRQ_HANDLED; @@ -1545,6 +1545,8 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi) return ret; } + dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE; + return 0; } @@ -1553,6 +1555,8 @@ static void exynos_dsi_disable(struct exynos_dsi *dsi) if (!(dsi->state & DSIM_STATE_ENABLED)) return; + dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; + drm_panel_disable(dsi->panel); exynos_dsi_set_display_enable(dsi, false); drm_panel_unprepare(dsi->panel); |