drm/vc4: Workaround for crtc scanout device problem 52/310252/1 accepted/tizen/unified/20240425.114231 accepted/tizen/unified/20240426.035517 accepted/tizen/unified/toolchain/20240427.045702 accepted/tizen/unified/x/20240426.050316
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Wed, 24 Apr 2024 11:38:09 +0000 (20:38 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 24 Apr 2024 11:39:28 +0000 (20:39 +0900)
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: I4d8bfa245e257dbdbc6d9d3809d55225091b77cd
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/gpu/drm/vc4/vc4_crtc.c

index b86b5dc..1bd52a1 100644 (file)
@@ -206,7 +206,13 @@ static bool vc4_crtc_get_scanout_position(struct drm_crtc *crtc,
                 * 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;