History

drm/exynos: init vblank with real number of crtcs

Initialization of vblank with MAX_CRTC caused attempts to disabling vblanks for non-existing crtcs in case drm used fewer crtcs. The patch fixes it.

Andrzej Hajda committed 12 years ago

Commit c52142e1 parent 10a8fce1 file · +9 −9Browse files

Unified · Split

drivers/gpu/drm/exynos/exynos_drm_drv.c+9−9
@@ -94,10 +94,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) · 93 unmodified lines
94 /* init kms poll for handling hpd */94 /* init kms poll for handling hpd */
95 drm_kms_helper_poll_init(dev);95 drm_kms_helper_poll_init(dev);
96 96
97 ret = drm_vblank_init(dev, MAX_CRTC);
98 if (ret)
99 goto err_mode_config_cleanup;
100
101 /* setup possible_clones. */97 /* setup possible_clones. */
102 exynos_drm_encoder_setup(dev);98 exynos_drm_encoder_setup(dev);
103 99
@@ -106,12 +102,16 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) · 2 unmodified lines
106 /* Try to bind all sub drivers. */102 /* Try to bind all sub drivers. */
107 ret = component_bind_all(dev->dev, dev);103 ret = component_bind_all(dev->dev, dev);
108 if (ret)104 if (ret)
109 goto err_cleanup_vblank;105 goto err_mode_config_cleanup;
106
107 ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
108 if (ret)
109 goto err_unbind_all;
110 110
111 /* Probe non kms sub drivers and virtual display driver. */111 /* Probe non kms sub drivers and virtual display driver. */
112 ret = exynos_drm_device_subdrv_probe(dev);112 ret = exynos_drm_device_subdrv_probe(dev);
113 if (ret)113 if (ret)
114 goto err_unbind_all;114 goto err_cleanup_vblank;
115 115
116 /* force connectors detection */116 /* force connectors detection */
117 drm_helper_hpd_irq_event(dev);117 drm_helper_hpd_irq_event(dev);
@@ -135,10 +135,10 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) · 17 unmodified lines
135 135
136 return 0;136 return 0;
137 137
138err_unbind_all:
139 component_unbind_all(dev->dev, dev);
140err_cleanup_vblank:138err_cleanup_vblank:
141 drm_vblank_cleanup(dev);139 drm_vblank_cleanup(dev);
140err_unbind_all:
141 component_unbind_all(dev->dev, dev);
142err_mode_config_cleanup:142err_mode_config_cleanup:
143 drm_mode_config_cleanup(dev);143 drm_mode_config_cleanup(dev);
144 drm_release_iommu_mapping(dev);144 drm_release_iommu_mapping(dev);
@@ -155,8 +155,8 @@ static int exynos_drm_unload(struct drm_device *dev) · 10 unmodified lines
155 exynos_drm_fbdev_fini(dev);155 exynos_drm_fbdev_fini(dev);
156 drm_kms_helper_poll_fini(dev);156 drm_kms_helper_poll_fini(dev);
157 157
158 component_unbind_all(dev->dev, dev);
159 drm_vblank_cleanup(dev);158 drm_vblank_cleanup(dev);
159 component_unbind_all(dev->dev, dev);
160 drm_mode_config_cleanup(dev);160 drm_mode_config_cleanup(dev);
161 drm_release_iommu_mapping(dev);161 drm_release_iommu_mapping(dev);
162 162