Lines Matching refs:dc
119 static void dc_link_event(struct ipu_dc *dc, int event, int addr, int priority) in dc_link_event() argument
123 reg = readl(dc->base + DC_RL_CH(event)); in dc_link_event()
126 writel(reg, dc->base + DC_RL_CH(event)); in dc_link_event()
129 static void dc_write_tmpl(struct ipu_dc *dc, int word, u32 opcode, u32 operand, in dc_write_tmpl() argument
132 struct ipu_dc_priv *priv = dc->priv; in dc_write_tmpl()
169 int ipu_dc_init_sync(struct ipu_dc *dc, struct ipu_di *di, bool interlaced, in ipu_dc_init_sync() argument
172 struct ipu_dc_priv *priv = dc->priv; in ipu_dc_init_sync()
176 dc->di = ipu_di_get_num(di); in ipu_dc_init_sync()
185 dc_link_event(dc, DC_EVT_NL, 0, 3); in ipu_dc_init_sync()
186 dc_link_event(dc, DC_EVT_EOL, 0, 2); in ipu_dc_init_sync()
187 dc_link_event(dc, DC_EVT_NEW_DATA, 0, 1); in ipu_dc_init_sync()
190 dc_write_tmpl(dc, 0, WROD(0), 0, map, SYNC_WAVE, 0, 8, 1); in ipu_dc_init_sync()
192 if (dc->di) { in ipu_dc_init_sync()
193 dc_link_event(dc, DC_EVT_NL, 2, 3); in ipu_dc_init_sync()
194 dc_link_event(dc, DC_EVT_EOL, 3, 2); in ipu_dc_init_sync()
195 dc_link_event(dc, DC_EVT_NEW_DATA, 1, 1); in ipu_dc_init_sync()
197 dc_write_tmpl(dc, 2, WROD(0), 0, map, SYNC_WAVE, 8, 5, 1); in ipu_dc_init_sync()
198 dc_write_tmpl(dc, 3, WROD(0), 0, map, SYNC_WAVE, 4, 5, 0); in ipu_dc_init_sync()
199 dc_write_tmpl(dc, 4, WRG, 0, map, NULL_WAVE, 0, 0, 1); in ipu_dc_init_sync()
200 dc_write_tmpl(dc, 1, WROD(0), 0, map, SYNC_WAVE, 0, 5, 1); in ipu_dc_init_sync()
202 dc_link_event(dc, DC_EVT_NL, 5, 3); in ipu_dc_init_sync()
203 dc_link_event(dc, DC_EVT_EOL, 6, 2); in ipu_dc_init_sync()
204 dc_link_event(dc, DC_EVT_NEW_DATA, 8, 1); in ipu_dc_init_sync()
206 dc_write_tmpl(dc, 5, WROD(0), 0, map, SYNC_WAVE, 8, 5, 1); in ipu_dc_init_sync()
207 dc_write_tmpl(dc, 6, WROD(0), 0, map, SYNC_WAVE, 4, 5, 0); in ipu_dc_init_sync()
208 dc_write_tmpl(dc, 7, WRG, 0, map, NULL_WAVE, 0, 0, 1); in ipu_dc_init_sync()
209 dc_write_tmpl(dc, 8, WROD(0), 0, map, SYNC_WAVE, 0, 5, 1); in ipu_dc_init_sync()
212 dc_link_event(dc, DC_EVT_NF, 0, 0); in ipu_dc_init_sync()
213 dc_link_event(dc, DC_EVT_NFIELD, 0, 0); in ipu_dc_init_sync()
214 dc_link_event(dc, DC_EVT_EOF, 0, 0); in ipu_dc_init_sync()
215 dc_link_event(dc, DC_EVT_EOFIELD, 0, 0); in ipu_dc_init_sync()
216 dc_link_event(dc, DC_EVT_NEW_CHAN, 0, 0); in ipu_dc_init_sync()
217 dc_link_event(dc, DC_EVT_NEW_ADDR, 0, 0); in ipu_dc_init_sync()
219 reg = readl(dc->base + DC_WR_CH_CONF); in ipu_dc_init_sync()
224 writel(reg, dc->base + DC_WR_CH_CONF); in ipu_dc_init_sync()
226 writel(0x0, dc->base + DC_WR_CH_ADDR); in ipu_dc_init_sync()
227 writel(width, priv->dc_reg + DC_DISP_CONF2(dc->di)); in ipu_dc_init_sync()
239 void ipu_dc_enable_channel(struct ipu_dc *dc) in ipu_dc_enable_channel() argument
244 di = dc->di; in ipu_dc_enable_channel()
246 reg = readl(dc->base + DC_WR_CH_CONF); in ipu_dc_enable_channel()
248 writel(reg, dc->base + DC_WR_CH_CONF); in ipu_dc_enable_channel()
254 struct ipu_dc *dc = dev_id; in dc_irq_handler() local
257 reg = readl(dc->base + DC_WR_CH_CONF); in dc_irq_handler()
259 writel(reg, dc->base + DC_WR_CH_CONF); in dc_irq_handler()
263 complete(&dc->priv->comp); in dc_irq_handler()
267 void ipu_dc_disable_channel(struct ipu_dc *dc) in ipu_dc_disable_channel() argument
269 struct ipu_dc_priv *priv = dc->priv; in ipu_dc_disable_channel()
274 if (dc->chno == 1) in ipu_dc_disable_channel()
276 else if (dc->chno == 5) in ipu_dc_disable_channel()
288 val = readl(dc->base + DC_WR_CH_CONF); in ipu_dc_disable_channel()
290 writel(val, dc->base + DC_WR_CH_CONF); in ipu_dc_disable_channel()
329 struct ipu_dc *dc; in ipu_dc_get() local
334 dc = &priv->channels[channel]; in ipu_dc_get()
338 if (dc->in_use) { in ipu_dc_get()
343 dc->in_use = true; in ipu_dc_get()
347 return dc; in ipu_dc_get()
351 void ipu_dc_put(struct ipu_dc *dc) in ipu_dc_put() argument
353 struct ipu_dc_priv *priv = dc->priv; in ipu_dc_put()
356 dc->in_use = false; in ipu_dc_put()