Lines Matching refs:drm
99 static int hdlcd_load(struct drm_device *drm, unsigned long flags) in hdlcd_load() argument
101 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm); in hdlcd_load()
102 struct platform_device *pdev = to_platform_device(drm->dev); in hdlcd_load()
107 hdlcd->clk = devm_clk_get(drm->dev, "pxlclk"); in hdlcd_load()
119 hdlcd->mmio = devm_ioremap_resource(drm->dev, res); in hdlcd_load()
137 ret = of_reserved_mem_device_init(drm->dev); in hdlcd_load()
141 ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)); in hdlcd_load()
145 ret = hdlcd_setup_crtc(drm); in hdlcd_load()
167 of_reserved_mem_device_release(drm->dev); in hdlcd_load()
178 static int hdlcd_setup_mode_config(struct drm_device *drm) in hdlcd_setup_mode_config() argument
182 ret = drmm_mode_config_init(drm); in hdlcd_setup_mode_config()
186 drm->mode_config.min_width = 0; in hdlcd_setup_mode_config()
187 drm->mode_config.min_height = 0; in hdlcd_setup_mode_config()
188 drm->mode_config.max_width = HDLCD_MAX_XRES; in hdlcd_setup_mode_config()
189 drm->mode_config.max_height = HDLCD_MAX_YRES; in hdlcd_setup_mode_config()
190 drm->mode_config.funcs = &hdlcd_mode_config_funcs; in hdlcd_setup_mode_config()
199 struct drm_device *drm = entry->dev; in hdlcd_show_underrun_count() local
200 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm); in hdlcd_show_underrun_count()
212 struct drm_device *drm = entry->dev; in hdlcd_show_pxlclock() local
213 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm); in hdlcd_show_pxlclock()
243 struct drm_device *drm; in hdlcd_drm_bind() local
251 drm = &hdlcd->base; in hdlcd_drm_bind()
253 dev_set_drvdata(dev, drm); in hdlcd_drm_bind()
255 ret = hdlcd_setup_mode_config(drm); in hdlcd_drm_bind()
259 ret = hdlcd_load(drm, 0); in hdlcd_drm_bind()
266 ret = component_bind_all(dev, drm); in hdlcd_drm_bind()
278 ret = drm_vblank_init(drm, drm->mode_config.num_crtc); in hdlcd_drm_bind()
293 drm_mode_config_reset(drm); in hdlcd_drm_bind()
294 drm_kms_helper_poll_init(drm); in hdlcd_drm_bind()
297 drm_debugfs_add_files(drm, hdlcd_debugfs_list, ARRAY_SIZE(hdlcd_debugfs_list)); in hdlcd_drm_bind()
300 ret = drm_dev_register(drm, 0); in hdlcd_drm_bind()
304 drm_fbdev_generic_setup(drm, 32); in hdlcd_drm_bind()
309 drm_kms_helper_poll_fini(drm); in hdlcd_drm_bind()
311 pm_runtime_disable(drm->dev); in hdlcd_drm_bind()
313 drm_atomic_helper_shutdown(drm); in hdlcd_drm_bind()
314 component_unbind_all(dev, drm); in hdlcd_drm_bind()
319 of_reserved_mem_device_release(drm->dev); in hdlcd_drm_bind()
327 struct drm_device *drm = dev_get_drvdata(dev); in hdlcd_drm_unbind() local
328 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm); in hdlcd_drm_unbind()
330 drm_dev_unregister(drm); in hdlcd_drm_unbind()
331 drm_kms_helper_poll_fini(drm); in hdlcd_drm_unbind()
332 component_unbind_all(dev, drm); in hdlcd_drm_unbind()
336 drm_atomic_helper_shutdown(drm); in hdlcd_drm_unbind()
386 struct drm_device *drm = dev_get_drvdata(dev); in hdlcd_pm_suspend() local
388 return drm_mode_config_helper_suspend(drm); in hdlcd_pm_suspend()
393 struct drm_device *drm = dev_get_drvdata(dev); in hdlcd_pm_resume() local
395 drm_mode_config_helper_resume(drm); in hdlcd_pm_resume()