diff options
Diffstat (limited to 'drivers/video/tegra/host/t30/t30.c')
-rw-r--r-- | drivers/video/tegra/host/t30/t30.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/video/tegra/host/t30/t30.c b/drivers/video/tegra/host/t30/t30.c index d4113a898882..257ba0849277 100644 --- a/drivers/video/tegra/host/t30/t30.c +++ b/drivers/video/tegra/host/t30/t30.c @@ -68,20 +68,13 @@ struct nvhost_device t30_devices[] = { }, { /* channel 1 */ - .name = "gr3d", + .name = "gr3d02", .id = -1, .index = 1, .syncpts = BIT(NVSYNCPT_3D), .waitbases = BIT(NVWAITBASE_3D), .modulemutexes = BIT(NVMODMUTEX_3D), .class = NV_GRAPHICS_3D_CLASS_ID, - .prepare_poweroff = nvhost_gr3d_prepare_power_off, - .busy = nvhost_scale3d_notify_busy, - .idle = nvhost_scale3d_notify_idle, - .init = nvhost_scale3d_init, - .deinit = nvhost_scale3d_deinit, - .suspend = nvhost_scale3d_suspend, - .alloc_hwctx_handler = nvhost_gr3d_t30_ctxhandler_init, .clocks = { {"gr3d", UINT_MAX}, {"gr3d2", UINT_MAX}, {"emc", UINT_MAX} }, @@ -136,7 +129,7 @@ struct nvhost_device t30_devices[] = { }, { /* channel 5 */ - .name = "mpe", + .name = "mpe02", .id = -1, .index = 5, .syncpts = BIT(NVSYNCPT_MPE) | BIT(NVSYNCPT_MPE_EBM_EOF) | @@ -145,8 +138,6 @@ struct nvhost_device t30_devices[] = { .class = NV_VIDEO_ENCODE_MPEG_CLASS_ID, .waitbasesync = true, .keepalive = true, - .prepare_poweroff = nvhost_mpe_prepare_power_off, - .alloc_hwctx_handler = nvhost_mpe_ctxhandler_init, .clocks = { {"mpe", UINT_MAX}, {"emc", UINT_MAX} }, .powergate_ids = {TEGRA_POWERGATE_MPE, -1}, @@ -174,9 +165,10 @@ static inline int t30_nvhost_hwctx_handler_init(struct nvhost_channel *ch) unsigned long waitbases = ch->dev->waitbases; u32 syncpt = find_first_bit(&syncpts, BITS_PER_LONG); u32 waitbase = find_first_bit(&waitbases, BITS_PER_LONG); + struct nvhost_driver *drv = to_nvhost_driver(ch->dev->dev.driver); - if (ch->dev->alloc_hwctx_handler) { - ch->ctxhandler = ch->dev->alloc_hwctx_handler(syncpt, + if (drv->alloc_hwctx_handler) { + ch->ctxhandler = drv->alloc_hwctx_handler(syncpt, waitbase, ch); if (!ch->ctxhandler) err = -ENOMEM; @@ -238,7 +230,7 @@ struct nvhost_device *t30_get_nvhost_device(char *name) int i; for (i = 0; i < ARRAY_SIZE(t30_devices); i++) { - if (strcmp(t30_devices[i].name, name) == 0) + if (strncmp(t30_devices[i].name, name, strlen(name)) == 0) return &t30_devices[i]; } |