Lines Matching refs:imx_ldb_ch
94 static void imx_ldb_ch_set_bus_format(struct imx_ldb_channel *imx_ldb_ch, in imx_ldb_ch_set_bus_format() argument
97 struct imx_ldb *ldb = imx_ldb_ch->ldb; in imx_ldb_ch_set_bus_format()
104 if (imx_ldb_ch->chno == 0 || dual) in imx_ldb_ch_set_bus_format()
106 if (imx_ldb_ch->chno == 1 || dual) in imx_ldb_ch_set_bus_format()
110 if (imx_ldb_ch->chno == 0 || dual) in imx_ldb_ch_set_bus_format()
113 if (imx_ldb_ch->chno == 1 || dual) in imx_ldb_ch_set_bus_format()
150 struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder); in imx_ldb_encoder_enable() local
151 struct imx_ldb *ldb = imx_ldb_ch->ldb; in imx_ldb_encoder_enable()
153 int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder); in imx_ldb_encoder_enable()
167 clk_set_parent(ldb->clk_sel[mux], ldb->clk[imx_ldb_ch->chno]); in imx_ldb_encoder_enable()
170 if (imx_ldb_ch == &ldb->channel[0] || dual) { in imx_ldb_encoder_enable()
177 if (imx_ldb_ch == &ldb->channel[1] || dual) { in imx_ldb_encoder_enable()
188 if (imx_ldb_ch == &ldb->channel[0]) in imx_ldb_encoder_enable()
190 else if (imx_ldb_ch == &ldb->channel[1]) in imx_ldb_encoder_enable()
205 struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder); in imx_ldb_encoder_atomic_mode_set() local
207 struct imx_ldb *ldb = imx_ldb_ch->ldb; in imx_ldb_encoder_atomic_mode_set()
211 int mux = drm_of_encoder_active_port_id(imx_ldb_ch->child, encoder); in imx_ldb_encoder_atomic_mode_set()
212 u32 bus_format = imx_ldb_ch->bus_format; in imx_ldb_encoder_atomic_mode_set()
239 imx_ldb_set_clock(ldb, mux, imx_ldb_ch->chno, serial_clk, in imx_ldb_encoder_atomic_mode_set()
244 if (imx_ldb_ch == &ldb->channel[0] || dual) { in imx_ldb_encoder_atomic_mode_set()
250 if (imx_ldb_ch == &ldb->channel[1] || dual) { in imx_ldb_encoder_atomic_mode_set()
264 imx_ldb_ch_set_bus_format(imx_ldb_ch, bus_format); in imx_ldb_encoder_atomic_mode_set()
269 struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder); in imx_ldb_encoder_disable() local
270 struct imx_ldb *ldb = imx_ldb_ch->ldb; in imx_ldb_encoder_disable()
274 if (imx_ldb_ch == &ldb->channel[0] || dual) in imx_ldb_encoder_disable()
276 if (imx_ldb_ch == &ldb->channel[1] || dual) in imx_ldb_encoder_disable()
289 if (imx_ldb_ch == &ldb->channel[0]) in imx_ldb_encoder_disable()
291 else if (imx_ldb_ch == &ldb->channel[1]) in imx_ldb_encoder_disable()
298 mux = (imx_ldb_ch == &ldb->channel[0]) ? 0 : 1; in imx_ldb_encoder_disable()
314 struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder); in imx_ldb_encoder_atomic_check() local
316 u32 bus_format = imx_ldb_ch->bus_format; in imx_ldb_encoder_atomic_check()
322 bus_format = imx_ldb_ch->bus_format; in imx_ldb_encoder_atomic_check()
369 struct imx_ldb_channel *imx_ldb_ch) in imx_ldb_register() argument
371 struct imx_ldb *ldb = imx_ldb_ch->ldb; in imx_ldb_register()
382 ldb_encoder->channel = imx_ldb_ch; in imx_ldb_register()
385 ret = imx_drm_encoder_parse_of(drm, encoder, imx_ldb_ch->child); in imx_ldb_register()
389 ret = imx_ldb_get_clk(ldb, imx_ldb_ch->chno); in imx_ldb_register()
401 ret = drm_bridge_attach(encoder, imx_ldb_ch->bridge, NULL, in imx_ldb_register()