summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2012-06-13 11:57:59 +0300
committerSimone Willett <swillett@nvidia.com>2012-06-14 16:46:27 -0700
commitc986dcfd3bfae55fbab9d27c2be57464011f7b28 (patch)
tree06173bc125ec7f1ffab2f55d412e45a1c49c7e5e /drivers/video/tegra/host
parentadbf834b42fa4a671b36354787bddcde9765e83b (diff)
video: tegra: host: Remove version from dev name
Remove version from nvhost_device name, and use a new field, version, to distinguish between IP versions. This restores the sysfs API for 3D clock scaling back to its original path. Change-Id: I444ef728b7cab9e5ea3a08f3c7be0f1661209686 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/108501 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host')
-rw-r--r--drivers/video/tegra/host/bus.c3
-rw-r--r--drivers/video/tegra/host/gr3d/gr3d.c12
-rw-r--r--drivers/video/tegra/host/mpe/mpe.c12
-rw-r--r--drivers/video/tegra/host/t20/t20.c6
-rw-r--r--drivers/video/tegra/host/t30/t30.c6
5 files changed, 18 insertions, 21 deletions
diff --git a/drivers/video/tegra/host/bus.c b/drivers/video/tegra/host/bus.c
index 3b769f41170d..758a5ca4ad94 100644
--- a/drivers/video/tegra/host/bus.c
+++ b/drivers/video/tegra/host/bus.c
@@ -79,7 +79,8 @@ static struct nvhost_device_id *nvhost_bus_match_id(struct nvhost_device *dev,
struct nvhost_device_id *id_table)
{
while (id_table->name[0]) {
- if (strcmp(dev->name, id_table->name) == 0)
+ if (strcmp(dev->name, id_table->name) == 0
+ && dev->version == id_table->version)
return id_table;
id_table++;
}
diff --git a/drivers/video/tegra/host/gr3d/gr3d.c b/drivers/video/tegra/host/gr3d/gr3d.c
index 1ea4414c2cfb..5338ce9edb7a 100644
--- a/drivers/video/tegra/host/gr3d/gr3d.c
+++ b/drivers/video/tegra/host/gr3d/gr3d.c
@@ -157,7 +157,7 @@ int nvhost_gr3d_prepare_power_off(struct nvhost_device *dev)
}
enum gr3d_ip_ver {
- gr3d_01,
+ gr3d_01 = 1,
gr3d_02,
};
@@ -197,8 +197,8 @@ static const struct gr3d_desc gr3d[] = {
};
static struct nvhost_device_id gr3d_id[] = {
- { "gr3d01", gr3d_01 },
- { "gr3d02", gr3d_02 },
+ { "gr3d", gr3d_01 },
+ { "gr3d", gr3d_02 },
{ },
};
@@ -210,7 +210,7 @@ static int __devinit gr3d_probe(struct nvhost_device *dev,
int index = 0;
struct nvhost_driver *drv = to_nvhost_driver(dev->dev.driver);
- index = id_table->driver_data;
+ index = id_table->version;
drv->finalize_poweron = gr3d[index].finalize_poweron;
drv->busy = gr3d[index].busy;
@@ -221,10 +221,6 @@ static int __devinit gr3d_probe(struct nvhost_device *dev,
drv->prepare_poweroff = gr3d[index].prepare_poweroff;
drv->alloc_hwctx_handler = gr3d[index].alloc_hwctx_handler;
- /* reset device name so that consistent device name can be
- * found in clock tree */
- dev->name = "gr3d";
-
nvhost_set_register_sets(tegra_gpu_register_sets());
return nvhost_client_device_init(dev);
}
diff --git a/drivers/video/tegra/host/mpe/mpe.c b/drivers/video/tegra/host/mpe/mpe.c
index 57770ce617d7..9f9055311b35 100644
--- a/drivers/video/tegra/host/mpe/mpe.c
+++ b/drivers/video/tegra/host/mpe/mpe.c
@@ -593,7 +593,7 @@ int nvhost_mpe_prepare_power_off(struct nvhost_device *dev)
}
enum mpe_ip_ver {
- mpe_01,
+ mpe_01 = 1,
mpe_02,
};
@@ -615,8 +615,8 @@ static const struct mpe_desc mpe[] = {
};
static struct nvhost_device_id mpe_id[] = {
- { "mpe01", mpe_01 },
- { "mpe02", mpe_02 },
+ { "mpe", mpe_01 },
+ { "mpe", mpe_02 },
{ },
};
@@ -629,15 +629,11 @@ static int __devinit mpe_probe(struct nvhost_device *dev,
int index = 0;
struct nvhost_driver *drv = to_nvhost_driver(dev->dev.driver);
- index = id_table->driver_data;
+ index = id_table->version;
drv->prepare_poweroff = mpe[index].prepare_poweroff;
drv->alloc_hwctx_handler = mpe[index].alloc_hwctx_handler;
- /* reset device name so that consistent device name can be
- * found in clock tree */
- dev->name = "mpe";
-
err = nvhost_client_device_get_resources(dev);
if (err)
return err;
diff --git a/drivers/video/tegra/host/t20/t20.c b/drivers/video/tegra/host/t20/t20.c
index 9b27c74ffd48..93e73e501ce0 100644
--- a/drivers/video/tegra/host/t20/t20.c
+++ b/drivers/video/tegra/host/t20/t20.c
@@ -118,7 +118,8 @@ static struct nvhost_device tegra_display01_device = {
};
static struct nvhost_device tegra_gr3d01_device = {
- .name = "gr3d01",
+ .name = "gr3d",
+ .version = 1,
.id = -1,
.index = 1,
.syncpts = BIT(NVSYNCPT_3D),
@@ -204,7 +205,8 @@ static struct resource tegra_mpe01_resources[] = {
};
static struct nvhost_device tegra_mpe01_device = {
- .name = "mpe01",
+ .name = "mpe",
+ .version = 1,
.id = -1,
.resource = tegra_mpe01_resources,
.num_resources = ARRAY_SIZE(tegra_mpe01_resources),
diff --git a/drivers/video/tegra/host/t30/t30.c b/drivers/video/tegra/host/t30/t30.c
index 9f43036c8523..b74c561c05aa 100644
--- a/drivers/video/tegra/host/t30/t30.c
+++ b/drivers/video/tegra/host/t30/t30.c
@@ -118,7 +118,8 @@ static struct nvhost_device tegra_display01_device = {
};
static struct nvhost_device tegra_gr3d02_device = {
- .name = "gr3d02",
+ .name = "gr3d",
+ .version = 2,
.id = -1,
.index = 1,
.syncpts = BIT(NVSYNCPT_3D),
@@ -210,7 +211,8 @@ static struct resource tegra_mpe01_resources[] = {
};
static struct nvhost_device tegra_mpe02_device = {
- .name = "mpe02",
+ .name = "mpe",
+ .version = 2,
.id = -1,
.resource = tegra_mpe01_resources,
.num_resources = ARRAY_SIZE(tegra_mpe01_resources),