diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 2b287d2fc92e..068381337d4f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -50,6 +50,9 @@ | |||
50 | 50 | ||
51 | #define VBLANK_OFF_DELAY 50000 | 51 | #define VBLANK_OFF_DELAY 50000 |
52 | 52 | ||
53 | /* platform device pointer for eynos drm device. */ | ||
54 | static struct platform_device *exynos_drm_pdev; | ||
55 | |||
53 | static int exynos_drm_load(struct drm_device *dev, unsigned long flags) | 56 | static int exynos_drm_load(struct drm_device *dev, unsigned long flags) |
54 | { | 57 | { |
55 | struct exynos_drm_private *private; | 58 | struct exynos_drm_private *private; |
@@ -296,6 +299,7 @@ static int exynos_drm_platform_probe(struct platform_device *pdev) | |||
296 | { | 299 | { |
297 | DRM_DEBUG_DRIVER("%s\n", __FILE__); | 300 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
298 | 301 | ||
302 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
299 | exynos_drm_driver.num_ioctls = DRM_ARRAY_SIZE(exynos_ioctls); | 303 | exynos_drm_driver.num_ioctls = DRM_ARRAY_SIZE(exynos_ioctls); |
300 | 304 | ||
301 | return drm_platform_init(&exynos_drm_driver, pdev); | 305 | return drm_platform_init(&exynos_drm_driver, pdev); |
@@ -357,11 +361,21 @@ static int __init exynos_drm_init(void) | |||
357 | 361 | ||
358 | ret = platform_driver_register(&exynos_drm_platform_driver); | 362 | ret = platform_driver_register(&exynos_drm_platform_driver); |
359 | if (ret < 0) | 363 | if (ret < 0) |
364 | goto out_drm; | ||
365 | |||
366 | exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1, | ||
367 | NULL, 0); | ||
368 | if (IS_ERR_OR_NULL(exynos_drm_pdev)) { | ||
369 | ret = PTR_ERR(exynos_drm_pdev); | ||
360 | goto out; | 370 | goto out; |
371 | } | ||
361 | 372 | ||
362 | return 0; | 373 | return 0; |
363 | 374 | ||
364 | out: | 375 | out: |
376 | platform_driver_unregister(&exynos_drm_platform_driver); | ||
377 | |||
378 | out_drm: | ||
365 | #ifdef CONFIG_DRM_EXYNOS_G2D | 379 | #ifdef CONFIG_DRM_EXYNOS_G2D |
366 | platform_driver_unregister(&g2d_driver); | 380 | platform_driver_unregister(&g2d_driver); |
367 | out_g2d: | 381 | out_g2d: |
@@ -392,6 +406,8 @@ static void __exit exynos_drm_exit(void) | |||
392 | { | 406 | { |
393 | DRM_DEBUG_DRIVER("%s\n", __FILE__); | 407 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
394 | 408 | ||
409 | platform_device_unregister(exynos_drm_pdev); | ||
410 | |||
395 | platform_driver_unregister(&exynos_drm_platform_driver); | 411 | platform_driver_unregister(&exynos_drm_platform_driver); |
396 | 412 | ||
397 | #ifdef CONFIG_DRM_EXYNOS_G2D | 413 | #ifdef CONFIG_DRM_EXYNOS_G2D |