aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_ipp.c
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2013-04-23 01:02:53 -0400
committerInki Dae <inki.dae@samsung.com>2013-04-29 01:35:32 -0400
commit43f4190047a088d2f1ce7fe5c5ae6485f943edc6 (patch)
tree1a4045bdd2feefa740d53d2b3d5000ba39bb2b52 /drivers/gpu/drm/exynos/exynos_drm_ipp.c
parent0f6f95922e4def60b9e55cecc1fdbaacda9c426d (diff)
drm/exynos: added ipp device registration to drm driver
This patch added exynos-drm-ipp platform device registration to the exynos drm driver. When DT is enabled, platform devices need to be registered within the driver code. This patch fits the requirement of both DT and Non DT based drm drivers. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_ipp.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 1adce07ecb5b..29d2ad314490 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -47,6 +47,9 @@
47#define get_ipp_context(dev) platform_get_drvdata(to_platform_device(dev)) 47#define get_ipp_context(dev) platform_get_drvdata(to_platform_device(dev))
48#define ipp_is_m2m_cmd(c) (c == IPP_CMD_M2M) 48#define ipp_is_m2m_cmd(c) (c == IPP_CMD_M2M)
49 49
50/* platform device pointer for ipp device. */
51static struct platform_device *exynos_drm_ipp_pdev;
52
50/* 53/*
51 * A structure of event. 54 * A structure of event.
52 * 55 *
@@ -102,6 +105,30 @@ static LIST_HEAD(exynos_drm_ippdrv_list);
102static DEFINE_MUTEX(exynos_drm_ippdrv_lock); 105static DEFINE_MUTEX(exynos_drm_ippdrv_lock);
103static BLOCKING_NOTIFIER_HEAD(exynos_drm_ippnb_list); 106static BLOCKING_NOTIFIER_HEAD(exynos_drm_ippnb_list);
104 107
108int exynos_platform_device_ipp_register(void)
109{
110 struct platform_device *pdev;
111
112 if (exynos_drm_ipp_pdev)
113 return -EEXIST;
114
115 pdev = platform_device_register_simple("exynos-drm-ipp", -1, NULL, 0);
116 if (IS_ERR(pdev))
117 return PTR_ERR(pdev);
118
119 exynos_drm_ipp_pdev = pdev;
120
121 return 0;
122}
123
124void exynos_platform_device_ipp_unregister(void)
125{
126 if (exynos_drm_ipp_pdev) {
127 platform_device_unregister(exynos_drm_ipp_pdev);
128 exynos_drm_ipp_pdev = NULL;
129 }
130}
131
105int exynos_drm_ippdrv_register(struct exynos_drm_ippdrv *ippdrv) 132int exynos_drm_ippdrv_register(struct exynos_drm_ippdrv *ippdrv)
106{ 133{
107 DRM_DEBUG_KMS("%s\n", __func__); 134 DRM_DEBUG_KMS("%s\n", __func__);