This patchset has more fixes for fixing more issues related to wait for vblank.
Patch 1: add mixer apply function The mixer window enabled flag is being done in both exynos_drm_hdmi as well as exynos_mixer. This patch moves the flag to one place and adds the mixer apply function similar to fimd apply function. Patch 2: fimd: call win_disable only when window is enabled Adds a condition to call win_disable only if the window is enabled. Patch 3: enable vblank in fimd wait for vblank If vblank is disabled, then we turn enable vblank temporarily before wait for vblank and disable it afterwards. This ensures that the wait will not timeout. Patch 4: fimd: clear channel before enabling iommu This patch is required if the fimd window channel is already active before fimd probe. This could happen if we turn on fimd during uboot. This patch ensures that we do not get a page fault upon iommu initialization. If any channel is active, we disable the channel and wait for vblank. Patch 5: mixer: do not finish a pageflip if layer update in progress Exynos5 supports only 2 layer updates for mixer. This patch ensures each layer is updated only once per vsync. Also, in case a layer update is pending, the irq handler exits early. This ensures there is no corruption on screen as well as there is no page fault during buffer freeing. Patch 6: add complete_scanout interface Before freeing a framebuffer, we call complete_scanout encoder function which just calls wait for vblank of all the encoders. This is not a very optimized method since a framebuffer might not be in use by a crtc and we end up waiting for vblank unnecessarily. Instead, this patch modifies the wait_for_vblank interface to complete_scanout interface. In this function, each crtc must check if the fb is currently being used. If it is being used, it must wait for vsync (or even disable a window if necessary) and ensure that the buffer is no longer used by crtc before returning. So if a crtc is not actually reading from the buffer, the complete scanout function will just return and not wait for vsync. Patch 7: hdmi: add complete_scanout function Patch 8: fimd: add complete_scanout function These two patches add the respective complete_scanout functions for fimd and mixer. These functions check the actual base and shadow registers of fimd/mixer to see if a particular dma-address is in use and will wait_for_vblank only if it is in use. Also for mixer, if the base address matches the fb's dma address, then the window is disabled. This is because a layer update is already set when the base register was updated. So unless we disable the window, we cannot free the buffer. Akshu Agrawal (1): drm/exynos: fimd: clear channel before enabling iommu Prathyush K (6): drm/exynos: add mixer apply function drm/exynos: fimd: call win_disable only when window is enabled drm/exynos: enable vblank in fimd wait for vblank drm/exynos: add complete_scanout interface drm/exynos: hdmi: add complete_scanout function drm/exynos: fimd: add complete_scanout function Sean Paul (1): drm/exynos: mixer: do not finish a pageflip if layer update in progress drivers/gpu/drm/exynos/exynos_drm_drv.h | 7 ++- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 23 ++++---- drivers/gpu/drm/exynos/exynos_drm_encoder.h | 4 +- drivers/gpu/drm/exynos/exynos_drm_fb.c | 13 ++++- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 81 ++++++++++++++++++++++++-- drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 26 +++------ drivers/gpu/drm/exynos/exynos_drm_hdmi.h | 4 +- drivers/gpu/drm/exynos/exynos_mixer.c | 90 ++++++++++++++++++++++++++--- drivers/gpu/drm/exynos/regs-mixer.h | 1 + include/video/samsung_fimd.h | 1 + 10 files changed, 202 insertions(+), 48 deletions(-) -- 1.8.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel