Skip to contentSkip to conversation

drm/exynos: fimd: Keep power enabled during fimd_bind

PATCH In review Tushar Behera 2 participants 2 messages Jul 4, 2014 – Jul 8, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/exynos: fimd: Keep power enabled during fimd_bind

Under some conditions (when IOMMU is enabled), fimd_bind() accesses hardware registers and power-domain should be enabled during that time.

fimd_bind --> fimd_mgr_initialize --> fimd_clear_channel

If the power-domain is disabled by that time, we get a boot-time crash. It would be better to keep power-domain enabled explicitly.

Unhandled fault: external abort on non-linefetch (0x1008) at 0xf0180034

Internal error: : 1008 [#1] PREEMPT SMP ARM

...
PC is at fimd_bind+0x84/0x134
LR is at component_bind_all+0xb4/0x1d8

---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +4 -0
index 33161ad..34275fb 100644
@@ -888,11 +888,15 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
 	struct fimd_context *ctx = fimd_manager.ctx;
 	struct drm_device *drm_dev = data;
 
+	pm_runtime_get_sync(dev);
+
 	fimd_mgr_initialize(&fimd_manager, drm_dev);
 	exynos_drm_crtc_create(&fimd_manager);
 	if (ctx->display)
 		exynos_drm_create_enc_conn(drm_dev, ctx->display);
 
+	pm_runtime_put_sync(dev);
+
 	return 0;
 
 }
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

Thanks for patch.

2014-07-04 19:33 GMT+09:00 Tushar Behera <[email protected]>:

Quoted 24 lines

Under some conditions (when IOMMU is enabled), fimd_bind() accesses hardware registers and power-domain should be enabled during that time.

fimd_bind --> fimd_mgr_initialize --> fimd_clear_channel

If the power-domain is disabled by that time, we get a boot-time crash. It would be better to keep power-domain enabled explicitly.

Unhandled fault: external abort on non-linefetch (0x1008) at 0xf0180034

Internal error: : 1008 [#1] PREEMPT SMP ARM

...
PC is at fimd_bind+0x84/0x134
LR is at component_bind_all+0xb4/0x1d8

---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +0 -0
index 33161ad..34275fb 100644

drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_bind(struct device *dev, struct device *master, void *data) · line 892

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +2 -0
@@ -888,11 +888,15 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
        struct fimd_context *ctx = fimd_manager.ctx;
        struct drm_device *drm_dev = data;
 
+       pm_runtime_get_sync(dev);
+

fimd driver has no runtime pm interfaces so pm_runtime_get_sync call will enable lcd0 power domain. So shouldn't fimd clock also be enabled?

drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_bind(struct device *dev, struct device *master, void *data) · line 893

Quoted 1 line
drivers/gpu/drm/exynos/exynos_drm_fimd.c +0 -0
        fimd_mgr_initialize(&fimd_manager, drm_dev);

And here would be good to call clk_disable_unprepare() and pm_runtime_put_sync(). Below codes don't access any fimd register. Or move these function calls into fimd_mgr_initialize().

Thanks,
Inki Dae

Quoted 16 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +2 -1
        exynos_drm_crtc_create(&fimd_manager);
        if (ctx->display)
                exynos_drm_create_enc_conn(drm_dev, ctx->display);
 
+       pm_runtime_put_sync(dev);
+
        return 0;
 
 }
--

1.7.9.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel