Lines Matching full:drm

14 #include <drm/drm_atomic_helper.h>
15 #include <drm/drm_drv.h>
16 #include <drm/drm_gem_dma_helper.h>
17 #include <drm/drm_gem_framebuffer_helper.h>
18 #include <drm/drm_of.h>
19 #include <drm/drm_probe_helper.h>
20 #include <drm/drm_vblank.h>
25 #define DRIVER_DESC "Spreadtrum SoCs' DRM Driver"
40 static void sprd_drm_mode_config_init(struct drm_device *drm) in sprd_drm_mode_config_init() argument
42 drm->mode_config.min_width = 0; in sprd_drm_mode_config_init()
43 drm->mode_config.min_height = 0; in sprd_drm_mode_config_init()
44 drm->mode_config.max_width = 8192; in sprd_drm_mode_config_init()
45 drm->mode_config.max_height = 8192; in sprd_drm_mode_config_init()
47 drm->mode_config.funcs = &sprd_drm_mode_config_funcs; in sprd_drm_mode_config_init()
48 drm->mode_config.helper_private = &sprd_drm_mode_config_helper; in sprd_drm_mode_config_init()
70 struct drm_device *drm; in sprd_drm_bind() local
74 sprd = devm_drm_dev_alloc(dev, &sprd_drm_drv, struct sprd_drm, drm); in sprd_drm_bind()
78 drm = &sprd->drm; in sprd_drm_bind()
79 platform_set_drvdata(pdev, drm); in sprd_drm_bind()
81 ret = drmm_mode_config_init(drm); in sprd_drm_bind()
85 sprd_drm_mode_config_init(drm); in sprd_drm_bind()
88 ret = component_bind_all(drm->dev, drm); in sprd_drm_bind()
90 drm_err(drm, "failed to bind all component.\n"); in sprd_drm_bind()
95 ret = drm_vblank_init(drm, drm->mode_config.num_crtc); in sprd_drm_bind()
97 drm_err(drm, "failed to initialize vblank.\n"); in sprd_drm_bind()
102 drm_mode_config_reset(drm); in sprd_drm_bind()
105 drm_kms_helper_poll_init(drm); in sprd_drm_bind()
107 ret = drm_dev_register(drm, 0); in sprd_drm_bind()
114 drm_kms_helper_poll_fini(drm); in sprd_drm_bind()
116 component_unbind_all(drm->dev, drm); in sprd_drm_bind()
122 struct drm_device *drm = dev_get_drvdata(dev); in sprd_drm_unbind() local
124 drm_dev_unregister(drm); in sprd_drm_unbind()
126 drm_kms_helper_poll_fini(drm); in sprd_drm_unbind()
128 component_unbind_all(drm->dev, drm); in sprd_drm_unbind()
148 struct drm_device *drm = platform_get_drvdata(pdev); in sprd_drm_shutdown() local
150 if (!drm) { in sprd_drm_shutdown()
151 dev_warn(&pdev->dev, "drm device is not available, no shutdown\n"); in sprd_drm_shutdown()
155 drm_atomic_helper_shutdown(drm); in sprd_drm_shutdown()
169 .name = "sprd-drm-drv",
200 MODULE_DESCRIPTION("Unisoc DRM KMS Master Driver");