Lines Matching refs:ddev
71 static int drv_load(struct drm_device *ddev) in drv_load() argument
73 struct platform_device *pdev = to_platform_device(ddev->dev); in drv_load()
79 ldev = drmm_kzalloc(ddev, sizeof(*ldev), GFP_KERNEL); in drv_load()
83 ddev->dev_private = (void *)ldev; in drv_load()
85 ret = drmm_mode_config_init(ddev); in drv_load()
94 ddev->mode_config.min_width = 0; in drv_load()
95 ddev->mode_config.min_height = 0; in drv_load()
96 ddev->mode_config.max_width = STM_MAX_FB_WIDTH; in drv_load()
97 ddev->mode_config.max_height = STM_MAX_FB_HEIGHT; in drv_load()
98 ddev->mode_config.funcs = &drv_mode_config_funcs; in drv_load()
99 ddev->mode_config.normalize_zpos = true; in drv_load()
101 ret = ltdc_load(ddev); in drv_load()
105 drm_mode_config_reset(ddev); in drv_load()
106 drm_kms_helper_poll_init(ddev); in drv_load()
108 platform_set_drvdata(pdev, ddev); in drv_load()
113 static void drv_unload(struct drm_device *ddev) in drv_unload() argument
117 drm_kms_helper_poll_fini(ddev); in drv_unload()
118 drm_atomic_helper_shutdown(ddev); in drv_unload()
119 ltdc_unload(ddev); in drv_unload()
124 struct drm_device *ddev = dev_get_drvdata(dev); in drv_suspend() local
125 struct ltdc_device *ldev = ddev->dev_private; in drv_suspend()
130 state = drm_atomic_helper_suspend(ddev); in drv_suspend()
142 struct drm_device *ddev = dev_get_drvdata(dev); in drv_resume() local
143 struct ltdc_device *ldev = ddev->dev_private; in drv_resume()
150 ret = drm_atomic_helper_resume(ddev, ldev->suspend_state); in drv_resume()
161 struct drm_device *ddev = dev_get_drvdata(dev); in drv_runtime_suspend() local
164 ltdc_suspend(ddev); in drv_runtime_suspend()
171 struct drm_device *ddev = dev_get_drvdata(dev); in drv_runtime_resume() local
174 return ltdc_resume(ddev); in drv_runtime_resume()
186 struct drm_device *ddev; in stm_drm_platform_probe() local
197 ddev = drm_dev_alloc(&drv_driver, dev); in stm_drm_platform_probe()
198 if (IS_ERR(ddev)) in stm_drm_platform_probe()
199 return PTR_ERR(ddev); in stm_drm_platform_probe()
201 ret = drv_load(ddev); in stm_drm_platform_probe()
205 ret = drm_dev_register(ddev, 0); in stm_drm_platform_probe()
209 drm_fbdev_dma_setup(ddev, 16); in stm_drm_platform_probe()
214 drv_unload(ddev); in stm_drm_platform_probe()
216 drm_dev_put(ddev); in stm_drm_platform_probe()
223 struct drm_device *ddev = platform_get_drvdata(pdev); in stm_drm_platform_remove() local
227 drm_dev_unregister(ddev); in stm_drm_platform_remove()
228 drv_unload(ddev); in stm_drm_platform_remove()
229 drm_dev_put(ddev); in stm_drm_platform_remove()