Lines Matching full:ldb
26 #include "imx-ldb-helper.h"
36 #define DRIVER_NAME "imx8qxp-ldb"
45 struct ldb base;
60 static inline struct imx8qxp_ldb *base_to_imx8qxp_ldb(struct ldb *base) in base_to_imx8qxp_ldb()
88 struct ldb *ldb = ldb_ch->ldb; in imx8qxp_ldb_bridge_atomic_check() local
91 struct imx8qxp_ldb *imx8qxp_ldb = base_to_imx8qxp_ldb(ldb); in imx8qxp_ldb_bridge_atomic_check()
130 struct ldb *ldb = ldb_ch->ldb; in imx8qxp_ldb_bridge_mode_set() local
133 struct imx8qxp_ldb *imx8qxp_ldb = base_to_imx8qxp_ldb(ldb); in imx8qxp_ldb_bridge_mode_set()
171 ldb->ldb_ctrl &= ~LDB_CH_SEL; in imx8qxp_ldb_bridge_mode_set()
173 ldb->ldb_ctrl |= LDB_CH_SEL; in imx8qxp_ldb_bridge_mode_set()
177 ldb->ldb_ctrl |= LDB_DI0_VS_POL_ACT_LOW; in imx8qxp_ldb_bridge_mode_set()
179 ldb->ldb_ctrl |= LDB_DI1_VS_POL_ACT_LOW; in imx8qxp_ldb_bridge_mode_set()
186 regmap_write(ldb->regmap, ldb->ctrl_reg, ldb->ldb_ctrl); in imx8qxp_ldb_bridge_mode_set()
191 regmap_update_bits(ldb->regmap, SS_CTRL, CH_VSYNC_M(chno), 0); in imx8qxp_ldb_bridge_mode_set()
193 regmap_update_bits(ldb->regmap, SS_CTRL, in imx8qxp_ldb_bridge_mode_set()
197 regmap_update_bits(ldb->regmap, SS_CTRL, CH_HSYNC_M(chno), 0); in imx8qxp_ldb_bridge_mode_set()
199 regmap_update_bits(ldb->regmap, SS_CTRL, in imx8qxp_ldb_bridge_mode_set()
211 struct ldb *ldb = ldb_ch->ldb; in imx8qxp_ldb_bridge_atomic_pre_enable() local
212 struct imx8qxp_ldb *imx8qxp_ldb = base_to_imx8qxp_ldb(ldb); in imx8qxp_ldb_bridge_atomic_pre_enable()
228 struct ldb *ldb = ldb_ch->ldb; in imx8qxp_ldb_bridge_atomic_enable() local
231 struct imx8qxp_ldb *imx8qxp_ldb = base_to_imx8qxp_ldb(ldb); in imx8qxp_ldb_bridge_atomic_enable()
238 ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK; in imx8qxp_ldb_bridge_atomic_enable()
239 ldb->ldb_ctrl |= imx8qxp_ldb_ch->di_id == 0 ? in imx8qxp_ldb_bridge_atomic_enable()
243 ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK; in imx8qxp_ldb_bridge_atomic_enable()
244 ldb->ldb_ctrl |= imx8qxp_ldb_ch->di_id == 0 ? in imx8qxp_ldb_bridge_atomic_enable()
263 struct ldb *ldb = ldb_ch->ldb; in imx8qxp_ldb_bridge_atomic_disable() local
266 struct imx8qxp_ldb *imx8qxp_ldb = base_to_imx8qxp_ldb(ldb); in imx8qxp_ldb_bridge_atomic_disable()
475 /* Locate the companion LDB for dual-link operation, if any. */ in imx8qxp_ldb_parse_dt_companion()
476 companion = of_parse_phandle(dev->of_node, "fsl,companion-ldb", 0); in imx8qxp_ldb_parse_dt_companion()
481 DRM_DEV_ERROR(dev, "companion LDB is not available\n"); in imx8qxp_ldb_parse_dt_companion()
492 DRM_DEV_ERROR(dev, "companion LDB is incompatible\n"); in imx8qxp_ldb_parse_dt_companion()
519 "failed to find companion LDB channel port\n"); in imx8qxp_ldb_parse_dt_companion()
528 * even pixels than we need to enable LDB split mode. in imx8qxp_ldb_parse_dt_companion()
584 struct ldb *ldb; in imx8qxp_ldb_probe() local
612 ldb = &imx8qxp_ldb->base; in imx8qxp_ldb_probe()
613 ldb->dev = dev; in imx8qxp_ldb_probe()
614 ldb->ctrl_reg = 0xe0; in imx8qxp_ldb_probe()
617 ldb->channel[i] = &imx8qxp_ldb->channel[i].base; in imx8qxp_ldb_probe()
619 ret = ldb_init_helper(ldb); in imx8qxp_ldb_probe()
623 if (ldb->available_ch_cnt == 0) { in imx8qxp_ldb_probe()
626 } else if (ldb->available_ch_cnt > 1) { in imx8qxp_ldb_probe()
628 ldb->available_ch_cnt); in imx8qxp_ldb_probe()
651 ret = ldb_find_next_bridge_helper(ldb); in imx8qxp_ldb_probe()
666 ldb_add_bridge_helper(ldb, &imx8qxp_ldb_bridge_funcs); in imx8qxp_ldb_probe()
674 struct ldb *ldb = &imx8qxp_ldb->base; in imx8qxp_ldb_remove() local
676 ldb_remove_bridge_helper(ldb); in imx8qxp_ldb_remove()
689 struct ldb *ldb = &imx8qxp_ldb->base; in imx8qxp_ldb_runtime_resume() local
691 /* disable LDB by resetting the control register to POR default */ in imx8qxp_ldb_runtime_resume()
692 regmap_write(ldb->regmap, ldb->ctrl_reg, 0); in imx8qxp_ldb_runtime_resume()
703 { .compatible = "fsl,imx8qxp-ldb" },
719 MODULE_DESCRIPTION("i.MX8QXP LVDS Display Bridge(LDB)/Pixel Mapper bridge driver");