Lines Matching refs:drm

24 #include <drm/drm_aperture.h>
25 #include <drm/drm_atomic_helper.h>
26 #include <drm/drm_crtc.h>
27 #include <drm/drm_debugfs.h>
28 #include <drm/drm_drv.h>
29 #include <drm/drm_fbdev_dma.h>
30 #include <drm/drm_gem_dma_helper.h>
31 #include <drm/drm_gem_framebuffer_helper.h>
32 #include <drm/drm_modeset_helper.h>
33 #include <drm/drm_module.h>
34 #include <drm/drm_of.h>
35 #include <drm/drm_probe_helper.h>
36 #include <drm/drm_vblank.h>
99 static int hdlcd_load(struct drm_device *drm, unsigned long flags)
101 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm);
102 struct platform_device *pdev = to_platform_device(drm->dev);
106 hdlcd->clk = devm_clk_get(drm->dev, "pxlclk");
135 ret = of_reserved_mem_device_init(drm->dev);
139 ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32));
143 ret = hdlcd_setup_crtc(drm);
165 of_reserved_mem_device_release(drm->dev);
176 static int hdlcd_setup_mode_config(struct drm_device *drm)
180 ret = drmm_mode_config_init(drm);
184 drm->mode_config.min_width = 0;
185 drm->mode_config.min_height = 0;
186 drm->mode_config.max_width = HDLCD_MAX_XRES;
187 drm->mode_config.max_height = HDLCD_MAX_YRES;
188 drm->mode_config.funcs = &hdlcd_mode_config_funcs;
197 struct drm_device *drm = entry->dev;
198 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm);
210 struct drm_device *drm = entry->dev;
211 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm);
241 struct drm_device *drm;
249 drm = &hdlcd->base;
251 dev_set_drvdata(dev, drm);
253 ret = hdlcd_setup_mode_config(drm);
257 ret = hdlcd_load(drm, 0);
264 ret = component_bind_all(dev, drm);
276 ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
291 drm_mode_config_reset(drm);
292 drm_kms_helper_poll_init(drm);
295 drm_debugfs_add_files(drm, hdlcd_debugfs_list, ARRAY_SIZE(hdlcd_debugfs_list));
298 ret = drm_dev_register(drm, 0);
302 drm_fbdev_dma_setup(drm, 32);
307 drm_kms_helper_poll_fini(drm);
309 pm_runtime_disable(drm->dev);
311 drm_atomic_helper_shutdown(drm);
312 component_unbind_all(dev, drm);
317 of_reserved_mem_device_release(drm->dev);
325 struct drm_device *drm = dev_get_drvdata(dev);
326 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm);
328 drm_dev_unregister(drm);
329 drm_kms_helper_poll_fini(drm);
330 component_unbind_all(dev, drm);
334 drm_atomic_helper_shutdown(drm);
383 struct drm_device *drm = dev_get_drvdata(dev);
385 return drm_mode_config_helper_suspend(drm);
390 struct drm_device *drm = dev_get_drvdata(dev);
392 drm_mode_config_helper_resume(drm);