linux/drivers/gpu/drm/exynos
Andrzej Hajda 6a3b45ada9 drm/exynos/mixer: fix MIXER shadow registry synchronisation code
MIXER on Exynos5 SoCs uses different synchronisation method than Exynos4
to update internal state (shadow registers).
Apparently the driver implements it incorrectly. The rule should be
as follows:
- do not request updating registers until previous request was finished,
  ie. MXR_CFG_LAYER_UPDATE_COUNT must be 0.
- before setting registers synchronisation on VSYNC should be turned off,
  ie. MXR_STATUS_SYNC_ENABLE should be reset,
- after finishing MXR_STATUS_SYNC_ENABLE should be set again.
The patch hopefully implements it correctly.
Below sample kernel log from page fault caused by the bug:

[   25.670038] exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0x2247b800
[   25.677888] ------------[ cut here ]------------
[   25.682164] kernel BUG at ../drivers/iommu/exynos-iommu.c:450!
[   25.687971] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[   25.693778] Modules linked in:
[   25.696816] CPU: 5 PID: 1553 Comm: fb-release_test Not tainted 5.0.0-rc7-01157-g5f86b1566bdd #136
[   25.705646] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[   25.711710] PC is at exynos_sysmmu_irq+0x1c0/0x264
[   25.716470] LR is at lock_is_held_type+0x44/0x64

v2: added missing MXR_CFG_LAYER_UPDATE bit setting in mixer_enable_sync

Reported-by: Marian Mihailescu <mihailescu2m@gmail.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2019-03-21 09:47:29 +09:00
..
Kconfig drm/exynos/iommu: remove DRM_EXYNOS_IOMMU Kconfig symbol 2018-12-04 13:23:17 +09:00
Makefile drm/exynos/iommu: merge IOMMU and DMA code 2018-12-04 13:23:17 +09:00
exynos7_drm_decon.c drm/exynos/iommu: integrate IOMMU/DMA internal API 2018-12-04 13:23:17 +09:00
exynos5433_drm_decon.c drm/exynos: decon: Make pixel blend mode configurable 2018-12-05 17:26:16 +09:00
exynos_dp.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_drm_crtc.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_drm_crtc.h drm/exynos: use helper to set possible crtcs 2017-08-25 11:26:10 +09:00
exynos_drm_dma.c drm/exynos/iommu: merge IOMMU and DMA code 2018-12-04 13:23:17 +09:00
exynos_drm_dpi.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_drm_drv.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_drm_drv.h drm/exynos/iommu: integrate IOMMU/DMA internal API 2018-12-04 13:23:17 +09:00
exynos_drm_dsi.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_drm_fb.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_drm_fb.h Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-01-17 13:40:25 -08:00
exynos_drm_fbdev.c drm/<drivers>: Don't set FBINFO_(FLAG_)DEFAULT 2019-01-29 10:56:42 +01:00
exynos_drm_fbdev.h gpu/drm/exynos: Convert drm_atomic_helper_suspend/resume() 2018-09-20 17:19:25 +09:00
exynos_drm_fimc.c drm/exynos/iommu: integrate IOMMU/DMA internal API 2018-12-04 13:23:17 +09:00
exynos_drm_fimd.c drm/exynos: fimd: Make pixel blend mode configurable 2018-12-14 15:46:15 +09:00
exynos_drm_g2d.c drm/exynos/iommu: integrate IOMMU/DMA internal API 2018-12-04 13:23:17 +09:00
exynos_drm_g2d.h drm/exynos: g2d: Convert to driver component API 2018-07-24 15:40:29 +09:00
exynos_drm_gem.c drm/exynos/iommu: integrate IOMMU/DMA internal API 2018-12-04 13:23:17 +09:00
exynos_drm_gem.h drm/exynos: gem: Simplify access to exynos GEM objects 2018-07-24 15:46:46 +09:00
exynos_drm_gsc.c drm/exynos/iommu: integrate IOMMU/DMA internal API 2018-12-04 13:23:17 +09:00
exynos_drm_ipp.c drm/exynos: Use common exynos_drm_gem_get()/put() functions for GEM lookup 2018-07-24 15:50:20 +09:00
exynos_drm_ipp.h drm/exynos: ipp: Add IPP v2 framework 2018-05-10 08:48:53 +09:00
exynos_drm_mic.c drm: bridge: Constify mode arguments to bridge .mode_set() operation 2019-01-14 03:51:14 +02:00
exynos_drm_plane.c drm/exynos: mixer: Make plane alpha configurable 2018-10-01 11:49:59 +09:00
exynos_drm_plane.h drm/exynos: set plane possible_crtcs in exynos_plane_init 2017-06-01 16:21:34 +09:00
exynos_drm_rotator.c drm/exynos: rotator: Add support for s5pv210 2019-02-07 19:59:38 +09:00
exynos_drm_scaler.c drm/exynos: Change Andrzej Pietrasiewicz's e-mail address 2019-02-07 19:59:44 +09:00
exynos_drm_vidi.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_drm_vidi.h
exynos_hdmi.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
exynos_mixer.c drm/exynos/mixer: fix MIXER shadow registry synchronisation code 2019-03-21 09:47:29 +09:00
regs-decon7.h drm/exynos/decon: Add include guard to the Exynos7 header 2018-01-02 08:38:49 +09:00
regs-decon5433.h drm/exynos: decon: Make pixel blend mode configurable 2018-12-05 17:26:16 +09:00
regs-fimc.h drm/exynos: fix comparison to bitshift when dealing with a mask 2018-02-20 09:16:18 +09:00
regs-gsc.h drm/exynos: gsc: Fix support for NV16/61, YUV420/YVU420 and YUV422 modes 2018-06-29 18:02:57 +09:00
regs-hdmi.h drm: exynos: Use proper macro definition for HDMI_I2S_PIN_SEL_1 2018-02-20 10:51:36 +09:00
regs-mixer.h drm/exynos: mixer: Fix color range setting 2018-12-05 17:35:21 +09:00
regs-rotator.h
regs-scaler.h drm/exynos: Change Andrzej Pietrasiewicz's e-mail address 2019-02-07 19:59:44 +09:00
regs-vp.h