Lines Matching full:drm
22 #include <drm/drmP.h>
23 #include <drm/drm_atomic_helper.h>
24 #include <drm/drm_crtc.h>
25 #include <drm/drm_crtc_helper.h>
26 #include <drm/drm_fb_helper.h>
27 #include <drm/drm_fb_cma_helper.h>
28 #include <drm/drm_gem_cma_helper.h>
29 #include <drm/drm_gem_framebuffer_helper.h>
30 #include <drm/drm_modeset_helper.h>
31 #include <drm/drm_of.h>
36 static int hdlcd_load(struct drm_device *drm, unsigned long flags) in hdlcd_load() argument
38 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_load()
39 struct platform_device *pdev = to_platform_device(drm->dev); in hdlcd_load()
44 hdlcd->clk = devm_clk_get(drm->dev, "pxlclk"); in hdlcd_load()
56 hdlcd->mmio = devm_ioremap_resource(drm->dev, res); in hdlcd_load()
74 ret = of_reserved_mem_device_init(drm->dev); in hdlcd_load()
78 ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)); in hdlcd_load()
82 ret = hdlcd_setup_crtc(drm); in hdlcd_load()
88 ret = drm_irq_install(drm, platform_get_irq(pdev, 0)); in hdlcd_load()
99 of_reserved_mem_device_release(drm->dev); in hdlcd_load()
111 static void hdlcd_setup_mode_config(struct drm_device *drm) in hdlcd_setup_mode_config() argument
113 drm_mode_config_init(drm); in hdlcd_setup_mode_config()
114 drm->mode_config.min_width = 0; in hdlcd_setup_mode_config()
115 drm->mode_config.min_height = 0; in hdlcd_setup_mode_config()
116 drm->mode_config.max_width = HDLCD_MAX_XRES; in hdlcd_setup_mode_config()
117 drm->mode_config.max_height = HDLCD_MAX_YRES; in hdlcd_setup_mode_config()
118 drm->mode_config.funcs = &hdlcd_mode_config_funcs; in hdlcd_setup_mode_config()
123 struct drm_device *drm = arg; in hdlcd_irq() local
124 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_irq()
152 static void hdlcd_irq_preinstall(struct drm_device *drm) in hdlcd_irq_preinstall() argument
154 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_irq_preinstall()
160 static int hdlcd_irq_postinstall(struct drm_device *drm) in hdlcd_irq_postinstall() argument
163 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_irq_postinstall()
174 static void hdlcd_irq_uninstall(struct drm_device *drm) in hdlcd_irq_uninstall() argument
176 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_irq_uninstall()
195 struct drm_device *drm = node->minor->dev; in hdlcd_show_underrun_count() local
196 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_show_underrun_count()
208 struct drm_device *drm = node->minor->dev; in hdlcd_show_pxlclock() local
209 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_show_pxlclock()
259 .desc = "ARM HDLCD Controller DRM",
267 struct drm_device *drm; in hdlcd_drm_bind() local
275 drm = drm_dev_alloc(&hdlcd_driver, dev); in hdlcd_drm_bind()
276 if (IS_ERR(drm)) in hdlcd_drm_bind()
277 return PTR_ERR(drm); in hdlcd_drm_bind()
279 drm->dev_private = hdlcd; in hdlcd_drm_bind()
280 dev_set_drvdata(dev, drm); in hdlcd_drm_bind()
282 hdlcd_setup_mode_config(drm); in hdlcd_drm_bind()
283 ret = hdlcd_load(drm, 0); in hdlcd_drm_bind()
290 ret = component_bind_all(dev, drm); in hdlcd_drm_bind()
302 ret = drm_vblank_init(drm, drm->mode_config.num_crtc); in hdlcd_drm_bind()
308 drm_mode_config_reset(drm); in hdlcd_drm_bind()
309 drm_kms_helper_poll_init(drm); in hdlcd_drm_bind()
311 ret = drm_fb_cma_fbdev_init(drm, 32, 0); in hdlcd_drm_bind()
315 ret = drm_dev_register(drm, 0); in hdlcd_drm_bind()
322 drm_fb_cma_fbdev_fini(drm); in hdlcd_drm_bind()
324 drm_kms_helper_poll_fini(drm); in hdlcd_drm_bind()
326 pm_runtime_disable(drm->dev); in hdlcd_drm_bind()
328 drm_atomic_helper_shutdown(drm); in hdlcd_drm_bind()
329 component_unbind_all(dev, drm); in hdlcd_drm_bind()
333 drm_irq_uninstall(drm); in hdlcd_drm_bind()
334 of_reserved_mem_device_release(drm->dev); in hdlcd_drm_bind()
336 drm_mode_config_cleanup(drm); in hdlcd_drm_bind()
338 drm_dev_put(drm); in hdlcd_drm_bind()
345 struct drm_device *drm = dev_get_drvdata(dev); in hdlcd_drm_unbind() local
346 struct hdlcd_drm_private *hdlcd = drm->dev_private; in hdlcd_drm_unbind()
348 drm_dev_unregister(drm); in hdlcd_drm_unbind()
349 drm_fb_cma_fbdev_fini(drm); in hdlcd_drm_unbind()
350 drm_kms_helper_poll_fini(drm); in hdlcd_drm_unbind()
351 component_unbind_all(dev, drm); in hdlcd_drm_unbind()
356 drm_irq_uninstall(drm); in hdlcd_drm_unbind()
357 drm_atomic_helper_shutdown(drm); in hdlcd_drm_unbind()
362 drm_mode_config_cleanup(drm); in hdlcd_drm_unbind()
363 drm->dev_private = NULL; in hdlcd_drm_unbind()
365 drm_dev_put(drm); in hdlcd_drm_unbind()
409 struct drm_device *drm = dev_get_drvdata(dev); in hdlcd_pm_suspend() local
411 return drm_mode_config_helper_suspend(drm); in hdlcd_pm_suspend()
416 struct drm_device *drm = dev_get_drvdata(dev); in hdlcd_pm_resume() local
418 drm_mode_config_helper_resume(drm); in hdlcd_pm_resume()
438 MODULE_DESCRIPTION("ARM HDLCD DRM driver");