diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2014-09-18 04:50:35 -0400 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2014-09-19 11:56:39 -0400 |
commit | 4a3ffedda2bdadf7ae315ae5f5f74477635d6bd6 (patch) | |
tree | c3a9f101e44ca07f297bf2b06f20524e19a93165 /drivers/gpu | |
parent | ad279310d7133805e8353d36fbf65d923bc2e228 (diff) |
drm/exynos: factor out initial setting of each driver
From fimd driver and vidi driver, dev->irq_enabled and
dev->vblank_disable_allowed are set and also mixer needs them even if
missed. It's duplicated so set them when loads drm driver.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_vidi.c | 17 |
3 files changed, 17 insertions, 34 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 9b00e4ecdb3a..2103d970d6ea 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -116,6 +116,23 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) | |||
116 | /* force connectors detection */ | 116 | /* force connectors detection */ |
117 | drm_helper_hpd_irq_event(dev); | 117 | drm_helper_hpd_irq_event(dev); |
118 | 118 | ||
119 | /* | ||
120 | * enable drm irq mode. | ||
121 | * - with irq_enabled = true, we can use the vblank feature. | ||
122 | * | ||
123 | * P.S. note that we wouldn't use drm irq handler but | ||
124 | * just specific driver own one instead because | ||
125 | * drm framework supports only one irq handler. | ||
126 | */ | ||
127 | dev->irq_enabled = true; | ||
128 | |||
129 | /* | ||
130 | * with vblank_disable_allowed = true, vblank interrupt will be disabled | ||
131 | * by drm timer once a current process gives up ownership of | ||
132 | * vblank event.(after drm_vblank_put function is called) | ||
133 | */ | ||
134 | dev->vblank_disable_allowed = true; | ||
135 | |||
119 | return 0; | 136 | return 0; |
120 | 137 | ||
121 | err_unbind_all: | 138 | err_unbind_all: |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 2f896df2a734..6fee63c985b8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -260,23 +260,6 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr, | |||
260 | mgr->drm_dev = ctx->drm_dev = drm_dev; | 260 | mgr->drm_dev = ctx->drm_dev = drm_dev; |
261 | mgr->pipe = ctx->pipe = priv->pipe++; | 261 | mgr->pipe = ctx->pipe = priv->pipe++; |
262 | 262 | ||
263 | /* | ||
264 | * enable drm irq mode. | ||
265 | * - with irq_enabled = true, we can use the vblank feature. | ||
266 | * | ||
267 | * P.S. note that we wouldn't use drm irq handler but | ||
268 | * just specific driver own one instead because | ||
269 | * drm framework supports only one irq handler. | ||
270 | */ | ||
271 | drm_dev->irq_enabled = true; | ||
272 | |||
273 | /* | ||
274 | * with vblank_disable_allowed = true, vblank interrupt will be disabled | ||
275 | * by drm timer once a current process gives up ownership of | ||
276 | * vblank event.(after drm_vblank_put function is called) | ||
277 | */ | ||
278 | drm_dev->vblank_disable_allowed = true; | ||
279 | |||
280 | /* attach this sub driver to iommu mapping if supported. */ | 263 | /* attach this sub driver to iommu mapping if supported. */ |
281 | if (is_drm_iommu_supported(ctx->drm_dev)) { | 264 | if (is_drm_iommu_supported(ctx->drm_dev)) { |
282 | /* | 265 | /* |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 9528d81d8004..2e6120b5e74f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c | |||
@@ -303,23 +303,6 @@ static int vidi_mgr_initialize(struct exynos_drm_manager *mgr, | |||
303 | mgr->drm_dev = ctx->drm_dev = drm_dev; | 303 | mgr->drm_dev = ctx->drm_dev = drm_dev; |
304 | mgr->pipe = ctx->pipe = priv->pipe++; | 304 | mgr->pipe = ctx->pipe = priv->pipe++; |
305 | 305 | ||
306 | /* | ||
307 | * enable drm irq mode. | ||
308 | * - with irq_enabled = 1, we can use the vblank feature. | ||
309 | * | ||
310 | * P.S. note that we wouldn't use drm irq handler but | ||
311 | * just specific driver own one instead because | ||
312 | * drm framework supports only one irq handler. | ||
313 | */ | ||
314 | drm_dev->irq_enabled = 1; | ||
315 | |||
316 | /* | ||
317 | * with vblank_disable_allowed = 1, vblank interrupt will be disabled | ||
318 | * by drm timer once a current process gives up ownership of | ||
319 | * vblank event.(after drm_vblank_put function is called) | ||
320 | */ | ||
321 | drm_dev->vblank_disable_allowed = 1; | ||
322 | |||
323 | return 0; | 306 | return 0; |
324 | } | 307 | } |
325 | 308 | ||