int __init whistler_panel_init(void)
{
	int err;
	struct resource __maybe_unused *res;
	struct platform_device *phost1x;

	gpio_request(whistler_hdmi_hpd, "hdmi_hpd");
	gpio_direction_input(whistler_hdmi_hpd);

#if defined(CONFIG_TEGRA_NVMAP)
	whistler_carveouts[1].base = tegra_carveout_start;
	whistler_carveouts[1].size = tegra_carveout_size;
#endif

	err = platform_add_devices(whistler_gfx_devices,
		ARRAY_SIZE(whistler_gfx_devices));

#ifdef CONFIG_TEGRA_GRHOST
	phost1x = tegra2_register_host1x_devices();
	if (!phost1x)
		return -EINVAL;
#endif

#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
	res = platform_get_resource_byname(&whistler_disp1_device,
					 IORESOURCE_MEM, "fbmem");
	res->start = tegra_fb_start;
	res->end = tegra_fb_start + tegra_fb_size - 1;
#endif

	/* Copy the bootloader fb to the fb. */
	tegra_move_framebuffer(tegra_fb_start, tegra_bootloader_fb_start,
		min(tegra_fb_size, tegra_bootloader_fb_size));

#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
	res = platform_get_resource_byname(&whistler_disp2_device,
					 IORESOURCE_MEM, "fbmem");
	res->start = tegra_fb2_start;
	res->end = tegra_fb2_start + tegra_fb2_size - 1;

	if (!err) {
		whistler_disp1_device.dev.parent = &phost1x->dev;
		err = platform_device_register(&whistler_disp1_device);
	}

	if (!err) {
		whistler_disp2_device.dev.parent = &phost1x->dev;
		err = platform_device_register(&whistler_disp2_device);
	}
#endif

	return err;
}
int __init aruba_panel_init(void)
{
	int err;
	struct resource __maybe_unused *res;

#if defined(CONFIG_TEGRA_NVMAP)
	aruba_carveouts[1].base = tegra_carveout_start;
	aruba_carveouts[1].size = tegra_carveout_size;
#endif

#ifdef CONFIG_TEGRA_GRHOST
	err = tegra2_register_host1x_devices();
	if (err)
		return err;
#endif

	err = platform_add_devices(aruba_gfx_devices,
				   ARRAY_SIZE(aruba_gfx_devices));

#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
	res = nvhost_get_resource_byname(&aruba_disp1_device,
					 IORESOURCE_MEM, "fbmem");
	res->start = tegra_fb_start;
	res->end = tegra_fb_start + tegra_fb_size - 1;
#endif

	/* Copy the bootloader fb to the fb. */
	tegra_move_framebuffer(tegra_fb_start, tegra_bootloader_fb_start,
				min(tegra_fb_size, tegra_bootloader_fb_size));

#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
	if (!err)
		err = nvhost_device_register(&aruba_disp1_device);
#endif

	return err;
}