diff options
-rw-r--r-- | arch/arm/mach-tegra/board-aruba-panel.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise-panel.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-harmony-panel.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-kai-panel.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-p1852-panel.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-ventana-panel.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-panel.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/p852/board-p852-panel.c | 6 | ||||
-rw-r--r-- | drivers/video/tegra/host/dev.c | 11 |
11 files changed, 61 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/board-aruba-panel.c b/arch/arm/mach-tegra/board-aruba-panel.c index 92e43626a5f9..b014326fc91b 100644 --- a/arch/arm/mach-tegra/board-aruba-panel.c +++ b/arch/arm/mach-tegra/board-aruba-panel.c @@ -227,6 +227,12 @@ int __init aruba_panel_init(void) aruba_carveouts[1].size = tegra_carveout_size; #endif +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(aruba_gfx_devices, ARRAY_SIZE(aruba_gfx_devices)); diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c index 7de847695f60..f6db96c67d90 100644 --- a/arch/arm/mach-tegra/board-cardhu-panel.c +++ b/arch/arm/mach-tegra/board-cardhu-panel.c @@ -1225,6 +1225,12 @@ int __init cardhu_panel_init(void) register_early_suspend(&cardhu_panel_early_suspender); #endif +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(cardhu_gfx_devices, ARRAY_SIZE(cardhu_gfx_devices)); diff --git a/arch/arm/mach-tegra/board-enterprise-panel.c b/arch/arm/mach-tegra/board-enterprise-panel.c index 0defe56a7bc7..9be8582e1be6 100644 --- a/arch/arm/mach-tegra/board-enterprise-panel.c +++ b/arch/arm/mach-tegra/board-enterprise-panel.c @@ -709,8 +709,6 @@ struct early_suspend enterprise_panel_early_suspender; static void enterprise_panel_early_suspend(struct early_suspend *h) { - unsigned i; - /* power down LCD, add use a black screen for HDMI */ if (num_registered_fb > 0) fb_blank(registered_fb[0], FB_BLANK_POWERDOWN); @@ -733,6 +731,7 @@ static void enterprise_panel_early_suspend(struct early_suspend *h) static void enterprise_panel_late_resume(struct early_suspend *h) { unsigned i; + #ifdef CONFIG_TEGRA_CONVSERVATIVE_GOV_ON_EARLYSUPSEND cpufreq_restore_default_governor(); #endif @@ -786,6 +785,12 @@ int __init enterprise_panel_init(void) register_early_suspend(&enterprise_panel_early_suspender); #endif +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(enterprise_gfx_devices, ARRAY_SIZE(enterprise_gfx_devices)); diff --git a/arch/arm/mach-tegra/board-harmony-panel.c b/arch/arm/mach-tegra/board-harmony-panel.c index d9974f1b1caa..c24039652bc5 100644 --- a/arch/arm/mach-tegra/board-harmony-panel.c +++ b/arch/arm/mach-tegra/board-harmony-panel.c @@ -329,7 +329,8 @@ static struct platform_device *harmony_gfx_devices[] __initdata = { &harmony_backlight_device, }; -int __init harmony_panel_init(void) { +int __init harmony_panel_init(void) +{ int err; struct resource *res; @@ -354,6 +355,12 @@ int __init harmony_panel_init(void) { harmony_carveouts[1].size = tegra_carveout_size; #endif +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(harmony_gfx_devices, ARRAY_SIZE(harmony_gfx_devices)); if (err) diff --git a/arch/arm/mach-tegra/board-kai-panel.c b/arch/arm/mach-tegra/board-kai-panel.c index b98c91601e64..71e238fdcdcf 100644 --- a/arch/arm/mach-tegra/board-kai-panel.c +++ b/arch/arm/mach-tegra/board-kai-panel.c @@ -700,6 +700,12 @@ int __init kai_panel_init(void) register_early_suspend(&kai_panel_early_suspender); #endif +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(kai_gfx_devices, ARRAY_SIZE(kai_gfx_devices)); diff --git a/arch/arm/mach-tegra/board-p1852-panel.c b/arch/arm/mach-tegra/board-p1852-panel.c index 33a86fa3eaec..8940af0c0b62 100644 --- a/arch/arm/mach-tegra/board-p1852-panel.c +++ b/arch/arm/mach-tegra/board-p1852-panel.c @@ -125,6 +125,12 @@ int __init p1852_panel_init(void) res->start = tegra_fb_start; res->end = tegra_fb_start + tegra_fb_size - 1; +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(p1852_gfx_devices, ARRAY_SIZE(p1852_gfx_devices)); if (!err) diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c index 83bfb7822357..cad303de3db5 100644 --- a/arch/arm/mach-tegra/board-ventana-panel.c +++ b/arch/arm/mach-tegra/board-ventana-panel.c @@ -412,6 +412,12 @@ int __init ventana_panel_init(void) ventana_carveouts[1].size = tegra_carveout_size; #endif +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(ventana_gfx_devices, ARRAY_SIZE(ventana_gfx_devices)); diff --git a/arch/arm/mach-tegra/board-whistler-panel.c b/arch/arm/mach-tegra/board-whistler-panel.c index 6fc576b3607e..74075d4659c5 100644 --- a/arch/arm/mach-tegra/board-whistler-panel.c +++ b/arch/arm/mach-tegra/board-whistler-panel.c @@ -363,6 +363,12 @@ int __init whistler_panel_init(void) whistler_carveouts[1].size = tegra_carveout_size; #endif +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(whistler_gfx_devices, ARRAY_SIZE(whistler_gfx_devices)); diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h index b7fc6fdd655c..97a0c53ccfce 100644 --- a/arch/arm/mach-tegra/devices.h +++ b/arch/arm/mach-tegra/devices.h @@ -108,6 +108,7 @@ extern struct platform_device tegra_uartc_device; extern struct platform_device tegra_uartd_device; extern struct platform_device tegra_uarte_device; extern struct platform_device tegra_avp_device; +extern struct nvhost_device tegra_grhost_device; extern struct nvhost_device nvavp_device; extern struct platform_device tegra_aes_device; #if !defined(CONFIG_ARCH_TEGRA_2x_SOC) diff --git a/arch/arm/mach-tegra/p852/board-p852-panel.c b/arch/arm/mach-tegra/p852/board-p852-panel.c index 3d65a61adecb..c47032dd4f0a 100644 --- a/arch/arm/mach-tegra/p852/board-p852-panel.c +++ b/arch/arm/mach-tegra/p852/board-p852-panel.c @@ -174,6 +174,12 @@ int __init p852_panel_init(void) if (err) return err; +#ifdef CONFIG_TEGRA_GRHOST + err = nvhost_device_register(&tegra_grhost_device); + if (err) + return err; +#endif + err = platform_add_devices(p852_gfx_devices, ARRAY_SIZE(p852_gfx_devices)); diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c index fa8c6176fcbc..b2575860e91b 100644 --- a/drivers/video/tegra/host/dev.c +++ b/drivers/video/tegra/host/dev.c @@ -1072,7 +1072,8 @@ static int __exit nvhost_remove(struct nvhost_device *dev) static int nvhost_suspend(struct nvhost_device *dev, pm_message_t state) { struct nvhost_master *host = nvhost_get_drvdata(dev); - int i, ret; + int i, ret = 0; + dev_info(&dev->dev, "suspending\n"); for (i = 0; i < host->nb_channels; i++) { @@ -1083,6 +1084,7 @@ static int nvhost_suspend(struct nvhost_device *dev, pm_message_t state) ret = nvhost_module_suspend(host->dev, true); dev_info(&dev->dev, "suspend status: %d\n", ret); + return ret; } @@ -1105,14 +1107,7 @@ static struct nvhost_driver nvhost_driver = { static int __init nvhost_mod_init(void) { - int err; - register_sets = tegra_gpu_register_sets(); - - err = nvhost_device_register(&tegra_grhost_device); - if (err) - return err; - return nvhost_driver_register(&nvhost_driver); } |