VIGS: workaround for qHD (540x960) video mode
authorVasiliy Ulyanov <v.ulyanov@samsung.com>
Wed, 11 Mar 2015 02:47:27 +0000 (11:47 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Wed, 11 Mar 2015 02:50:08 +0000 (11:50 +0900)
Horizontal resolution was rounded up to 544 (GTF algorithm). It was
causing wrong rendering on emulator (black screen).

Change-Id: I15de1b24773c955c470db49f0ebb080f2e823989
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
drivers/gpu/drm/vigs/vigs_output.c

index fffcb70..77b83b1 100644 (file)
@@ -101,7 +101,16 @@ static int vigs_connector_get_modes(struct drm_connector *connector)
             struct drm_display_mode *preferred_mode =
                 drm_mode_create_from_cmdline_mode(drm_dev,
                                                   &cmdline_mode);
+
+            /* qHD workaround (540x960) */
+            if (cmdline_mode.xres == 540 && cmdline_mode.yres == 960) {
+                preferred_mode->hdisplay = cmdline_mode.xres;
+                preferred_mode->hsync_start = preferred_mode->hsync_start - 1;
+                preferred_mode->hsync_end = preferred_mode->hsync_end - 1;
+            }
+
             preferred_mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER;
+            drm_mode_set_crtcinfo(preferred_mode, CRTC_INTERLACE_HALVE_V);
             drm_mode_probed_add(connector, preferred_mode);
             return 1;
         }