diff options
Diffstat (limited to 'drivers/gpu/drm/sti/sti_drv.c')
-rw-r--r-- | drivers/gpu/drm/sti/sti_drv.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index f8469967a0bf..1469987949d8 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c | |||
@@ -107,7 +107,7 @@ static int sti_atomic_commit(struct drm_device *drm, | |||
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
109 | 109 | ||
110 | static struct drm_mode_config_funcs sti_mode_config_funcs = { | 110 | static const struct drm_mode_config_funcs sti_mode_config_funcs = { |
111 | .fb_create = drm_fb_cma_create, | 111 | .fb_create = drm_fb_cma_create, |
112 | .atomic_check = drm_atomic_helper_check, | 112 | .atomic_check = drm_atomic_helper_check, |
113 | .atomic_commit = sti_atomic_commit, | 113 | .atomic_commit = sti_atomic_commit, |
@@ -123,8 +123,8 @@ static void sti_mode_config_init(struct drm_device *dev) | |||
123 | * this value would be used to check framebuffer size limitation | 123 | * this value would be used to check framebuffer size limitation |
124 | * at drm_mode_addfb(). | 124 | * at drm_mode_addfb(). |
125 | */ | 125 | */ |
126 | dev->mode_config.max_width = STI_MAX_FB_HEIGHT; | 126 | dev->mode_config.max_width = STI_MAX_FB_WIDTH; |
127 | dev->mode_config.max_height = STI_MAX_FB_WIDTH; | 127 | dev->mode_config.max_height = STI_MAX_FB_HEIGHT; |
128 | 128 | ||
129 | dev->mode_config.funcs = &sti_mode_config_funcs; | 129 | dev->mode_config.funcs = &sti_mode_config_funcs; |
130 | } | 130 | } |
@@ -160,11 +160,10 @@ static int sti_load(struct drm_device *dev, unsigned long flags) | |||
160 | 160 | ||
161 | drm_mode_config_reset(dev); | 161 | drm_mode_config_reset(dev); |
162 | 162 | ||
163 | #ifdef CONFIG_DRM_STI_FBDEV | ||
164 | drm_fbdev_cma_init(dev, 32, | 163 | drm_fbdev_cma_init(dev, 32, |
165 | dev->mode_config.num_crtc, | 164 | dev->mode_config.num_crtc, |
166 | dev->mode_config.num_connector); | 165 | dev->mode_config.num_connector); |
167 | #endif | 166 | |
168 | return 0; | 167 | return 0; |
169 | } | 168 | } |
170 | 169 | ||
@@ -287,7 +286,29 @@ static struct platform_driver sti_platform_driver = { | |||
287 | }, | 286 | }, |
288 | }; | 287 | }; |
289 | 288 | ||
290 | module_platform_driver(sti_platform_driver); | 289 | static struct platform_driver * const drivers[] = { |
290 | &sti_tvout_driver, | ||
291 | &sti_vtac_driver, | ||
292 | &sti_hqvdp_driver, | ||
293 | &sti_hdmi_driver, | ||
294 | &sti_hda_driver, | ||
295 | &sti_dvo_driver, | ||
296 | &sti_vtg_driver, | ||
297 | &sti_compositor_driver, | ||
298 | &sti_platform_driver, | ||
299 | }; | ||
300 | |||
301 | static int sti_drm_init(void) | ||
302 | { | ||
303 | return platform_register_drivers(drivers, ARRAY_SIZE(drivers)); | ||
304 | } | ||
305 | module_init(sti_drm_init); | ||
306 | |||
307 | static void sti_drm_exit(void) | ||
308 | { | ||
309 | platform_unregister_drivers(drivers, ARRAY_SIZE(drivers)); | ||
310 | } | ||
311 | module_exit(sti_drm_exit); | ||
291 | 312 | ||
292 | MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>"); | 313 | MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>"); |
293 | MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver"); | 314 | MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver"); |