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>
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;
}