コード例 #1
0
static int msm_fb_detect_panel(const char *name)
{
	int ret = -ENODEV;

	printk("%s: %d\n", __func__, __LINE__);
	if (machine_is_msm8225_cellon()) {
		ret = cellon_auto_detect_lcd_panel(name);
	} else if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf() ||
			machine_is_msm8625_surf()) {
		if (!strncmp(name, "lcdc_toshiba_fwvga_pt", 21) ||
				!strncmp(name, "mipi_cmd_renesas_fwvga", 22))
			ret = 0;
	} else if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa()
					|| machine_is_msm8625_ffa()) {
		if (!strncmp(name, "mipi_cmd_renesas_fwvga", 22))
			ret = 0;
	} else if (machine_is_msm7627a_qrd1()) {
		if (!strncmp(name, "mipi_video_truly_wvga", 21))
			ret = 0;
	} else if (machine_is_msm7627a_qrd3() || machine_is_msm8625_qrd7()) {
		if (!strncmp(name, "lcdc_truly_hvga_ips3p2335_pt", 28))
			ret = 0;
	} else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() || machine_is_msm8625_qrd5() || machine_is_msm7x27a_qrd5a()) {
        if (cont_splash_enabled == 1) {
            if (!strncmp(name, "mipi_cmd_nt35510_wvga", 21))
                ret = 0;
        } else if (cont_splash_enabled == 2) {
            if (!strncmp(name, "mipi_video_nt35510_wvga", 21))
                ret = 0;
        } else {
            if (!strncmp(name, "mipi_cmd_nt35510_wvga", 21))
                ret = 0;
        }
	} else if (machine_is_msm8625_skua()) {
		if (!strncmp(name, "mipi_video_himax_wvga", 21) && skua_panel_is_himax())
			ret = 0;
		else if (!strncmp(name, "mipi_cmd_nt35510_alaska_wvga", 28) && !skua_panel_is_himax())
			ret = 0;
	} else if (machine_is_msm8625_evt()) {
		if (!strncmp(name, "mipi_video_nt35510_wvga", 23))
			ret = 0;
	}

#if !defined(CONFIG_FB_MSM_LCDC_AUTO_DETECT) && \
	!defined(CONFIG_FB_MSM_MIPI_PANEL_AUTO_DETECT) && \
	!defined(CONFIG_FB_MSM_LCDC_MIPI_PANEL_AUTO_DETECT)
		if (machine_is_msm7x27a_surf() ||
			machine_is_msm7625a_surf() ||
			machine_is_msm8625_surf()) {
			if (!strncmp(name, LCDC_TOSHIBA_FWVGA_PANEL_NAME,
				strnlen(LCDC_TOSHIBA_FWVGA_PANEL_NAME,
					PANEL_NAME_MAX_LEN)))
				return 0;
		}
#endif

	return ret;
}
コード例 #2
0
void __init msm_fb_add_devices(void)
{
	/* Using continuous splash or not */
	if (machine_is_msm8625_qrd7() || machine_is_msm8625_evb() || machine_is_msm8625_qrd5()) {
            if (cont_splash_enabled) {
                    /* increase ref count of ext power */
                    qrd_lcd_splash_power_vote(1);
                    mdp_pdata.cont_splash_enabled = 1;
                    /* FIXME: Need these flags to indicate backlight driver the initial backlight level */
                    mipi_NT35510_pdata.cont_splash_enabled = 1;
                    mipi_NT35510_alaska_pdata.cont_splash_enabled = 1;
                    mipi_himax_pdata.cont_splash_enabled = 1;
            }
    }

	/* default is NT35510 */
	if (machine_is_msm8625_skua() && skua_panel_is_himax()) {
		skua_fb_devices[1] = &mipi_dsi_himax_panel_device;
		skua_backlight_device.dev.platform_data = &mipi_himax_pdata;
	}

	msm7x27a_set_display_params(prim_panel_name);
	if (machine_is_msm8225_cellon())
		platform_add_devices(c8680_fb_devices,
				ARRAY_SIZE(c8680_fb_devices));
	else if (machine_is_msm7627a_qrd1())
		platform_add_devices(qrd_fb_devices,
				ARRAY_SIZE(qrd_fb_devices));
	else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() || 
			machine_is_msm8625_qrd5() || machine_is_msm7x27a_qrd5a() || 
			machine_is_msm8625_evt()) {
		platform_add_devices(evb_fb_devices,
				ARRAY_SIZE(evb_fb_devices));
	} else if (machine_is_msm8625_skua())
		platform_add_devices(skua_fb_devices,
				ARRAY_SIZE(skua_fb_devices));
	else if (machine_is_msm7627a_qrd3() || machine_is_msm8625_qrd7()) {
		platform_add_devices(qrd3_fb_devices,
						ARRAY_SIZE(qrd3_fb_devices));
	} else
		platform_add_devices(msm_fb_devices,
				ARRAY_SIZE(msm_fb_devices));

	msm_fb_register_device("mdp", &mdp_pdata);
	if (machine_is_msm7625a_surf() || machine_is_msm7x27a_surf()
		|| machine_is_msm8625_surf() || machine_is_msm7627a_qrd3()
		|| machine_is_msm8625_qrd7())
		msm_fb_register_device("lcdc", &lcdc_pdata);
#ifdef CONFIG_FB_MSM_MIPI_DSI
	msm_fb_register_device("mipi_dsi", &mipi_dsi_pdata);
#endif
}
コード例 #3
0
static int msm_fb_detect_panel(const char *name)
{
	int ret = -ENODEV;

	if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf() ||
			machine_is_msm8625_surf()) {
		if (!strncmp(name, "lcdc_toshiba_fwvga_pt", 21) ||
				!strncmp(name, "mipi_cmd_renesas_fwvga", 22))
			ret = 0;
	} else if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa()
					|| machine_is_msm8625_ffa()) {
		if (!strncmp(name, "mipi_cmd_renesas_fwvga", 22))
			ret = 0;
	} else if (machine_is_msm7627a_qrd1()) {
		if (!strncmp(name, "mipi_video_truly_wvga", 21))
			ret = 0;
	} else if (machine_is_msm7627a_qrd3() || machine_is_msm8625_qrd7()) {
		if (!strncmp(name, "lcdc_truly_hvga_ips3p2335_pt", 28))
			ret = 0;
	} else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() || machine_is_msm8625_qrd5() || machine_is_msm7x27a_qrd5a()) {
        if (cont_splash_enabled == 1) {
		#if defined CONFIG_FB_MSM_MIPI_TCL_TD_TNFW4602_2_VIDEO_MODE
			if (!strncmp(name, LCD_MODULE_NAME, strlen(LCD_MODULE_NAME)))
		#else
			if (!strncmp(name, "mipi_cmd_nt35510_wvga", 21))
		#endif
                ret = 0;
        } else if (cont_splash_enabled == 2) {
		#if defined CONFIG_FB_MSM_MIPI_TCL_TD_TNFW4602_2_VIDEO_MODE
			if (!strncmp(name, LCD_MODULE_NAME, strlen(LCD_MODULE_NAME)))
		#else
			if (!strncmp(name, "mipi_cmd_nt35510_wvga", 21))
		#endif
                ret = 0;
        } else {
		#if defined CONFIG_FB_MSM_MIPI_TCL_TD_TNFW4602_2_VIDEO_MODE
			if (!strncmp(name, LCD_MODULE_NAME, strlen(LCD_MODULE_NAME)))
		#else
			if (!strncmp(name, "mipi_cmd_nt35510_wvga", 21))
		#endif

                ret = 0;
        }
	} else if (machine_is_msm8625_skua()) {
		if (!strncmp(name, "mipi_video_himax_wvga", 21) && skua_panel_is_himax())
			ret = 0;
		else if (!strncmp(name, "mipi_cmd_nt35510_alaska_wvga", 28) && !skua_panel_is_himax())
			ret = 0;
	} else if (machine_is_msm8625_evt()) {
		if (!strncmp(name, "mipi_video_nt35510_wvga", 23))
			ret = 0;
	}

#if !defined(CONFIG_FB_MSM_LCDC_AUTO_DETECT) && \
	!defined(CONFIG_FB_MSM_MIPI_PANEL_AUTO_DETECT) && \
	!defined(CONFIG_FB_MSM_LCDC_MIPI_PANEL_AUTO_DETECT)
		if (machine_is_msm7x27a_surf() ||
			machine_is_msm7625a_surf() ||
			machine_is_msm8625_surf()) {
			if (!strncmp(name, LCDC_TOSHIBA_FWVGA_PANEL_NAME,
				strnlen(LCDC_TOSHIBA_FWVGA_PANEL_NAME,
					PANEL_NAME_MAX_LEN)))
				return 0;
		}
#endif

	return ret;
}