From 22a689c14e209999ab8a26e81809c2b8b7d2443f Mon Sep 17 00:00:00 2001 From: Joonyoung Shim Date: Mon, 8 Jun 2015 15:10:31 +0900 Subject: [PATCH] drm/exynos: mixer: set the framebuffer source size by 0 when a layer is disabled Repeately turning on and off a layer, sometimes page fault occurs. This problem seems to happen, because of H/W malfunction during turning on the layer. But it can be solved by setting the framebuffer source size by 0. Kernel dump: [ 24.646472] PAGE FAULT occurred at 0x23000000 by 14650000.sysmmu(Page table base: 0x6d924000) [ 24.653515] Lv1 entry: 0x6e3b1001 [ 24.656945] ------------[ cut here ]------------ [ 24.661485] kernel BUG at drivers/iommu/exynos-iommu.c:358! [ 24.667030] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM [ 24.672836] Modules linked in: [ 24.675872] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-00007-g838e0df #136 [ 24.683145] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 24.689214] task: c0e1aff0 ti: c0e0c000 task.ti: c0e0c000 [ 24.694597] PC is at exynos_sysmmu_irq+0x1b8/0x2c4 [ 24.699358] LR is at vprintk_emit+0x2a0/0x550 [ 24.703684] pc : [] lr : [] psr: 60070193 [ 24.703684] sp : c0e0dd90 ip : 00000000 fp : c0e0ddcc [ 24.715121] r10: ee22e610 r9 : 00000000 r8 : ee22e628 [ 24.720321] r7 : ed875810 r6 : 23000000 r5 : ed924000 r4 : 00000000 [ 24.726820] r3 : c0e98098 r2 : 00000000 r1 : 00000000 r0 : ed6819c0 [ 24.733321] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 24.740685] Control: 10c5387d Table: 6cb8c06a DAC: 00000015 [ 24.746403] Process swapper/0 (pid: 0, stack limit = 0xc0e0c210) [ 24.752383] Stack: (0xc0e0dd90 to 0xc0e0e000) [ 24.756718] dd80: c0e0dd9c c0932868 ffff28da 6d924000 [ 24.764864] dda0: ffff2990 ee22d8c0 ee22f060 00000049 c0e34e34 c0e0c000 00000000 00000000 [ 24.773009] ddc0: c0e0de14 c0e0ddd0 c0071fd8 c036e384 ffffffff 7fffffff c0e0ddf4 ee22f000 [ 24.781155] dde0: c0e95dfc c0e95de8 c0e0de14 ee22f000 ee22f060 ee22d8c0 c0e34e34 ee004670 [ 24.789300] de00: ee010800 c0e0df00 c0e0de34 c0e0de18 c007221c c0071f80 ee22f000 ee22f060 [ 24.797446] de20: 00000017 c0e34e34 c0e0de4c c0e0de38 c007520c c00721dc 00000049 ee0283c0 [ 24.805591] de40: c0e0de64 c0e0de50 c0071540 c0075144 0000001c ee0283c0 c0e0de8c c0e0de68 [ 24.813737] de60: c02fe7e8 c0071510 00000017 00000000 00000017 00000000 00000001 ee010800 [ 24.821882] de80: c0e0dea4 c0e0de90 c0071540 c02fe750 c0e08a1c 00000000 c0e0ded4 c0e0dea8 [ 24.830028] dea0: c0071880 c0071510 c0e0df00 f000200c 00000017 c0e140a8 c0e0df00 f0002000 [ 24.838173] dec0: c0e96374 c0936d0c c0e0defc c0e0ded8 c0008734 c0071800 c0010d88 60070013 [ 24.846319] dee0: ffffffff c0e0df34 00000001 c0e96374 c0e0df54 c0e0df00 c0014780 c0008700 [ 24.854464] df00: 00000001 00000000 00000000 c0020720 c0e0c000 c0e13530 00000000 00000000 [ 24.862610] df20: 00000001 c0e96374 c0936d0c c0e0df54 c0e0df58 c0e0df48 c0010d84 c0010d88 [ 24.870755] df40: 60070013 ffffffff c0e0df94 c0e0df58 c00626d8 c0010d4c 00000001 c0eb1f00 [ 24.878901] df60: c0e95ab0 c0e0df70 c0e1353c c0e0a580 00000002 c0e13e84 c0e09b88 c0e0df58 [ 24.887046] df80: c092e1b8 ffffffff c0e0dfac c0e0df98 c0928880 c00622fc c0e13e10 c0eb1f00 [ 24.895192] dfa0: c0e0dff4 c0e0dfb0 c0d57d2c c09287f8 ffffffff ffffffff c0d576ec 00000000 [ 24.903337] dfc0: 00000000 c0dc1420 00000000 c0eb22d4 c0e134c0 c0dc141c c0e1c20c 4000406a [ 24.911483] dfe0: 410fc073 00000000 00000000 c0e0dff8 40008074 c0d57968 00000000 00000000 [ 24.919641] [] (exynos_sysmmu_irq) from [] (handle_irq_event_percpu+0x64/0x25c) [ 24.928644] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x4c/0x6c) [ 24.937483] [] (handle_irq_event) from [] (handle_level_irq+0xd4/0x14c) [ 24.945802] [] (handle_level_irq) from [] (generic_handle_irq+0x3c/0x4c) [ 24.954209] [] (generic_handle_irq) from [] (combiner_handle_cascade_irq+0xa4/0x110) [ 24.963653] [] (combiner_handle_cascade_irq) from [] (generic_handle_irq+0x3c/0x4c) [ 24.973009] [] (generic_handle_irq) from [] (__handle_domain_irq+0x8c/0xfc) [ 24.981676] [] (__handle_domain_irq) from [] (gic_handle_irq+0x40/0x78) [ 24.989994] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x74) [ 24.997440] Exception stack(0xc0e0df00 to 0xc0e0df48) [ 25.002469] df00: 00000001 00000000 00000000 c0020720 c0e0c000 c0e13530 00000000 00000000 [ 25.010616] df20: 00000001 c0e96374 c0936d0c c0e0df54 c0e0df58 c0e0df48 c0010d84 c0010d88 [ 25.018757] df40: 60070013 ffffffff [ 25.022234] [] (__irq_svc) from [] (arch_cpu_idle+0x48/0x4c) [ 25.029595] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x3e8/0x4bc) [ 25.037837] [] (cpu_startup_entry) from [] (rest_init+0x94/0x98) [ 25.045544] [] (rest_init) from [] (start_kernel+0x3d0/0x3dc) [ 25.052992] Code: e34c30e9 e5932004 e3520000 ca000018 (e7f001f2) [ 25.059058] ---[ end trace 91806a51727d6586 ]--- Change-Id: Ic134f206721e33335962d7e941741331ec72672b Signed-off-by: Joonyoung Shim Signed-off-by: Hyungwon Hwang --- drivers/gpu/drm/exynos/exynos_mixer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 9510ca5f7ca844..368b1698e0bdee 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -987,6 +987,7 @@ static void mixer_win_disable(struct exynos_drm_crtc *crtc, unsigned int win) mixer_vsync_set_update(mixer_ctx, false); mixer_cfg_layer(mixer_ctx, win, false); + mixer_reg_write(res, MXR_GRAPHIC_WH(win), 0); mixer_vsync_set_update(mixer_ctx, true); spin_unlock_irqrestore(&res->reg_slock, flags);