From ae49f447dffadcafb5f72bfbd4d206cc88730a06 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 29 May 2012 13:54:54 +0300 Subject: video: tegra: host: Add config option for timeout Add configuration variable for default timeout for clients. Set it to 30s for silicon and infinity for simulation. Change-Id: I08c1fd234f738c4919adfe482dfc50948dc2f862 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/105331 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen --- drivers/video/tegra/Kconfig | 8 ++++++++ drivers/video/tegra/host/bus_client.c | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers/video/tegra') diff --git a/drivers/video/tegra/Kconfig b/drivers/video/tegra/Kconfig index fc057a50d361..d02109c39af0 100644 --- a/drivers/video/tegra/Kconfig +++ b/drivers/video/tegra/Kconfig @@ -14,6 +14,14 @@ config TEGRA_GRHOST_USE_NVMAP Use nvmap as the graphics memory manager. This is the only choice at the moment. +config TEGRA_GRHOST_DEFAULT_TIMEOUT + depends on TEGRA_GRHOST + int "Default timeout for submits" + default 0 if TEGRA_SIMULATION_PLATFORM + default 30000 + help + Default timeout for jobs in milliseconds. Set to zero for no timeout. + config TEGRA_DC tristate "Tegra Display Contoller" depends on ARCH_TEGRA && TEGRA_GRHOST diff --git a/drivers/video/tegra/host/bus_client.c b/drivers/video/tegra/host/bus_client.c index ae532a2cba27..d72b5dff84f2 100644 --- a/drivers/video/tegra/host/bus_client.c +++ b/drivers/video/tegra/host/bus_client.c @@ -169,8 +169,7 @@ static int nvhost_channelopen(struct inode *inode, struct file *filp) priv->priority = NVHOST_PRIORITY_MEDIUM; priv->clientid = atomic_add_return(1, &nvhost_get_host(ch->dev)->clientid); - priv->timeout = - jiffies_to_msecs(MAX_STUCK_CHECK_COUNT * SYNCPT_CHECK_PERIOD); + priv->timeout = CONFIG_TEGRA_GRHOST_DEFAULT_TIMEOUT; return 0; fail: -- cgit v1.2.3