drm/vc4: Workaround for crtc scanout device problem 43/147043/6
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 7 Sep 2017 07:24:56 +0000 (16:24 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 8 Sep 2017 06:21:13 +0000 (06:21 +0000)
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 <hoegeun.kwon@samsung.com>
drivers/gpu/drm/vc4/vc4_crtc.c

index a4937e2..16060c2 100644 (file)
@@ -243,7 +243,13 @@ int 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;