diff options
Diffstat (limited to 'drivers/gpu/drm/zte/zx_drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/zte/zx_drm_drv.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c index 6f4205e80378..11ef17c2d1c1 100644 --- a/drivers/gpu/drm/zte/zx_drm_drv.c +++ b/drivers/gpu/drm/zte/zx_drm_drv.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | static const struct drm_mode_config_funcs zx_drm_mode_config_funcs = { | 32 | static const struct drm_mode_config_funcs zx_drm_mode_config_funcs = { |
33 | .fb_create = drm_gem_fb_create, | 33 | .fb_create = drm_gem_fb_create, |
34 | .output_poll_changed = drm_fb_helper_output_poll_changed, | ||
35 | .atomic_check = drm_atomic_helper_check, | 34 | .atomic_check = drm_atomic_helper_check, |
36 | .atomic_commit = drm_atomic_helper_commit, | 35 | .atomic_commit = drm_atomic_helper_commit, |
37 | }; | 36 | }; |
@@ -41,7 +40,6 @@ DEFINE_DRM_GEM_CMA_FOPS(zx_drm_fops); | |||
41 | static struct drm_driver zx_drm_driver = { | 40 | static struct drm_driver zx_drm_driver = { |
42 | .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | | 41 | .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | |
43 | DRIVER_ATOMIC, | 42 | DRIVER_ATOMIC, |
44 | .lastclose = drm_fb_helper_lastclose, | ||
45 | .gem_free_object_unlocked = drm_gem_cma_free_object, | 43 | .gem_free_object_unlocked = drm_gem_cma_free_object, |
46 | .gem_vm_ops = &drm_gem_cma_vm_ops, | 44 | .gem_vm_ops = &drm_gem_cma_vm_ops, |
47 | .dumb_create = drm_gem_cma_dumb_create, | 45 | .dumb_create = drm_gem_cma_dumb_create, |
@@ -101,20 +99,14 @@ static int zx_drm_bind(struct device *dev) | |||
101 | drm_mode_config_reset(drm); | 99 | drm_mode_config_reset(drm); |
102 | drm_kms_helper_poll_init(drm); | 100 | drm_kms_helper_poll_init(drm); |
103 | 101 | ||
104 | ret = drm_fb_cma_fbdev_init(drm, 32, 0); | ||
105 | if (ret) { | ||
106 | DRM_DEV_ERROR(dev, "failed to init cma fbdev: %d\n", ret); | ||
107 | goto out_poll_fini; | ||
108 | } | ||
109 | |||
110 | ret = drm_dev_register(drm, 0); | 102 | ret = drm_dev_register(drm, 0); |
111 | if (ret) | 103 | if (ret) |
112 | goto out_fbdev_fini; | 104 | goto out_poll_fini; |
105 | |||
106 | drm_fbdev_generic_setup(drm, 32); | ||
113 | 107 | ||
114 | return 0; | 108 | return 0; |
115 | 109 | ||
116 | out_fbdev_fini: | ||
117 | drm_fb_cma_fbdev_fini(drm); | ||
118 | out_poll_fini: | 110 | out_poll_fini: |
119 | drm_kms_helper_poll_fini(drm); | 111 | drm_kms_helper_poll_fini(drm); |
120 | drm_mode_config_cleanup(drm); | 112 | drm_mode_config_cleanup(drm); |
@@ -131,7 +123,6 @@ static void zx_drm_unbind(struct device *dev) | |||
131 | struct drm_device *drm = dev_get_drvdata(dev); | 123 | struct drm_device *drm = dev_get_drvdata(dev); |
132 | 124 | ||
133 | drm_dev_unregister(drm); | 125 | drm_dev_unregister(drm); |
134 | drm_fb_cma_fbdev_fini(drm); | ||
135 | drm_kms_helper_poll_fini(drm); | 126 | drm_kms_helper_poll_fini(drm); |
136 | drm_mode_config_cleanup(drm); | 127 | drm_mode_config_cleanup(drm); |
137 | component_unbind_all(dev, drm); | 128 | component_unbind_all(dev, drm); |
@@ -161,10 +152,8 @@ static int zx_drm_probe(struct platform_device *pdev) | |||
161 | if (ret) | 152 | if (ret) |
162 | return ret; | 153 | return ret; |
163 | 154 | ||
164 | for_each_available_child_of_node(parent, child) { | 155 | for_each_available_child_of_node(parent, child) |
165 | component_match_add(dev, &match, compare_of, child); | 156 | component_match_add(dev, &match, compare_of, child); |
166 | of_node_put(child); | ||
167 | } | ||
168 | 157 | ||
169 | return component_master_add_with_match(dev, &zx_drm_master_ops, match); | 158 | return component_master_add_with_match(dev, &zx_drm_master_ops, match); |
170 | } | 159 | } |