Lines Matching refs:lcdif
47 static int lcdif_attach_bridge(struct lcdif_drm_private *lcdif) in lcdif_attach_bridge() argument
49 struct device *dev = lcdif->drm->dev; in lcdif_attach_bridge()
89 encoder->possible_crtcs = drm_crtc_mask(&lcdif->crtc); in lcdif_attach_bridge()
90 ret = drm_encoder_init(lcdif->drm, encoder, &lcdif_encoder_funcs, in lcdif_attach_bridge()
114 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_irq_handler() local
117 stat = readl(lcdif->base + LCDC_V8_INT_STATUS_D0); in lcdif_irq_handler()
122 reg = readl(lcdif->base + LCDC_V8_CTRLDESCL0_5); in lcdif_irq_handler()
124 drm_crtc_handle_vblank(&lcdif->crtc); in lcdif_irq_handler()
127 writel(stat, lcdif->base + LCDC_V8_INT_STATUS_D0); in lcdif_irq_handler()
135 struct lcdif_drm_private *lcdif; in lcdif_load() local
139 lcdif = devm_kzalloc(&pdev->dev, sizeof(*lcdif), GFP_KERNEL); in lcdif_load()
140 if (!lcdif) in lcdif_load()
143 lcdif->drm = drm; in lcdif_load()
144 drm->dev_private = lcdif; in lcdif_load()
147 lcdif->base = devm_ioremap_resource(drm->dev, res); in lcdif_load()
148 if (IS_ERR(lcdif->base)) in lcdif_load()
149 return PTR_ERR(lcdif->base); in lcdif_load()
151 lcdif->clk = devm_clk_get(drm->dev, "pix"); in lcdif_load()
152 if (IS_ERR(lcdif->clk)) in lcdif_load()
153 return PTR_ERR(lcdif->clk); in lcdif_load()
155 lcdif->clk_axi = devm_clk_get(drm->dev, "axi"); in lcdif_load()
156 if (IS_ERR(lcdif->clk_axi)) in lcdif_load()
157 return PTR_ERR(lcdif->clk_axi); in lcdif_load()
159 lcdif->clk_disp_axi = devm_clk_get(drm->dev, "disp_axi"); in lcdif_load()
160 if (IS_ERR(lcdif->clk_disp_axi)) in lcdif_load()
161 return PTR_ERR(lcdif->clk_disp_axi); in lcdif_load()
176 ret = lcdif_kms_init(lcdif); in lcdif_load()
189 drm_crtc_vblank_off(&lcdif->crtc); in lcdif_load()
191 ret = lcdif_attach_bridge(lcdif); in lcdif_load()
207 lcdif->irq = ret; in lcdif_load()
209 ret = devm_request_irq(drm->dev, lcdif->irq, lcdif_irq_handler, 0, in lcdif_load()
227 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_unload() local
231 drm_crtc_vblank_off(&lcdif->crtc); in lcdif_unload()
310 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_rpm_suspend() local
313 clk_disable_unprepare(lcdif->clk); in lcdif_rpm_suspend()
315 clk_disable_unprepare(lcdif->clk_disp_axi); in lcdif_rpm_suspend()
317 clk_disable_unprepare(lcdif->clk_axi); in lcdif_rpm_suspend()
325 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_rpm_resume() local
328 clk_prepare_enable(lcdif->clk_axi); in lcdif_rpm_resume()
330 clk_prepare_enable(lcdif->clk_disp_axi); in lcdif_rpm_resume()
332 clk_prepare_enable(lcdif->clk); in lcdif_rpm_resume()