linux/drivers/gpu/drm/rcar-du
Kieran Bingham 5e0594fd77 drm: rcar-du: Repair vblank for DRM page flips using the VSP
The driver recently switched from handling page flip completion in the
DU vertical blanking handler to the VSP frame end handler to fix a race
condition. This unfortunately resulted in incorrect timestamps in the
vertical blanking events sent to userspace as vertical blanking is now
handled after sending the event.

To fix this we must reverse the order of the two operations. The easiest
way is to handle vertical blanking in the VSP frame end handler before
sending the event. The VSP frame end interrupt occurs approximately 50µs
earlier than the DU frame end interrupt, but this should not cause any
undue harm.

As we need to handle vertical blanking even when page flip completion is
delayed, the VSP driver now needs to call the frame end completion
callback unconditionally, with a new argument to report whether page
flip has completed.

With this new scheme the DU vertical blanking interrupt isn't needed
anymore, so we can stop enabling it.

Fixes: d503a43ac0 ("drm: rcar-du: Register a completion callback with VSP1")
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-03 16:17:30 +03:00
..
Kconfig drm: rcar-du: Add Gen3 HDMI encoder support 2017-04-04 17:04:13 +03:00
Makefile drm: rcar-du: Add Gen3 HDMI encoder support 2017-04-04 17:04:13 +03:00
rcar_du_crtc.c drm: rcar-du: Repair vblank for DRM page flips using the VSP 2017-08-03 16:17:30 +03:00
rcar_du_crtc.h drm: rcar-du: Repair vblank for DRM page flips using the VSP 2017-08-03 16:17:30 +03:00
rcar_du_drv.c drm: rcar-du: Add HDMI outputs to R8A7796 device description 2017-08-03 16:17:25 +03:00
rcar_du_drv.h drm: rcar-du: Add DPLL support 2017-04-04 17:04:19 +03:00
rcar_du_encoder.c drm: Convert to using %pOF instead of full_name 2017-07-26 13:45:06 +02:00
rcar_du_encoder.h drm: rcar-du: Hardcode encoders types to DRM_MODE_ENCODER_NONE 2017-04-04 17:04:04 +03:00
rcar_du_group.c drm: rcar-du: Configure DPAD0 routing through last group on Gen3 2017-08-03 16:17:24 +03:00
rcar_du_group.h drm: rcar-du: Restart the DU group when a plane source changes 2016-02-20 02:58:55 +02:00
rcar_du_kms.c drm: rcar-du: Wait for flip completion instead of vblank in commit tail 2017-08-03 16:17:26 +03:00
rcar_du_kms.h drm/rcar-du: Update copyright notice 2014-09-15 11:34:06 +03:00
rcar_du_lvdscon.c drm: rcar-du: Use the DRM panel API 2017-04-04 17:03:56 +03:00
rcar_du_lvdscon.h drm: rcar-du: Constify node argument to rcar_du_lvds_connector_init() 2016-11-14 03:35:12 +02:00
rcar_du_lvdsenc.c drm: rcar-du: Fix comments to comply with the kernel coding style 2017-08-03 16:17:22 +03:00
rcar_du_lvdsenc.h drm: rcar-du: Add support for LVDS mode selection 2017-04-04 17:03:57 +03:00
rcar_du_plane.c drm: rcar-du: Fix comments to comply with the kernel coding style 2017-08-03 16:17:22 +03:00
rcar_du_plane.h drm: rcar-du: Fix comments to comply with the kernel coding style 2017-08-03 16:17:22 +03:00
rcar_du_regs.h drm: rcar-du: Add DPLL support 2017-04-04 17:04:19 +03:00
rcar_du_vsp.c drm: rcar-du: Repair vblank for DRM page flips using the VSP 2017-08-03 16:17:30 +03:00
rcar_du_vsp.h drm: rcar-du: Support multiple sources from the same VSP 2017-08-03 16:17:22 +03:00
rcar_dw_hdmi.c drm: rcar-du: Remove an unneeded NULL check 2017-08-03 16:17:25 +03:00
rcar_lvds_regs.h drm: rcar-du: lvds: Add R-Car Gen3 support 2016-02-23 09:34:32 +02:00