diff options
-rw-r--r-- | drivers/gpu/imx/dpu/dpu-tcon.c | 14 | ||||
-rw-r--r-- | include/video/dpu.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/imx/dpu/dpu-tcon.c b/drivers/gpu/imx/dpu/dpu-tcon.c index efed5b74e2c0..199e6e55df15 100644 --- a/drivers/gpu/imx/dpu/dpu-tcon.c +++ b/drivers/gpu/imx/dpu/dpu-tcon.c @@ -186,6 +186,20 @@ void tcon_cfg_videomode(struct dpu_tcon *tcon, struct drm_display_mode *m) } EXPORT_SYMBOL_GPL(tcon_cfg_videomode); +bool tcon_is_master(struct dpu_tcon *tcon) +{ + const struct dpu_data *data = tcon->dpu->data; + + return tcon->id == data->master_stream_id; +} +EXPORT_SYMBOL_GPL(tcon_is_master); + +bool tcon_is_slave(struct dpu_tcon *tcon) +{ + return !tcon_is_master(tcon); +} +EXPORT_SYMBOL_GPL(tcon_is_slave); + struct dpu_tcon *dpu_tcon_get(struct dpu_soc *dpu, int id) { struct dpu_tcon *tcon; diff --git a/include/video/dpu.h b/include/video/dpu.h index 656ec850d715..b565061d1e3a 100644 --- a/include/video/dpu.h +++ b/include/video/dpu.h @@ -554,6 +554,8 @@ struct dpu_tcon; int tcon_set_fmt(struct dpu_tcon *tcon, u32 bus_format); void tcon_set_operation_mode(struct dpu_tcon *tcon); void tcon_cfg_videomode(struct dpu_tcon *tcon, struct drm_display_mode *m); +bool tcon_is_master(struct dpu_tcon *tcon); +bool tcon_is_slave(struct dpu_tcon *tcon); struct dpu_tcon *dpu_tcon_get(struct dpu_soc *dpu, int id); void dpu_tcon_put(struct dpu_tcon *tcon); struct dpu_tcon *dpu_aux_tcon_peek(struct dpu_tcon *tcon); |