@@ -325,6 +325,7 @@ struct exynos_dsim_host_ops {
void (*unregister_host)(struct exynos_dsi *dsim);
int (*attach)(struct exynos_dsi *dsim, struct mipi_dsi_device *device);
int (*detach)(struct exynos_dsi *dsim, struct mipi_dsi_device *device);
+ irqreturn_t (*te_irq_handler)(struct exynos_dsi *dsim);
};
struct exynos_dsi_enc {
@@ -1333,11 +1334,10 @@ static irqreturn_t exynos_dsi_irq(int irq, void *dev_id)
static irqreturn_t exynos_dsi_te_irq_handler(int irq, void *dev_id)
{
struct exynos_dsi *dsi = (struct exynos_dsi *)dev_id;
- struct exynos_dsi_enc *dsi_enc = dsi->priv;
- struct drm_encoder *encoder = &dsi_enc->encoder;
+ const struct exynos_dsi_plat_data *pdata = dsi->plat_data;
- if (dsi->state & DSIM_STATE_VIDOUT_AVAILABLE)
- exynos_drm_crtc_te_handler(encoder->crtc);
+ if (pdata->host_ops && pdata->host_ops->te_irq_handler)
+ return pdata->host_ops->te_irq_handler(dsi);
return IRQ_HANDLED;
}
@@ -1761,6 +1761,17 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
return 0;
}
+static irqreturn_t exynos_dsim_te_irq_handler(struct exynos_dsi *dsim)
+{
+ struct exynos_dsi_enc *dsi_enc = dsim->priv;
+ struct drm_encoder *encoder = &dsi_enc->encoder;
+
+ if (dsim->state & DSIM_STATE_VIDOUT_AVAILABLE)
+ exynos_drm_crtc_te_handler(encoder->crtc);
+
+ return IRQ_HANDLED;
+}
+
static int exynos_dsim_host_attach(struct exynos_dsi *dsim,
struct mipi_dsi_device *device)
{
@@ -2075,6 +2086,7 @@ static const struct exynos_dsim_host_ops exynos_dsi_host_ops = {
.unregister_host = exynos_dsi_unregister_host,
.attach = exynos_dsim_host_attach,
.detach = exynos_dsim_host_detach,
+ .te_irq_handler = exynos_dsim_te_irq_handler,
};
static const struct exynos_dsi_plat_data exynos3250_dsi_pdata = {