Skip to content

Commit 4a3ffed

Browse files
Joonyoung Shimdaeinki
authored andcommitted
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>
1 parent ad27931 commit 4a3ffed

3 files changed

Lines changed: 17 additions & 34 deletions

File tree

‎drivers/gpu/drm/exynos/exynos_drm_drv.c‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,23 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
116116
/* force connectors detection */
117117
drm_helper_hpd_irq_event(dev);
118118

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+
119136
return 0;
120137

121138
err_unbind_all:

‎drivers/gpu/drm/exynos/exynos_drm_fimd.c‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -260,23 +260,6 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr,
260260
mgr->drm_dev = ctx->drm_dev = drm_dev;
261261
mgr->pipe = ctx->pipe = priv->pipe++;
262262

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-
280263
/* attach this sub driver to iommu mapping if supported. */
281264
if (is_drm_iommu_supported(ctx->drm_dev)) {
282265
/*

‎drivers/gpu/drm/exynos/exynos_drm_vidi.c‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -303,23 +303,6 @@ static int vidi_mgr_initialize(struct exynos_drm_manager *mgr,
303303
mgr->drm_dev = ctx->drm_dev = drm_dev;
304304
mgr->pipe = ctx->pipe = priv->pipe++;
305305

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-
323306
return 0;
324307
}
325308

0 commit comments

Comments
 (0)