Lines Matching refs:lcdif

41 static int lcdif_attach_bridge(struct lcdif_drm_private *lcdif)  in lcdif_attach_bridge()  argument
43 struct drm_device *drm = lcdif->drm; in lcdif_attach_bridge()
51 ret = drm_bridge_attach(&lcdif->encoder, bridge, NULL, 0); in lcdif_attach_bridge()
55 lcdif->bridge = bridge; in lcdif_attach_bridge()
63 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_irq_handler() local
66 stat = readl(lcdif->base + LCDC_V8_INT_STATUS_D0); in lcdif_irq_handler()
71 reg = readl(lcdif->base + LCDC_V8_CTRLDESCL0_5); in lcdif_irq_handler()
73 drm_crtc_handle_vblank(&lcdif->crtc); in lcdif_irq_handler()
76 writel(stat, lcdif->base + LCDC_V8_INT_STATUS_D0); in lcdif_irq_handler()
84 struct lcdif_drm_private *lcdif; in lcdif_load() local
88 lcdif = devm_kzalloc(&pdev->dev, sizeof(*lcdif), GFP_KERNEL); in lcdif_load()
89 if (!lcdif) in lcdif_load()
92 lcdif->drm = drm; in lcdif_load()
93 drm->dev_private = lcdif; in lcdif_load()
96 lcdif->base = devm_ioremap_resource(drm->dev, res); in lcdif_load()
97 if (IS_ERR(lcdif->base)) in lcdif_load()
98 return PTR_ERR(lcdif->base); in lcdif_load()
100 lcdif->clk = devm_clk_get(drm->dev, "pix"); in lcdif_load()
101 if (IS_ERR(lcdif->clk)) in lcdif_load()
102 return PTR_ERR(lcdif->clk); in lcdif_load()
104 lcdif->clk_axi = devm_clk_get(drm->dev, "axi"); in lcdif_load()
105 if (IS_ERR(lcdif->clk_axi)) in lcdif_load()
106 return PTR_ERR(lcdif->clk_axi); in lcdif_load()
108 lcdif->clk_disp_axi = devm_clk_get(drm->dev, "disp_axi"); in lcdif_load()
109 if (IS_ERR(lcdif->clk_disp_axi)) in lcdif_load()
110 return PTR_ERR(lcdif->clk_disp_axi); in lcdif_load()
121 ret = lcdif_kms_init(lcdif); in lcdif_load()
134 drm_crtc_vblank_off(&lcdif->crtc); in lcdif_load()
136 ret = lcdif_attach_bridge(lcdif); in lcdif_load()
152 lcdif->irq = ret; in lcdif_load()
154 ret = devm_request_irq(drm->dev, lcdif->irq, lcdif_irq_handler, 0, in lcdif_load()
172 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_unload() local
176 drm_crtc_vblank_off(&lcdif->crtc); in lcdif_unload()
257 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_rpm_suspend() local
260 clk_disable_unprepare(lcdif->clk); in lcdif_rpm_suspend()
262 clk_disable_unprepare(lcdif->clk_disp_axi); in lcdif_rpm_suspend()
264 clk_disable_unprepare(lcdif->clk_axi); in lcdif_rpm_suspend()
272 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_rpm_resume() local
275 clk_prepare_enable(lcdif->clk_axi); in lcdif_rpm_resume()
277 clk_prepare_enable(lcdif->clk_disp_axi); in lcdif_rpm_resume()
279 clk_prepare_enable(lcdif->clk); in lcdif_rpm_resume()