Lines Matching full:lcdc
2 * SuperH Mobile LCDC Framebuffer
147 * struct sh_mobile_lcdc_overlay - LCDC display overlay
149 * @channel: LCDC channel this overlay belongs to
217 int forced_fourcc; /* 2 channel LCDC must share fourcc setting */
290 iowrite32(data, chan->lcdc->base + chan->reg_offs[reg_nr]); in lcdc_write_chan()
292 iowrite32(data, chan->lcdc->base + chan->reg_offs[reg_nr] + in lcdc_write_chan()
299 iowrite32(data, chan->lcdc->base + chan->reg_offs[reg_nr] + in lcdc_write_chan_mirror()
306 return ioread32(chan->lcdc->base + chan->reg_offs[reg_nr]); in lcdc_read_chan()
312 iowrite32(data, ovl->channel->lcdc->base + reg); in lcdc_write_overlay()
313 iowrite32(data, ovl->channel->lcdc->base + reg + SIDE_B_OFFSET); in lcdc_write_overlay()
400 lcdc_write(ch->lcdc, _LDDWD0R, data | LDDWDxR_WDACT); in lcdc_sys_write_index()
401 lcdc_wait_bit(ch->lcdc, _LDSR, LDSR_AS, 0); in lcdc_sys_write_index()
402 lcdc_write(ch->lcdc, _LDDWAR, LDDWAR_WA | in lcdc_sys_write_index()
404 lcdc_wait_bit(ch->lcdc, _LDSR, LDSR_AS, 0); in lcdc_sys_write_index()
411 lcdc_write(ch->lcdc, _LDDWD0R, data | LDDWDxR_WDACT | LDDWDxR_RSW); in lcdc_sys_write_data()
412 lcdc_wait_bit(ch->lcdc, _LDSR, LDSR_AS, 0); in lcdc_sys_write_data()
413 lcdc_write(ch->lcdc, _LDDWAR, LDDWAR_WA | in lcdc_sys_write_data()
415 lcdc_wait_bit(ch->lcdc, _LDSR, LDSR_AS, 0); in lcdc_sys_write_data()
422 lcdc_write(ch->lcdc, _LDDRDR, LDDRDR_RSR); in lcdc_sys_read_data()
423 lcdc_wait_bit(ch->lcdc, _LDSR, LDSR_AS, 0); in lcdc_sys_read_data()
424 lcdc_write(ch->lcdc, _LDDRAR, LDDRAR_RA | in lcdc_sys_read_data()
427 lcdc_wait_bit(ch->lcdc, _LDSR, LDSR_AS, 0); in lcdc_sys_read_data()
429 return lcdc_read(ch->lcdc, _LDDRDR) & LDDRDR_DRD_MASK; in lcdc_sys_read_data()
460 sh_mobile_lcdc_clk_on(ch->lcdc); in sh_mobile_lcdc_deferred_io()
481 dma_map_sg(ch->lcdc->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); in sh_mobile_lcdc_deferred_io()
485 dma_unmap_sg(ch->lcdc->dev, ch->sglist, nr_pages, in sh_mobile_lcdc_deferred_io()
517 /* HDMI must be enabled before LCDC configuration */ in sh_mobile_lcdc_display_on()
680 ldintr = lcdc_read(ch->lcdc, _LDINTR); in sh_mobile_lcdc_wait_for_vsync()
682 lcdc_write(ch->lcdc, _LDINTR, ldintr); in sh_mobile_lcdc_wait_for_vsync()
698 /* start or stop the lcdc */ in sh_mobile_lcdc_start_stop()
778 lcdc_write(ovl->channel->lcdc, LDBCR, LDBCR_UPC(ovl->index)); in sh_mobile_lcdc_overlay_setup()
780 lcdc_write(ovl->channel->lcdc, LDBCR, in sh_mobile_lcdc_overlay_setup()
843 lcdc_write(ovl->channel->lcdc, LDBCR, LDBCR_UPC(ovl->index)); in sh_mobile_lcdc_overlay_setup()
859 lcdc_write(ovl->channel->lcdc, LDBCR, in sh_mobile_lcdc_overlay_setup()
864 * __sh_mobile_lcdc_start - Configure and start the LCDC
865 * @priv: LCDC device
867 * Configure all enabled channels and start the LCDC device. All external
876 /* Enable LCDC channels. Read data from external memory, avoid using the in __sh_mobile_lcdc_start()
881 /* Stop the LCDC first and disable all interrupts. */ in __sh_mobile_lcdc_start()
941 /* When using deferred I/O mode, configure the LCDC for one-shot in __sh_mobile_lcdc_start()
1030 /* Start the LCDC. */ in sh_mobile_lcdc_start()
1092 /* stop the lcdc */ in sh_mobile_lcdc_stop()
1353 .id = "SH Mobile LCDC",
1400 lcdc_write(ovl->channel->lcdc, LDBCR, LDBCR_UPC(ovl->index)); in sh_mobile_lcdc_overlay_pan()
1405 lcdc_write(ovl->channel->lcdc, LDBCR, in sh_mobile_lcdc_overlay_pan()
1487 return dma_mmap_coherent(ovl->channel->lcdc->dev, vma, ovl->fb_mem, in sh_mobile_lcdc_overlay_mmap()
1517 struct sh_mobile_lcdc_priv *lcdc = ovl->channel->lcdc; in sh_mobile_lcdc_overlay_fb_register() local
1529 dev_info(lcdc->dev, "registered %s/overlay %u as %dx%d %dbpp.\n", in sh_mobile_lcdc_overlay_fb_register()
1530 dev_name(lcdc->dev), ovl->index, info->var.xres, in sh_mobile_lcdc_overlay_fb_register()
1556 struct sh_mobile_lcdc_priv *priv = ovl->channel->lcdc; in sh_mobile_lcdc_overlay_fb_init()
1647 .id = "SH Mobile LCDC",
1682 struct sh_mobile_lcdc_priv *priv = ch->lcdc; in sh_mobile_lcdc_pan()
1722 lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_SRS); in sh_mobile_lcdc_pan()
1724 lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_MRS); in sh_mobile_lcdc_pan()
1821 struct sh_mobile_lcdc_priv *p = ch->lcdc; in sh_mobile_lcdc_check_var()
1878 sh_mobile_lcdc_stop(ch->lcdc); in sh_mobile_lcdc_set_par()
1893 ret = sh_mobile_lcdc_start(ch->lcdc); in sh_mobile_lcdc_set_par()
1895 dev_err(info->dev, "%s: unable to restart LCDC\n", __func__); in sh_mobile_lcdc_set_par()
1921 struct sh_mobile_lcdc_priv *p = ch->lcdc; in sh_mobile_lcdc_blank()
1963 return dma_mmap_coherent(ch->lcdc->dev, vma, ch->fb_mem, in sh_mobile_lcdc_mmap()
2010 dev_info(ch->lcdc->dev, "registered %s/%s as %dx%d %dbpp.\n", in sh_mobile_lcdc_channel_fb_register()
2011 dev_name(ch->lcdc->dev), (ch->cfg->chan == LCDC_CHAN_MAINLCD) ? in sh_mobile_lcdc_channel_fb_register()
2017 sh_mobile_lcdc_clk_off(ch->lcdc); in sh_mobile_lcdc_channel_fb_register()
2041 struct sh_mobile_lcdc_priv *priv = ch->lcdc; in sh_mobile_lcdc_channel_fb_init()
2197 /* turn off LCDC hardware */ in sh_mobile_lcdc_runtime_suspend()
2271 ch->tx_dev->lcdc = NULL; in sh_mobile_lcdc_remove()
2347 struct device *dev = ovl->channel->lcdc->dev; in sh_mobile_lcdc_overlay_init()
2403 struct device *dev = ch->lcdc->dev; in sh_mobile_lcdc_channel_init()
2492 ch->tx_dev->lcdc = ch; in sh_mobile_lcdc_channel_init()
2543 ch->lcdc = priv; in sh_mobile_lcdc_probe()
2578 /* for dual channel LCDC (MAIN + SUB) force shared format setting */ in sh_mobile_lcdc_probe()
2656 MODULE_DESCRIPTION("SuperH Mobile LCDC Framebuffer driver");