Add extra mode of 1280x720 as a common mode between HDMI and
FIMD which will be used in clone mode scenario.
BUG=chrome-os-partner:10851
TEST=used xrandr tool to switch LCD display resolution
between 1366x768 and 1280x720 on snow.
Change-Id: I82aa5e0e86c0471f13aeb15f834239f2759b6019
Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26846
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
-static struct fb_videomode snow_fb_window = {
- .left_margin = 0,
- .right_margin = 0,
- .upper_margin = 4,
- .lower_margin = 4,
- .hsync_len = 5,
- .vsync_len = 32,
- .xres = 1366,
- .yres = 768,
+static struct fb_videomode snow_fb_window[] = {
+ [0] = { /* Only LCD Connected */
+ .left_margin = 0,
+ .right_margin = 0,
+ .upper_margin = 4,
+ .lower_margin = 4,
+ .hsync_len = 5,
+ .vsync_len = 32,
+ .xres = 1366,
+ .yres = 768,
+ },
+ [1] = { /* TV & LCD Connected */
+ .left_margin = 70,
+ .right_margin = 70,
+ .upper_margin = 12,
+ .lower_margin = 13,
+ .hsync_len = 5,
+ .vsync_len = 32,
+ .xres = 1280,
+ .yres = 720,
+ },
+ [2] = {
+ .xres = -1,
+ .yres = -1,
+ },
};
static void exynos_fimd_gpio_setup_24bpp(void)
};
static void exynos_fimd_gpio_setup_24bpp(void)
#ifdef CONFIG_DRM_EXYNOS_FIMD
static struct exynos_drm_fimd_pdata smdk5250_lcd1_pdata = {
#ifdef CONFIG_DRM_EXYNOS_FIMD
static struct exynos_drm_fimd_pdata smdk5250_lcd1_pdata = {
.xres = 1280,
.yres = 800,
.hsync_len = 4,
.xres = 1280,
.yres = 800,
.hsync_len = 4,
.lower_margin = 4,
.refresh = 60,
},
.lower_margin = 4,
.refresh = 60,
},
+ .panel[1].timing = {
+ .xres = 1280,
+ .yres = 720,
+ .hsync_len = 4,
+ .left_margin = 0x4,
+ .right_margin = 0x4,
+ .vsync_len = 4,
+ .upper_margin = 4,
+ .lower_margin = 4,
+ .refresh = 60,
+ },
+ .panel[2].timing = {
+ .xres = -1,
+ .yres = -1,
+ },
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_VCLK,
.default_win = 0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_VCLK,
.default_win = 0,
static void __init exynos5250_dt_machine_init(void)
{
struct device_node *srom_np, *np;
static void __init exynos5250_dt_machine_init(void)
{
struct device_node *srom_np, *np;
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
if (of_machine_is_compatible("google,daisy")) {
#ifdef CONFIG_DRM_EXYNOS_FIMD
if (of_machine_is_compatible("google,daisy")) {
#ifdef CONFIG_DRM_EXYNOS_FIMD
- smdk5250_lcd1_pdata.panel.timing.xres = 1366;
- smdk5250_lcd1_pdata.panel.timing.yres = 768;
+ smdk5250_lcd1_pdata.panel[0].timing.xres = 1366;
+ smdk5250_lcd1_pdata.panel[0].timing.yres = 768;
+ smdk5250_lcd1_pdata.panel[1].timing.xres = 1280;
+ smdk5250_lcd1_pdata.panel[1].timing.yres = 720;
+ smdk5250_lcd1_pdata.panel[2].timing.xres = -1;
+ smdk5250_lcd1_pdata.panel[2].timing.yres = -1;
smdk5250_lcd1_pdata.panel_type = MIPI_LCD;
#else
smdk5250_fb_win0.win_mode.xres = 1366;
smdk5250_lcd1_pdata.panel_type = MIPI_LCD;
#else
smdk5250_fb_win0.win_mode.xres = 1366;
dsim_lcd_info.lcd_size.height = 768;
} else if (of_machine_is_compatible("google,snow")) {
#ifdef CONFIG_DRM_EXYNOS_FIMD
dsim_lcd_info.lcd_size.height = 768;
} else if (of_machine_is_compatible("google,snow")) {
#ifdef CONFIG_DRM_EXYNOS_FIMD
- smdk5250_lcd1_pdata.panel.timing = snow_fb_window;
+ for (i = 0;i < ARRAY_SIZE(snow_fb_window);i++)
+ smdk5250_lcd1_pdata.panel[i].timing = snow_fb_window[i];
+
smdk5250_lcd1_pdata.panel_type = DP_LCD;
smdk5250_lcd1_pdata.clock_rate = 267 * 1000 * 1000;
smdk5250_lcd1_pdata.vidcon1 = 0;
smdk5250_lcd1_pdata.panel_type = DP_LCD;
smdk5250_lcd1_pdata.clock_rate = 267 * 1000 * 1000;
smdk5250_lcd1_pdata.vidcon1 = 0;