From 0910c239c7c47b5deb4a6d776ef68186d61b924e Mon Sep 17 00:00:00 2001 From: Hoegeun Kwon Date: Thu, 7 Sep 2017 16:24:56 +0900 Subject: [PATCH] drm/vc4: Workaround for crtc scanout device problem Currently, the crtc device does not start a scanout, the time of vblank is always calculated as future value. As a workaround, always change vpos to a positive number. Change-Id: I02527a0cfbd03d7713fa992d8ee039ffc8e0c5de Signed-off-by: Hoegeun Kwon --- drivers/gpu/drm/vc4/vc4_crtc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index c230c0a..7925b7d 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -174,7 +174,13 @@ bool vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, * contention on event_lock or vblank_time lock in * the core. */ - *vpos = -vblank_lines; + /* + * The scanout does not occur due to device problem. + * Fixed vpos to a positive value with workaround. + * TODO. This issue should be corrected. + * We should check the scanout action of the crtc device. + */ + *vpos = vblank_lines; if (stime) *stime = vc4_crtc->t_vblank; -- 2.7.4