]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
video: tegra: host: Separate gk20a configs
authorLauri Peltonen <lpeltonen@nvidia.com>
Thu, 2 Jan 2014 13:29:57 +0000 (15:29 +0200)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 10 Jan 2014 08:31:59 +0000 (00:31 -0800)
Remove "TEGRA_" from the gk20a specific configs, and move those configs
to a separate Kconfig file under the gk20a directory.

Also replace the config names under arch/arm/configs - it would be
tedious to do this kind of renaming in separate patches.

Bug 1434573

Change-Id: Ib802382badd405e0ece4d573c1bf9b5c5f08ad19
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: http://git-master/r/352041
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
20 files changed:
arch/arm/configs/tegra12_android_defconfig
arch/arm/configs/tegra12_defconfig
arch/arm/configs/tegra_bonaire_sim_android_defconfig
arch/arm/configs/tegra_bonaire_sim_defconfig
arch/arm/configs/tegra_bonaire_sim_mods_defconfig
arch/arm/configs/tegra_vcm30t124_gnu_linux_defconfig
arch/arm/mach-tegra/Kconfig
drivers/video/tegra/Kconfig
drivers/video/tegra/host/bus_client.c
drivers/video/tegra/host/gk20a/Kconfig [new file with mode: 0644]
drivers/video/tegra/host/gk20a/channel_gk20a.c
drivers/video/tegra/host/gk20a/channel_gk20a.h
drivers/video/tegra/host/gk20a/gk20a.c
drivers/video/tegra/host/gk20a/gk20a.h
drivers/video/tegra/host/gk20a/gr_gk20a.c
drivers/video/tegra/host/gk20a/mm_gk20a.c
drivers/video/tegra/host/gk20a/pmu_gk20a.c
drivers/video/tegra/host/nvhost_channel.h
drivers/video/tegra/host/nvhost_intr.c
drivers/video/tegra/host/t124/t124.c

index ab4f3f366f60f670cc17ab7af9d299e3506639fa..20e12d408e10d71f6da6daddfa0f6f6b44dc6d6f 100644 (file)
@@ -383,8 +383,8 @@ CONFIG_TEGRA_DSI=y
 CONFIG_TEGRA_DSI2EDP_SN65DSI86=y
 CONFIG_TEGRA_DP=y
 CONFIG_TEGRA_NVHDCP=y
-CONFIG_TEGRA_GK20A_PMU=y
-CONFIG_TEGRA_GK20A_DEVFREQ=y
+CONFIG_GK20A_PMU=y
+CONFIG_GK20A_DEVFREQ=y
 # CONFIG_TEGRA_CAMERA is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
index 916c803033e538be9164b049051cda4a6e163e2e..889845751ed0abc6c0cc3f62a544911f14df923d 100644 (file)
@@ -354,8 +354,8 @@ CONFIG_TEGRA_DC=y
 CONFIG_TEGRA_DSI=y
 CONFIG_TEGRA_DSI2EDP_SN65DSI86=y
 CONFIG_TEGRA_DP=y
-CONFIG_TEGRA_GK20A_PMU=y
-CONFIG_TEGRA_GK20A_PERFMON=y
+CONFIG_GK20A_PMU=y
+CONFIG_GK20A_PERFMON=y
 # CONFIG_TEGRA_CAMERA is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
index b1fc06b01a64fdb5f3dbddfbe05fc09013175a6f..71542b35539c8aa4a3494d3077a3652685e52d46 100644 (file)
@@ -97,8 +97,8 @@ CONFIG_FB=y
 CONFIG_TEGRA_GRHOST=y
 CONFIG_TEGRA_GRHOST_VI=y
 CONFIG_TEGRA_DC=y
-CONFIG_TEGRA_GK20A_PMU=y
-CONFIG_TEGRA_GPU_CYCLE_STATS=y
+CONFIG_GK20A_PMU=y
+CONFIG_GK20A_CYCLE_STATS=y
 # CONFIG_TEGRA_CAMERA is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_SOUND=y
index f9ae7613f4d0c13280f865720f01bd4e36285c3f..00fc8dd4ebaeea945055094a18b2ba2d26162cc0 100644 (file)
@@ -87,7 +87,7 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
 CONFIG_FB=y
 CONFIG_TEGRA_GRHOST=y
 CONFIG_TEGRA_DC=y
-CONFIG_TEGRA_GK20A_PMU=y
+CONFIG_GK20A_PMU=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LOGO=y
 CONFIG_SOUND=y
index e7f74b927fc6ed1792e36ec1e4e5a0d036007861..76f075f813f1a53be65f15de203bba77e75f3ad8 100644 (file)
@@ -89,7 +89,7 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
 # CONFIG_TEGRA_NVMAP is not set
-CONFIG_TEGRA_GK20A_PMU=y
+CONFIG_GK20A_PMU=y
 # CONFIG_USB_SUPPORT is not set
 CONFIG_STAGING=y
 CONFIG_ANDROID=y
index e20bf8a8d80792c00eb3a25c80ba04c8f4ad32ea..da3324332a37db42d15f08be39c4ab5c260ea30e 100644 (file)
@@ -345,7 +345,7 @@ CONFIG_TEGRA_GRHOST=y
 CONFIG_TEGRA_DC=y
 CONFIG_TEGRA_DSI=y
 CONFIG_TEGRA_DSI2EDP_SN65DSI86=y
-CONFIG_TEGRA_GK20A_PMU=y
+CONFIG_GK20A_PMU=y
 # CONFIG_TEGRA_CAMERA is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
index 8db559450c016232a1cfc129d657625cdbb9b2f1..34634b9286256323202fe8830ce72c50d39cb90a 100644 (file)
@@ -445,11 +445,15 @@ config TEGRA_GPU_DVFS
        default y
 
 config TEGRA_GK20A
-       bool "Enable the GK20A graphics engine"
+       bool "Enable the GK20A GPU on Tegra"
        depends on ARCH_TEGRA_12x_SOC
+       depends on TEGRA_GRHOST
+       select GK20A
        default y
        help
-         Enable support for the GK20A graphics engine
+         Enable support for the GK20A graphics engine on Tegra
+         by adding a Tegra platfrom interface to the GK20A driver.
+         The Tegra platform interface requires TEGRA_GRHOST (host1x).
 
 config TEGRA_AVP_KERNEL_ON_MMU
        bool "Use AVP MMU to relocate AVP kernel"
index aac9ba212cf4d09f044329edb6f60c2d38cfa90a..5ab895b19511609f72244221c6569ec9f4222ecf 100644 (file)
@@ -50,13 +50,6 @@ config TEGRA_GRHOST_SYNC
          Add tegra host backend for the cross driver synchronization framework.
          Allows creating sync fence file descriptors from Tegra host syncpoints.
 
-config TEGRA_GRHOST_GK20A_PHYS_PAGE_TABLES
-       bool "Use physical addressing for gk20a page tables"
-       default y if TEGRA_SIMULATION_PLATFORM
-       help
-         Use physical addressing for gk20a page tables. If this is off, we
-         use SMMU translation.
-
 config TEGRA_DC
        tristate "Tegra Display Contoller"
        depends on ARCH_TEGRA && TEGRA_GRHOST
@@ -373,47 +366,6 @@ config TEGRA_HDMI_74MHZ_LIMIT
          Say Y here to make kernel report only low bandwidth modes.
          Useful only for boards which can't deliver 148.50 MHz.
 
-config TEGRA_GK20A_PMU
-       bool "Support GK20A PMU"
-       depends on TEGRA_GK20A
-       default n
-       help
-         Say Y here to enable GK20A PMU features.
-
-choice
-       depends on TEGRA_GK20A
-       prompt "Enable GK20A frequency scaling"
-       default TEGRA_GK20A_PERFMON
-       optional
-       help
-               Select this entry to enable gk20a scaling
-
-config TEGRA_GK20A_PERFMON
-       bool "Use Perfmon"
-       help
-         Select this to enable built-in perfmon scaling.
-         The built-in scaling option uses simplistic
-         scaling mechanism (if busy, increase frequency and
-         decrease frequency if idle).
-
-config TEGRA_GK20A_DEVFREQ
-       bool "Use Devfreq"
-       help
-         Select this to use devfreq based scaling.
-         Devfreq is a common framework that allows using
-         variety of different governors and changing
-         between governors on the fly. By default, no
-         governor is selected.
-
-endchoice
-
-config TEGRA_GPU_CYCLE_STATS
-       bool "Support GK20A GPU CYCLE STATS"
-       depends on TEGRA_GK20A
-       default y
-       help
-         Say Y here to enable the cycle stats debugging features.
-
 endif
 
 config TEGRA_CAMERA
@@ -424,3 +376,5 @@ config TEGRA_CAMERA
          Enables support for the Tegra camera interface
 
          If unsure, say Y
+
+source "drivers/video/tegra/host/gk20a/Kconfig"
index b86b459470035fa7a19b70f6bfee3d6ab5aad3b8..47f46ff5bbbc2234ba1cec2b323a61ac2ac54373 100644 (file)
@@ -722,7 +722,7 @@ fail:
        return err;
 }
 
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
 static int nvhost_ioctl_channel_cycle_stats(
        struct nvhost_channel_userctx *ctx,
        struct nvhost_cycle_stats_args *args)
@@ -972,7 +972,7 @@ static long nvhost_channelctl(struct file *filp,
                err = nvhost_ioctl_channel_set_error_notifier(priv,
                        (void *)buf);
                break;
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
        case NVHOST_IOCTL_CHANNEL_CYCLE_STATS:
                err = nvhost_ioctl_channel_cycle_stats(priv, (void *)buf);
                break;
diff --git a/drivers/video/tegra/host/gk20a/Kconfig b/drivers/video/tegra/host/gk20a/Kconfig
new file mode 100644 (file)
index 0000000..160ec8b
--- /dev/null
@@ -0,0 +1,60 @@
+config GK20A
+       bool "Nvidia GK20A GPU support"
+       help
+         Choose this option if you have an SoC with integrated
+         Nvidia GPU IP.
+
+config GK20A_DEFAULT_TIMEOUT
+       depends on GK20A
+       int "Default timeout for submits"
+       default 10000
+       help
+         Default timeout for jobs in milliseconds. Set to zero for no timeout.
+
+config GK20A_PMU
+       bool "Support GK20A PMU"
+       depends on GK20A
+       default n
+       help
+         Say Y here to enable GK20A PMU features.
+
+choice
+       depends on GK20A
+       prompt "Enable GK20A frequency scaling"
+       default GK20A_PERFMON
+       optional
+       help
+         Select this entry to enable gk20a scaling
+
+config GK20A_PERFMON
+       bool "Use Perfmon"
+       help
+         Select this to enable built-in perfmon scaling.
+         The built-in scaling option uses simplistic
+         scaling mechanism (if busy, increase frequency and
+         decrease frequency if idle).
+
+config GK20A_DEVFREQ
+       bool "Use Devfreq"
+       help
+         Select this to use devfreq based scaling.
+         Devfreq is a common framework that allows using
+         variety of different governors and changing
+         between governors on the fly. By default, no
+         governor is selected.
+
+endchoice
+
+config GK20A_CYCLE_STATS
+       bool "Support GK20A GPU CYCLE STATS"
+       depends on GK20A
+       default y
+       help
+         Say Y here to enable the cycle stats debugging features.
+
+config GK20A_PHYS_PAGE_TABLES
+       bool "Use physical addressing for gk20a page tables"
+       default y if TEGRA_SIMULATION_PLATFORM
+       help
+         Use physical addressing for gk20a page tables. If this is off, we
+         use SMMU translation.
index baa1beecf53299933865f52c88c4bdf8ad59ba76..50312ebb478dc6dea41bcf38bc0f23ceec544a36 100644 (file)
@@ -3,7 +3,7 @@
  *
  * GK20A Graphics channel
  *
- * Copyright (c) 2011-2013, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -470,7 +470,7 @@ void gk20a_disable_channel(struct channel_gk20a *ch,
        channel_gk20a_update_runlist(ch, false);
 }
 
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
 
 static void gk20a_free_cycle_stats_buffer(struct channel_gk20a *ch)
 {
@@ -662,7 +662,7 @@ void gk20a_free_channel(struct nvhost_hwctx *ctx, bool finish)
 
        memset(&ch->gpfifo, 0, sizeof(struct gpfifo_desc));
 
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
        gk20a_free_cycle_stats_buffer(ch);
 #endif
 
@@ -1728,7 +1728,7 @@ int gk20a_init_channel_support(struct gk20a *g, u32 chid)
        c->remove_support = gk20a_remove_channel_support;
        mutex_init(&c->jobs_lock);
        INIT_LIST_HEAD(&c->jobs);
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
        mutex_init(&c->cyclestate.cyclestate_buffer_mutex);
 #endif
        INIT_LIST_HEAD(&c->dbg_s_list);
index 40b04107e0922d15196fb634e28786545ca5ba6f..41555c99aab46569cb02fd68b2dbf0052df72e35 100644 (file)
@@ -3,7 +3,7 @@
  *
  * GK20A graphics channel
  *
- * Copyright (c) 2011-2013, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -122,7 +122,7 @@ struct channel_gk20a {
        } last_submit_fence;
 
        void (*remove_support)(struct channel_gk20a *);
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
        struct {
        void *cyclestate_buffer;
        u32 cyclestate_buffer_size;
@@ -152,14 +152,7 @@ struct nvhost_zbc_set_table_args;
 struct nvhost_cycle_stats_args;
 struct nvhost_set_priority_args;
 
-#if defined(CONFIG_TEGRA_GK20A)
 void gk20a_channel_update(struct channel_gk20a *c);
-#else
-static inline void gk20a_channel_update(struct channel_gk20a *c)
-{
-}
-#endif
-
 int gk20a_init_channel_support(struct gk20a *, u32 chid);
 int gk20a_channel_init(struct nvhost_channel *ch, struct nvhost_master *host,
                       int index);
@@ -195,7 +188,7 @@ int gk20a_channel_zbc_query_table(struct channel_gk20a *ch,
                            struct nvhost_zbc_query_table_args *args);
 int gk20a_channel_set_priority(struct channel_gk20a *ch,
                       u32 priority);
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
 int gk20a_channel_cycle_stats(struct channel_gk20a *ch,
                        struct nvhost_cycle_stats_args *args);
 #endif
index 319e2e29be926820da7a1ed3cefa168195c240f1..173c6f14a98ae85bd58ebbe9156046ef1ee4987b 100644 (file)
@@ -668,7 +668,7 @@ int nvhost_gk20a_init(struct platform_device *dev)
        nvhost_gk20a_finalize_poweron(dev);
 #endif
 
-       if (IS_ENABLED(CONFIG_TEGRA_GK20A_DEVFREQ))
+       if (IS_ENABLED(CONFIG_GK20A_DEVFREQ))
                nvhost_gk20a_scale_hw_init(dev);
        return 0;
 }
@@ -1062,7 +1062,7 @@ static int gk20a_probe(struct platform_device *dev)
                                        &tegra_gpu_cooling_ops);
 
        gk20a->gr_idle_timeout_default =
-                       CONFIG_TEGRA_GRHOST_DEFAULT_TIMEOUT;
+                       CONFIG_GK20A_DEFAULT_TIMEOUT;
        gk20a->timeouts_enabled = true;
 
        /* Set up initial clock gating settings */
index acef9038c4cb7689d2bd04706abb010fae56d7a1..9a7df4e75de827a943ad492595374fc82735eb1a 100644 (file)
@@ -242,7 +242,7 @@ enum {
        KEPLER_DMA_COPY_A         = 0xA0B5, /*not sure about this one*/
 };
 
-#if defined (CONFIG_TEGRA_GK20A_PMU)
+#if defined(CONFIG_GK20A_PMU)
 static inline int support_gk20a_pmu(void)
 {
        return 1;
index 8cdaa2d9c995fa6d0dc4111fef51c272ec330f99..86f1449d5c23969a1989332260bb44d11afcc056 100644 (file)
@@ -3,7 +3,7 @@
  *
  * GK20A Graphics
  *
- * Copyright (c) 2011-2013, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -4799,7 +4799,7 @@ static int gk20a_gr_handle_notify_pending(struct gk20a *g,
        struct fifo_gk20a *f = &g->fifo;
        struct channel_gk20a *ch = &f->channel[isr_data->chid];
 
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
        void *virtual_address;
        u32 buffer_size;
        u32 offset;
index bcad8ea1bd2e2aed5d53f79403c763c6bd0416bb..8102deec757e066774e48d96d664a8cb8568010c 100644 (file)
@@ -270,7 +270,7 @@ int gk20a_init_mm_support(struct gk20a *g)
        return err;
 }
 
-#ifdef TEGRA_GRHOST_GK20A_PHYS_PAGE_TABLES
+#ifdef CONFIG_GK20A_PHYS_PAGE_TABLES
 static int alloc_gmmu_pages(struct vm_gk20a *vm, u32 order,
                            void **handle,
                            struct sg_table **sgt)
index a505f813e82cdb5d6b3e70d6f8a6febcdd1a5ff2..45cd22548fb074eda7c2b9b7958a4543d7c51cd2 100644 (file)
@@ -3,7 +3,7 @@
  *
  * GK20A PMU (aka. gPMU outside gk20a context)
  *
- * Copyright (c) 2011-2013, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -1981,7 +1981,7 @@ static int pmu_handle_perfmon_event(struct pmu_gk20a *pmu,
        }
 
        /* restart sampling */
-       if (IS_ENABLED(CONFIG_TEGRA_GK20A_PERFMON))
+       if (IS_ENABLED(CONFIG_GK20A_PERFMON))
                return pmu_perfmon_start_sampling(pmu);
        return 0;
 }
index 6cb3d338ebf6b4c4a2ff620fb28ccf32448cd87b..d85503083f87629a852b7001776463b123105bfd 100644 (file)
@@ -74,7 +74,7 @@ struct nvhost_channel_ops {
                            struct nvhost_set_priority_args *args);
        int (*wait)(struct nvhost_hwctx *,
                    struct nvhost_wait_args *args);
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
        int (*cycle_stats)(struct nvhost_hwctx *,
                        struct nvhost_cycle_stats_args *args);
 #endif
index 08cadbda89a3edb89b6f934297a2474889584b9d..0a3d17d0268bbd52088915d1a3dc2a29658e4a5b 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Tegra Graphics Host Interrupt Management
  *
- * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2014, NVIDIA CORPORATION. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -163,7 +163,9 @@ static void action_gpfifo_submit_complete(struct nvhost_waitlist *waiter)
        struct channel_gk20a *ch20a = waiter->data;
        int nr_completed = waiter->count;
        wake_up(&ch20a->submit_wq);
+#if defined(CONFIG_TEGRA_GK20A)
        gk20a_channel_update(ch20a);
+#endif
        nvhost_module_idle_mult(ch20a->ch->dev, nr_completed);
        /* TODO: add trace function */
 }
index b36753b52f3a8fc34be2ff182812cc87fd4b2c5d..db02b97e93147843de51e8658a0113b2337b08bf 100644 (file)
@@ -489,7 +489,7 @@ struct nvhost_device_data tegra_gk20a_info = {
        .alloc_hwctx_handler    = nvhost_gk20a_alloc_hwctx_handler,
        .prepare_poweroff       = nvhost_gk20a_prepare_poweroff,
        .finalize_poweron       = nvhost_gk20a_finalize_poweron,
-#ifdef CONFIG_TEGRA_GK20A_DEVFREQ
+#ifdef CONFIG_GK20A_DEVFREQ
        .busy                   = nvhost_gk20a_scale_notify_busy,
        .idle                   = nvhost_gk20a_scale_notify_idle,
        .scaling_init           = nvhost_gk20a_scale_init,
@@ -628,7 +628,7 @@ static int t124_channel_set_priority(struct nvhost_hwctx *hwctx,
        return gk20a_channel_set_priority(hwctx->priv, args->priority);
 }
 
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
 static int t124_channel_cycle_stats(struct nvhost_hwctx *hwctx,
                                struct nvhost_cycle_stats_args *args)
 {
@@ -673,7 +673,7 @@ static struct nvhost_channel *t124_alloc_nvhost_channel(
                        ch->ops.set_error_notifier =
                                        t124_channel_set_error_notifier;
 
-#if defined(CONFIG_TEGRA_GPU_CYCLE_STATS)
+#if defined(CONFIG_GK20A_CYCLE_STATS)
                        ch->ops.cycle_stats   = t124_channel_cycle_stats;
 #endif
                        ch->ops.zcull.bind    = t124_channel_zcull_bind;