diff options
author | Kishore Kumar Kunche <kkunche@nvidia.com> | 2011-02-08 10:48:00 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-04-26 15:54:27 -0700 |
commit | 6543ddbafa5a6c43f70ccd774025712237d6793c (patch) | |
tree | 198ac61a214d52bd7b2f44c8a9bc0e5ddaa71ea2 /drivers | |
parent | 068d8da1569e8f1866566c5284180bef5a4e58ec (diff) |
video: tegra: host: Revert previous merge
The proper host driver patches will follow, based on the
pre-merge state.
also includes:
[ARM]: tegra: host disable MPE auto power gate
Fixes Random CRC failures on T30.
Original-Change-Id: Ib42b8efc30d9e8910934bb9350e8170c9096e614
Reviewed-on: http://git-master/r/18663
Original-Change-Id: I985bfbef277db4d533b67ee674db41d4a8daa18a
Reviewed-on: http://git-master/r/24296
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Tested-by: Scott Williams <scwilliams@nvidia.com>
Change-Id: Iec8ea27d5648b7f9f8ac51f2aca79b5e7cf44879
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/tegra/host/debug.c | 68 | ||||
-rw-r--r-- | drivers/video/tegra/host/dev.c | 11 | ||||
-rw-r--r-- | drivers/video/tegra/host/dev.h | 1 | ||||
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.c | 24 | ||||
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.h | 2 |
5 files changed, 12 insertions, 94 deletions
diff --git a/drivers/video/tegra/host/debug.c b/drivers/video/tegra/host/debug.c index 1277c1bc8324..d17fe497022d 100644 --- a/drivers/video/tegra/host/debug.c +++ b/drivers/video/tegra/host/debug.c @@ -22,7 +22,7 @@ #include "dev.h" -static struct nvhost_master *debug_master; +#ifdef CONFIG_DEBUG_FS enum { NVHOST_DBG_STATE_CMD = 0, @@ -155,28 +155,6 @@ static int nvhost_debug_show(struct seq_file *s, void *unused) nvhost_module_busy(&m->mod); - seq_printf(s, "---- mlocks ----\n"); - for (i = 0; i < NV_HOST1X_NB_MLOCKS; i++) { - u32 owner = readl(m->sync_aperture + HOST1X_SYNC_MLOCK_OWNER_0 + i * 4); - if (owner & 0x1) - seq_printf(s, "%d: locked by channel %d\n", i, (owner >> 8) * 0xff); - else if (owner & 0x2) - seq_printf(s, "%d: locked by cpu\n", i); - else - seq_printf(s, "%d: unlocked\n", i); - } - seq_printf(s, "\n---- syncpts ----\n"); - for (i = 0; i < NV_HOST1X_SYNCPT_NB_PTS; i++) { - u32 max = nvhost_syncpt_read_max(&m->syncpt, i); - if (!max) - continue; - seq_printf(s, "id %d (%s) min %d max %d\n", - i, nvhost_syncpt_name(i), - nvhost_syncpt_update_min(&m->syncpt, i), max); - - } - - seq_printf(s, "\n---- channels ----\n"); for (i = 0; i < NVHOST_NUMCHANNELS; i++) { void __iomem *regs = m->channels[i].aperture; u32 dmaput, dmaget, dmactrl; @@ -195,11 +173,8 @@ static int nvhost_debug_show(struct seq_file *s, void *unused) cbread = readl(m->aperture + HOST1X_SYNC_CBREAD(i)); cbstat = readl(m->aperture + HOST1X_SYNC_CBSTAT(i)); - seq_printf(s, "%d-%s (%d): ", i, m->channels[i].mod.name, - atomic_read(&m->channels[i].mod.refcount)); - if (dmactrl != 0x0 || !m->channels[i].cdma.push_buffer.mapped) { - seq_printf(s, "inactive\n\n"); + seq_printf(s, "%d: inactive\n\n", i); continue; } @@ -221,8 +196,8 @@ static int nvhost_debug_show(struct seq_file *s, void *unused) break; default: - seq_printf(s, "active class %02x, offset %04x, val %08x\n", - cbstat >> 16, cbstat & 0xffff, cbread); + seq_printf(s, "%d: active class %02x, offset %04x, val %08x\n", + i, cbstat >> 16, cbstat & 0xffff, cbread); break; } @@ -292,7 +267,6 @@ static int nvhost_debug_show(struct seq_file *s, void *unused) return 0; } -#ifdef CONFIG_DEBUG_FS static int nvhost_debug_open(struct inode *inode, struct file *file) { @@ -308,44 +282,12 @@ static const struct file_operations nvhost_debug_fops = { void nvhost_debug_init(struct nvhost_master *master) { - debug_master = master; debugfs_create_file("tegra_host", S_IRUGO, NULL, master, &nvhost_debug_fops); } #else -void nvhost_debug_init(struct nvhost_master *master) +void nvhost_debug_add(struct nvhost_master *master) { - debug_master = master; } #endif -static char nvhost_debug_dump_buff[16 * 1024]; - -void nvhost_debug_dump(void) -{ - struct seq_file s; - int i; - char c; - - memset(&s, 0x0, sizeof(s)); - - s.buf = nvhost_debug_dump_buff; - s.size = sizeof(nvhost_debug_dump_buff); - s.private = debug_master; - - nvhost_debug_show(&s, NULL); - - i = 0; - while (i < s.count ) { - if ((s.count - i) > 256) { - c = s.buf[i + 256]; - s.buf[i + 256] = 0; - printk("%s", s.buf + i); - s.buf[i + 256] = c; - } else { - printk("%s", s.buf + i); - } - i += 256; - } -} - diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c index 23853647709f..e9b85dd29267 100644 --- a/drivers/video/tegra/host/dev.c +++ b/drivers/video/tegra/host/dev.c @@ -209,9 +209,9 @@ static ssize_t nvhost_channelwrite(struct file *filp, const char __user *buf, return (count - remaining); } -static int nvhost_ioctl_channel_flush(struct nvhost_channel_userctx *ctx, - struct nvhost_get_param_args *args, - int null_kickoff) +static int nvhost_ioctl_channel_flush( + struct nvhost_channel_userctx *ctx, + struct nvhost_get_param_args *args) { struct device *device = &ctx->ch->dev->pdev->dev; int num_unpin; @@ -273,10 +273,7 @@ static long nvhost_channelctl(struct file *filp, switch (cmd) { case NVHOST_IOCTL_CHANNEL_FLUSH: - err = nvhost_ioctl_channel_flush(priv, (void *)buf, 0); - break; - case NVHOST_IOCTL_CHANNEL_NULL_KICKOFF: - err = nvhost_ioctl_channel_flush(priv, (void *)buf, 1); + err = nvhost_ioctl_channel_flush(priv, (void *)buf); break; case NVHOST_IOCTL_CHANNEL_GET_SYNCPOINTS: ((struct nvhost_get_param_args *)buf)->value = diff --git a/drivers/video/tegra/host/dev.h b/drivers/video/tegra/host/dev.h index f39ea75681e4..3e96f47e76d7 100644 --- a/drivers/video/tegra/host/dev.h +++ b/drivers/video/tegra/host/dev.h @@ -49,6 +49,5 @@ struct nvhost_master { }; void nvhost_debug_init(struct nvhost_master *master); -void nvhost_debug_dump(void); #endif diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index ee59900ed13c..10f5c2917c10 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c @@ -28,7 +28,7 @@ #include <mach/powergate.h> #include <mach/clk.h> -#define ACM_TIMEOUT 1*HZ +#define ACM_TIMEOUT_MSEC 25 #define DISABLE_3D_POWERGATING #define DISABLE_MPE_POWERGATING @@ -101,18 +101,9 @@ static const char *get_module_clk_id(const char *module, int index) if (index == 1 && strcmp(module, "gr2d") == 0) return "epp"; #ifdef CONFIG_ARCH_TEGRA_3x_SOC - /* FIXME: Use proper gr3d2 index. */ else if (index == 1 && strcmp(module, "gr3d") == 0) return "gr3d2"; #endif - else if (index == 2 && strcmp(module, "gr2d") == 0) - return "emc"; -#ifndef CONFIG_ARCH_TEGRA_3x_SOC - else if (index == 1 && strcmp(module, "gr3d") == 0) - return "emc"; -#endif - else if (index == 1 && strcmp(module, "mpe") == 0) - return "emc"; else if (index == 0) return module; return NULL; @@ -173,12 +164,7 @@ int nvhost_module_init(struct nvhost_module *mod, const char *name, mod->powergate_id = -1; } #endif - #ifdef DISABLE_MPE_POWERGATING - /* - * Disable power gating for MPE as it seems to cause issues with - * camera record stress tests when run in loop. - */ if (mod->powergate_id == TEGRA_POWERGATE_MPE) { tegra_powergate_sequence_power_up(mod->powergate_id, mod->clk[0]); @@ -229,16 +215,10 @@ static void debug_not_idle(struct nvhost_module *mod) void nvhost_module_suspend(struct nvhost_module *mod, bool system_suspend) { - int ret; - if (system_suspend && (!is_module_idle(mod))) debug_not_idle(mod); - ret = wait_event_timeout(mod->idle, is_module_idle(mod), - ACM_TIMEOUT + msecs_to_jiffies(500)); - if (ret == 0) - nvhost_debug_dump(); - + wait_event(mod->idle, is_module_idle(mod)); if (system_suspend) printk("tegra_grhost: entered idle\n"); diff --git a/drivers/video/tegra/host/nvhost_acm.h b/drivers/video/tegra/host/nvhost_acm.h index f7e28af8e9cb..c765d983afb4 100644 --- a/drivers/video/tegra/host/nvhost_acm.h +++ b/drivers/video/tegra/host/nvhost_acm.h @@ -28,7 +28,7 @@ #include <linux/mutex.h> #include <linux/clk.h> -#define NVHOST_MODULE_MAX_CLOCKS 3 +#define NVHOST_MODULE_MAX_CLOCKS 2 struct nvhost_module; |