diff options
author | Dave Airlie <airlied@redhat.com> | 2015-11-13 03:08:19 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-11-13 03:08:19 +0300 |
commit | f20780f3e8feec0eebcf9fb41e1d90202fffaeff (patch) | |
tree | 301d2f9d42df4d9903e1cf168318abc3bd439e3e /drivers/gpu/drm/sti/sti_drv.c | |
parent | a18e2fa5e670a1b84e66522b221c42875b02028a (diff) | |
parent | e00fe64a5ccd94590e1c3325346b60aa0ffdc1ff (diff) | |
download | linux-f20780f3e8feec0eebcf9fb41e1d90202fffaeff.tar.xz |
Merge branch 'drm-sti-next-2015-11-03' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next
sti/drm changes
Add better support for firmware loading
lots of fixes.
* 'drm-sti-next-2015-11-03' of http://git.linaro.org/people/benjamin.gaignard/kernel:
drm/sti: load HQVDP firmware the first time HQVDP's plane is used
drm/sti: fix typo issue in sti_mode_config_init
drm/sti: set mixer background color through module param
drm/sti: Remove local fbdev emulation Kconfig option
drm/sti: remove redundant sign extensions
drm/sti: hdmi use of_get_i2c_adapter_by_node interface
drm/sti: hdmi fix i2c adapter device refcounting
drm/sti: Do not export symbols
drm/sti: Build monolithic driver
drm/sti: Use drm_crtc_vblank_*() API
drm/sti: Store correct CRTC index in events
drm/sti: Select FW_LOADER
drm/sti: Constify function pointer structs
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, return 0; } -static struct drm_mode_config_funcs sti_mode_config_funcs = { +static const struct drm_mode_config_funcs sti_mode_config_funcs = { .fb_create = drm_fb_cma_create, .atomic_check = drm_atomic_helper_check, .atomic_commit = sti_atomic_commit, @@ -123,8 +123,8 @@ static void sti_mode_config_init(struct drm_device *dev) * this value would be used to check framebuffer size limitation * at drm_mode_addfb(). */ - dev->mode_config.max_width = STI_MAX_FB_HEIGHT; - dev->mode_config.max_height = STI_MAX_FB_WIDTH; + dev->mode_config.max_width = STI_MAX_FB_WIDTH; + dev->mode_config.max_height = STI_MAX_FB_HEIGHT; dev->mode_config.funcs = &sti_mode_config_funcs; } @@ -160,11 +160,10 @@ static int sti_load(struct drm_device *dev, unsigned long flags) drm_mode_config_reset(dev); -#ifdef CONFIG_DRM_STI_FBDEV drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc, dev->mode_config.num_connector); -#endif + return 0; } @@ -287,7 +286,29 @@ static struct platform_driver sti_platform_driver = { }, }; -module_platform_driver(sti_platform_driver); +static struct platform_driver * const drivers[] = { + &sti_tvout_driver, + &sti_vtac_driver, + &sti_hqvdp_driver, + &sti_hdmi_driver, + &sti_hda_driver, + &sti_dvo_driver, + &sti_vtg_driver, + &sti_compositor_driver, + &sti_platform_driver, +}; + +static int sti_drm_init(void) +{ + return platform_register_drivers(drivers, ARRAY_SIZE(drivers)); +} +module_init(sti_drm_init); + +static void sti_drm_exit(void) +{ + platform_unregister_drivers(drivers, ARRAY_SIZE(drivers)); +} +module_exit(sti_drm_exit); MODULE_AUTHOR("Benjamin Gaignard <benjamin.gaignard@st.com>"); MODULE_DESCRIPTION("STMicroelectronics SoC DRM driver"); |