Lines Matching refs:drm

24 #include <drm/drm_atomic_helper.h>
25 #include <drm/drm_crtc.h>
26 #include <drm/drm_debugfs.h>
27 #include <drm/drm_drv.h>
28 #include <drm/drm_fb_cma_helper.h>
29 #include <drm/drm_fb_helper.h>
30 #include <drm/drm_gem_cma_helper.h>
31 #include <drm/drm_gem_framebuffer_helper.h>
32 #include <drm/drm_irq.h>
33 #include <drm/drm_modeset_helper.h>
34 #include <drm/drm_of.h>
35 #include <drm/drm_probe_helper.h>
36 #include <drm/drm_vblank.h>
41 static int hdlcd_load(struct drm_device *drm, unsigned long flags)
43 struct hdlcd_drm_private *hdlcd = drm->dev_private;
44 struct platform_device *pdev = to_platform_device(drm->dev);
49 hdlcd->clk = devm_clk_get(drm->dev, "pxlclk");
61 hdlcd->mmio = devm_ioremap_resource(drm->dev, res);
79 ret = of_reserved_mem_device_init(drm->dev);
83 ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32));
87 ret = hdlcd_setup_crtc(drm);
93 ret = drm_irq_install(drm, platform_get_irq(pdev, 0));
104 of_reserved_mem_device_release(drm->dev);
115 static void hdlcd_setup_mode_config(struct drm_device *drm)
117 drm_mode_config_init(drm);
118 drm->mode_config.min_width = 0;
119 drm->mode_config.min_height = 0;
120 drm->mode_config.max_width = HDLCD_MAX_XRES;
121 drm->mode_config.max_height = HDLCD_MAX_YRES;
122 drm->mode_config.funcs = &hdlcd_mode_config_funcs;
127 struct drm_device *drm = arg;
128 struct hdlcd_drm_private *hdlcd = drm->dev_private;
156 static void hdlcd_irq_preinstall(struct drm_device *drm)
158 struct hdlcd_drm_private *hdlcd = drm->dev_private;
164 static int hdlcd_irq_postinstall(struct drm_device *drm)
167 struct hdlcd_drm_private *hdlcd = drm->dev_private;
178 static void hdlcd_irq_uninstall(struct drm_device *drm)
180 struct hdlcd_drm_private *hdlcd = drm->dev_private;
199 struct drm_device *drm = node->minor->dev;
200 struct hdlcd_drm_private *hdlcd = drm->dev_private;
212 struct drm_device *drm = node->minor->dev;
213 struct hdlcd_drm_private *hdlcd = drm->dev_private;
257 struct drm_device *drm;
265 drm = drm_dev_alloc(&hdlcd_driver, dev);
266 if (IS_ERR(drm))
267 return PTR_ERR(drm);
269 drm->dev_private = hdlcd;
270 dev_set_drvdata(dev, drm);
272 hdlcd_setup_mode_config(drm);
273 ret = hdlcd_load(drm, 0);
280 ret = component_bind_all(dev, drm);
292 ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
298 drm_mode_config_reset(drm);
299 drm_kms_helper_poll_init(drm);
301 ret = drm_dev_register(drm, 0);
305 drm_fbdev_generic_setup(drm, 32);
310 drm_kms_helper_poll_fini(drm);
312 pm_runtime_disable(drm->dev);
314 drm_atomic_helper_shutdown(drm);
315 component_unbind_all(dev, drm);
319 drm_irq_uninstall(drm);
320 of_reserved_mem_device_release(drm->dev);
322 drm_mode_config_cleanup(drm);
324 drm_dev_put(drm);
331 struct drm_device *drm = dev_get_drvdata(dev);
332 struct hdlcd_drm_private *hdlcd = drm->dev_private;
334 drm_dev_unregister(drm);
335 drm_kms_helper_poll_fini(drm);
336 component_unbind_all(dev, drm);
340 drm_atomic_helper_shutdown(drm);
341 drm_irq_uninstall(drm);
346 drm_mode_config_cleanup(drm);
347 drm->dev_private = NULL;
349 drm_dev_put(drm);
393 struct drm_device *drm = dev_get_drvdata(dev);
395 return drm_mode_config_helper_suspend(drm);
400 struct drm_device *drm = dev_get_drvdata(dev);
402 drm_mode_config_helper_resume(drm);