hwctx does not have any active users anymore. Therefore, remove it.
Change-Id: I78491a038a7d2a7ed35b5c0f46c17fc141edde67
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
#include "nvhost_syncpt.h"
#include "nvhost_channel.h"
#include "nvhost_job.h"
-#include "nvhost_hwctx.h"
#include "nvhost_sync.h"
DEFINE_MUTEX(channel_lock);
struct nvhost_channel_userctx {
struct nvhost_channel *ch;
- struct nvhost_hwctx *hwctx;
struct nvhost_job *job;
u32 timeout;
u32 priority;
nvhost_module_remove_client(priv->ch->dev, priv);
- if (priv->hwctx) {
- struct nvhost_channel *ch = priv->ch;
- struct nvhost_hwctx *ctx = priv->hwctx;
-
- mutex_lock(&ch->submitlock);
- if (ch->cur_ctx == ctx)
- ch->cur_ctx = NULL;
- mutex_unlock(&ch->submitlock);
-
- priv->hwctx->h->put(priv->hwctx);
- }
-
if (priv->job)
nvhost_job_put(priv->job);
if (nvhost_module_add_client(ch->dev, priv))
goto fail_add_client;
- if (ch->ctxhandler && ch->ctxhandler->alloc) {
- ret = nvhost_module_busy(ch->dev);
- if (ret)
- goto fail_priv;
+ /* Check that the device can be powered */
+ ret = nvhost_module_busy(ch->dev);
+ if (ret)
+ goto fail_power_on;
+ nvhost_module_idle(ch->dev);
- priv->hwctx = ch->ctxhandler->alloc(ch->ctxhandler, ch);
- nvhost_module_idle(ch->dev);
- if (!priv->hwctx)
- goto fail_priv;
- }
priv->priority = NVHOST_PRIORITY_MEDIUM;
priv->clientid = atomic_add_return(1,
&nvhost_get_host(ch->dev)->clientid);
priv->timeout = 0;
mutex_unlock(&channel_lock);
return 0;
-fail_priv:
- nvhost_module_remove_client(ch->dev, priv);
+
+fail_power_on:
fail_add_client:
kfree(priv);
fail:
return -EINVAL;
job = nvhost_job_alloc(ctx->ch,
- ctx->hwctx,
num_cmdbufs,
num_relocs,
num_waitchks,
if (err)
goto fail;
- /* set valid id for hwctx_syncpt_idx if hwctx does not provide one */
- if (!ctx->hwctx || ctx->hwctx->h->syncpt == NVSYNCPT_INVALID)
- hwctx_syncpt_idx = 0;
+ hwctx_syncpt_idx = 0;
/*
* Go through each syncpoint from userspace. Here we:
/* Store */
job->sp[i].id = sp.syncpt_id;
job->sp[i].incrs = sp.syncpt_incrs;
-
- /* Find hwctx syncpoint */
- if (ctx->hwctx && (job->sp[i].id == ctx->hwctx->h->syncpt))
- hwctx_syncpt_idx = i;
}
/* Is hwctx_syncpt_idx valid? */
dev_dbg(&priv->ch->dev->dev,
"%s: setting buffer timeout (%d ms) for userctx 0x%p\n",
__func__, priv->timeout, priv);
- if (priv->hwctx)
- priv->hwctx->timeout_ms_max = timeout;
break;
}
case NVHOST_IOCTL_CHANNEL_GET_TIMEDOUT:
- ((struct nvhost_get_param_args *)buf)->value =
- priv->hwctx->has_timedout;
+ ((struct nvhost_get_param_args *)buf)->value = false;
break;
case NVHOST_IOCTL_CHANNEL_SET_PRIORITY:
priv->priority =
dev_dbg(&priv->ch->dev->dev,
"%s: setting buffer timeout (%d ms) for userctx 0x%p\n",
__func__, priv->timeout, priv);
- if (priv->hwctx) {
- priv->hwctx->timeout_ms_max = timeout;
- priv->hwctx->timeout_debug_dump = timeout_debug_dump;
- }
break;
}
default:
.unlocked_ioctl = nvhost_channelctl
};
-struct nvhost_hwctx *nvhost_channel_get_file_hwctx(int fd)
-{
- struct nvhost_channel_userctx *userctx;
- struct file *f = fget(fd);
- if (!f)
- return 0;
-
- if (f->f_op != &nvhost_channelops) {
- fput(f);
- return 0;
- }
-
- userctx = (struct nvhost_channel_userctx *)f->private_data;
- fput(f);
- return userctx->hwctx;
-}
-
static struct {
int class_id;
const char *dev_name;
struct nvhost_syncpt;
struct nvhost_userctx_timeout;
struct nvhost_channel;
-struct nvhost_hwctx;
struct nvhost_cdma;
struct nvhost_job;
struct push_buffer;
return 0;
}
-int nvhost_vic_prepare_poweroff(struct platform_device *dev)
-{
- struct nvhost_device_data *pdata = nvhost_get_devdata(dev);
- struct nvhost_channel *ch = pdata->channels[0];
-
- nvhost_dbg_fn("");
-
- if (ch && ch->dev) {
- mutex_lock(&ch->submitlock);
- ch->cur_ctx = NULL;
- mutex_unlock(&ch->submitlock);
- }
-
- return 0;
-}
-
int nvhost_vic_aggregate_constraints(struct platform_device *dev,
int clk_index,
unsigned long floor_rate,
u32 *mapped;
};
-struct nvhost_hwctx_handler *nvhost_vic03_alloc_hwctx_handler(
- u32 syncpt, struct nvhost_channel *ch);
-
-
int nvhost_vic_prepare_poweroff(struct platform_device *);
int nvhost_flcn_finalize_poweron(struct platform_device *);
int nvhost_vic_finalize_poweron(struct platform_device *);
syncpt_val = nvhost_syncpt_read_min(&dev->syncpt,
cdma->timeout.sp[i].id);
dev_warn(&dev->dev->dev,
- "%s: timeout: %d (%s) ctx 0x%p, HW thresh %d, done %d\n",
+ "%s: timeout: %d (%s) client %d, HW thresh %d, done %d\n",
__func__, cdma->timeout.sp[i].id,
syncpt_op().name(sp, cdma->timeout.sp[i].id),
- cdma->timeout.ctx, syncpt_val,
+ cdma->timeout.clientid, syncpt_val,
cdma->timeout.sp[i].fence);
}
#include "class_ids.h"
#include "nvhost_acm.h"
#include "nvhost_job.h"
-#include "nvhost_hwctx.h"
#include <trace/events/nvhost.h>
#include <linux/slab.h>
#include "nvhost_sync.h"
-#include "nvhost_hwctx.h"
#include "nvhost_intr.h"
#include "class_ids.h"
#include "debug.h"
}
}
-static bool ctxsave_needed(struct nvhost_job *job, struct nvhost_hwctx *cur_ctx)
-{
- struct nvhost_channel *ch = job->ch;
-
- if (!cur_ctx || ch->cur_ctx == job->hwctx ||
- ch->cur_ctx->has_timedout ||
- !ch->cur_ctx->h->save_push)
- return false;
- else
- return true;
-}
-
-static void submit_ctxsave(struct nvhost_job *job, struct nvhost_hwctx *cur_ctx)
-{
- struct nvhost_master *host = nvhost_get_host(job->ch->dev);
- struct nvhost_channel *ch = job->ch;
- u32 syncval;
-
- /* Is a save needed? */
- if (!ctxsave_needed(job, cur_ctx))
- return;
-
- /* Adjust the syncpoint max */
- job->sp[job->hwctx_syncpt_idx].incrs +=
- cur_ctx->save_incrs;
- syncval = nvhost_syncpt_incr_max(&host->syncpt,
- job->sp[job->hwctx_syncpt_idx].id,
- cur_ctx->save_incrs);
-
- /* Send the save to channel */
- cur_ctx->valid = true;
- cur_ctx->h->save_push(cur_ctx, &ch->cdma);
- nvhost_job_get_hwctx(job, cur_ctx);
-
- trace_nvhost_channel_context_save(ch->dev->name, cur_ctx);
-}
-
static void add_sync_waits(struct nvhost_channel *ch, int fd)
{
struct nvhost_master *host = nvhost_get_host(ch->dev);
sync_fence_put(fence);
}
-static void submit_ctxrestore(struct nvhost_job *job)
-{
- struct nvhost_master *host = nvhost_get_host(job->ch->dev);
- struct nvhost_channel *ch = job->ch;
- u32 syncval;
- struct nvhost_hwctx *ctx = job->hwctx;
-
- /* First check if we have a valid context to restore */
- if (ch->cur_ctx == job->hwctx || !job->hwctx ||
- !job->hwctx->valid ||
- !ctx->h->restore_push)
- return;
-
- /* Increment syncpt max */
- job->sp[job->hwctx_syncpt_idx].incrs += ctx->restore_incrs;
- syncval = nvhost_syncpt_incr_max(&host->syncpt,
- job->sp[job->hwctx_syncpt_idx].id,
- ctx->restore_incrs);
-
- /* Send restore buffer to channel */
- ctx->h->restore_push(ctx, &ch->cdma);
-
- trace_nvhost_channel_context_restore(ch->dev->name, ctx);
-}
-
static void submit_nullkickoff(struct nvhost_job *job, u32 user_syncpt_incrs)
{
struct nvhost_channel *ch = job->ch;
memset(completed_waiters, 0, sizeof(void *) * job->num_syncpts);
- /* Bail out on timed out contexts */
- if (job->hwctx && job->hwctx->has_timedout)
- return -ETIMEDOUT;
-
/* Turn on the client module and host1x */
for (i = 0; i < job->num_syncpts; ++i) {
err = nvhost_module_busy(ch->dev);
/* submit_ctxsave() and submit_ctxrestore() use the channel syncpt */
user_syncpt_incrs = hwctx_sp->incrs;
- submit_ctxsave(job, ch->cur_ctx);
- submit_ctxrestore(job);
- ch->cur_ctx = job->hwctx;
-
/* determine fences for all syncpoints */
for (i = 0; i < job->num_syncpts; ++i) {
u32 incrs = (i == job->hwctx_syncpt_idx) ?
return err;
}
-static inline int hwctx_handler_init(struct nvhost_channel *ch)
-{
- int err = 0;
-
- struct nvhost_device_data *pdata = platform_get_drvdata(ch->dev);
- u32 syncpt = NVSYNCPT_INVALID;
-
- if (pdata->alloc_hwctx_handler) {
- ch->ctxhandler = pdata->alloc_hwctx_handler(syncpt, ch);
- if (!ch->ctxhandler)
- err = -ENOMEM;
- }
-
- return err;
-}
-
#ifdef _hw_host1x04_channel_h_
static int t124_channel_init_gather_filter(struct nvhost_channel *ch)
{
ch->aperture = host1x_channel_aperture(dev->aperture, ch->chid);
- return hwctx_handler_init(ch);
+ return 0;
}
static const struct nvhost_channel_ops host1x_channel_ops = {
job = list_first_entry(&cdma->sync_queue, struct nvhost_job, list);
nvhost_debug_output(o, "\n%p: JOB, syncpt_id=%d, syncpt_val=%d,"
- " first_get=%08x, timeout=%d, ctx=%p,"
+ " first_get=%08x, timeout=%d,"
" num_slots=%d, num_handles=%d\n",
job,
job->sp ? job->sp->id : -1,
job->sp ? job->sp->fence : -1,
job->first_get,
job->timeout,
- job->hwctx,
job->num_slots,
job->num_unpins);
+++ /dev/null
-/*
- * drivers/video/tegra/host/host1x/host1x_hwctx.h
- *
- * Tegra Graphics Host HOST1X Hardware Context Interface
- *
- * Copyright (c) 2012-2013, NVIDIA Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef __NVHOST_HOST1X_HWCTX_H
-#define __NVHOST_HOST1X_HWCTX_H
-
-#include <linux/kref.h>
-#include "nvhost_hwctx.h"
-
-struct nvhost_hwctx_handler;
-struct nvhost_channel;
-struct sg_table;
-
-#define to_host1x_hwctx_handler(handler) \
- container_of((handler), struct host1x_hwctx_handler, h)
-#define to_host1x_hwctx(h) container_of((h), struct host1x_hwctx, hwctx)
-#define host1x_hwctx_handler(_hwctx) to_host1x_hwctx_handler((_hwctx)->hwctx.h)
-
-struct host1x_hwctx {
- struct nvhost_hwctx hwctx;
-
- u32 restore_size;
- u32 *cpuva;
- dma_addr_t iova;
- bool mem_flag;
-};
-
-struct host1x_hwctx_handler {
- struct nvhost_hwctx_handler h;
-
- u32 restore_size;
- u32 restore_incrs;
- u32 save_incrs;
- u32 save_slots;
- u32 save_size;
- u32 *cpuva;
- dma_addr_t iova;
-};
-
-#endif
#include "nvhost_cdma.h"
#include "nvhost_channel.h"
#include "nvhost_job.h"
-#include "nvhost_hwctx.h"
#include "dev.h"
#include "debug.h"
#include "chip_support.h"
return;
}
- cdma->timeout.ctx = job->hwctx;
cdma->timeout.clientid = job->clientid;
cdma->timeout.sp = job->sp;
cdma->timeout.num_syncpts = job->num_syncpts;
while (ret)
ret = cancel_delayed_work_sync(&cdma->timeout.wq);
- cdma->timeout.ctx = NULL;
cdma->timeout.clientid = 0;
}
/* roll back DMAGET and start up channel again */
cdma_op().timeout_teardown_end(cdma, get_restart);
-
- if (cdma->timeout.ctx)
- cdma->timeout.ctx->has_timedout = true;
}
/**
struct nvhost_job_syncpt *sp; /* buffer syncpoint information */
ktime_t start_ktime; /* starting time */
/* context timeout information */
- struct nvhost_hwctx *ctx;
int clientid;
bool timeout_debug_dump;
int num_syncpts;
#include "dev.h"
#include "nvhost_acm.h"
#include "nvhost_job.h"
-#include "nvhost_hwctx.h"
#include "chip_support.h"
#include <trace/events/nvhost.h>
ch->chid = NVHOST_INVALID_CHANNEL;
ch->dev = NULL;
- kfree(ch->ctxhandler);
- ch->ctxhandler = NULL;
- ch->cur_ctx = NULL;
ch->aperture = NULL;
ch->refcount = 0;
pdata->channels[ch->dev_chid] = NULL;
return ch;
}
-
-static struct nvhost_hwctx *alloc_hwctx(struct nvhost_hwctx_handler *h,
- struct nvhost_channel *ch)
-{
- struct nvhost_hwctx *ctx;
-
- ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
- if (!ctx)
- return NULL;
-
- kref_init(&ctx->ref);
- ctx->h = h;
- ctx->channel = ch;
- ctx->valid = true;
-
- return ctx;
-}
-
-static void free_hwctx(struct kref *ref)
-{
- struct nvhost_hwctx *ctx = container_of(ref, struct nvhost_hwctx, ref);
-
- kfree(ctx);
-}
-
-static void get_hwctx(struct nvhost_hwctx *ctx)
-{
- kref_get(&ctx->ref);
-}
-
-static void put_hwctx(struct nvhost_hwctx *ctx)
-{
- kref_put(&ctx->ref, free_hwctx);
-}
-
-struct nvhost_hwctx_handler *nvhost_alloc_hwctx_handler(u32 syncpt,
- struct nvhost_channel *ch)
-{
- struct nvhost_hwctx_handler *p;
-
- p = kzalloc(sizeof(*p), GFP_KERNEL);
- if (!p)
- return NULL;
-
- p->syncpt = NVSYNCPT_INVALID;
-
- p->alloc = alloc_hwctx;
- p->get = get_hwctx;
- p->put = put_hwctx;
-
- return p;
-}
struct nvhost_master;
struct platform_device;
struct nvhost_channel;
-struct nvhost_hwctx;
struct nvhost_channel_ops {
const char *soc_name;
int dev_chid;
struct mutex submitlock;
void __iomem *aperture;
- struct nvhost_hwctx *cur_ctx;
struct platform_device *dev;
- struct nvhost_hwctx_handler *ctxhandler;
struct nvhost_cdma cdma;
/* the address space block here
int nvhost_channel_suspend(struct nvhost_channel *ch);
int nvhost_channel_read_reg(struct nvhost_channel *channel,
- struct nvhost_hwctx *hwctx,
u32 offset, u32 *value);
struct nvhost_channel *nvhost_alloc_channel_internal(int chindex,
void nvhost_channel_init_gather_filter(struct nvhost_channel *ch);
-struct nvhost_hwctx *nvhost_channel_get_file_hwctx(int fd);
-
-struct nvhost_hwctx_handler *nvhost_alloc_hwctx_handler(u32 syncpt,
- struct nvhost_channel *ch);
-
#endif
+++ /dev/null
-/*
- * Tegra Graphics Host Hardware Context Interface
- *
- * 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,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __NVHOST_HWCTX_H
-#define __NVHOST_HWCTX_H
-
-#include <linux/string.h>
-#include <linux/kref.h>
-
-#include <linux/nvhost.h>
-
-struct nvhost_channel;
-struct nvhost_cdma;
-struct mem_mgr;
-struct dma_buf;
-struct nvhost_dbg_session;
-
-struct nvhost_hwctx {
- struct kref ref;
- struct nvhost_hwctx_handler *h;
- struct nvhost_channel *channel;
- bool valid;
- bool has_timedout;
- u32 timeout_ms_max;
- bool timeout_debug_dump;
-
- u32 save_incrs;
- u32 save_slots;
-
- u32 restore_incrs;
- void *priv; /* chip support state */
-
- struct list_head as_share_bound_list_node;
- struct nvhost_as_share *as_share;
-};
-
-struct nvhost_hwctx_handler {
- struct nvhost_hwctx * (*alloc) (struct nvhost_hwctx_handler *h,
- struct nvhost_channel *ch);
- void (*get) (struct nvhost_hwctx *ctx);
- void (*put) (struct nvhost_hwctx *ctx);
- void (*save_push) (struct nvhost_hwctx *ctx,
- struct nvhost_cdma *cdma);
- void (*restore_push) (struct nvhost_hwctx *ctx,
- struct nvhost_cdma *cdma);
- u32 syncpt;
- void *priv;
-};
-
-
-struct hwctx_reginfo {
- unsigned int offset:12;
- unsigned int count:16;
- unsigned int type:2;
- unsigned int rst_off; //restore reg offset.
-};
-
-enum {
- HWCTX_REGINFO_DIRECT = 0,
- HWCTX_REGINFO_INDIRECT,
- HWCTX_REGINFO_INDIRECT_4X
-};
-
-#define HWCTX_REGINFO(offset, count, type) {offset, count, HWCTX_REGINFO_##type, offset}
-#define HWCTX_REGINFO_RST(offset, count, type, rst) {offset, count, HWCTX_REGINFO_##type, rst}
-
-#endif
#include <linux/gk20a.h>
#include "nvhost_channel.h"
-#include "nvhost_hwctx.h"
#include "chip_support.h"
/*** Wait list management ***/
#include <trace/events/nvhost.h>
#include "nvhost_channel.h"
#include "nvhost_job.h"
-#include "nvhost_hwctx.h"
#include "nvhost_syncpt.h"
#include "dev.h"
#include "chip_support.h"
}
struct nvhost_job *nvhost_job_alloc(struct nvhost_channel *ch,
- struct nvhost_hwctx *hwctx,
int num_cmdbufs, int num_relocs, int num_waitchks,
int num_syncpts)
{
kref_init(&job->ref);
job->ch = ch;
- job->hwctx = hwctx;
job->size = size;
- if (hwctx)
- hwctx->h->get(hwctx);
init_fields(job, num_cmdbufs, num_relocs, num_waitchks, num_syncpts);
{
struct nvhost_job *job = container_of(ref, struct nvhost_job, ref);
- if (job->hwctxref)
- job->hwctxref->h->put(job->hwctxref);
- if (job->hwctx)
- job->hwctx->h->put(job->hwctx);
if (job->error_notifier_ref)
dma_buf_put(job->error_notifier_ref);
if (job->size <= PAGE_SIZE)
vfree(job);
}
-/* Acquire reference to a hardware context. Used for keeping saved contexts in
- * memory. */
-void nvhost_job_get_hwctx(struct nvhost_job *job, struct nvhost_hwctx *hwctx)
-{
- if (job->hwctxref)
- job->hwctxref->h->put(job->hwctxref);
-
- job->hwctxref = hwctx;
- hwctx->h->get(hwctx);
-}
-
void nvhost_job_put(struct nvhost_job *job)
{
kref_put(&job->ref, job_free);
job->first_get);
dev_info(dev, " TIMEOUT %d\n",
job->timeout);
- dev_info(dev, " CTX 0x%p\n",
- job->hwctx);
dev_info(dev, " NUM_SLOTS %d\n",
job->num_slots);
dev_info(dev, " NUM_HANDLES %d\n",
#include <linux/dma-buf.h>
struct nvhost_channel;
-struct nvhost_hwctx;
struct nvhost_waitchk;
struct nvhost_syncpt;
struct sg_table;
struct nvhost_channel *ch;
/* Hardware context valid for this client */
- struct nvhost_hwctx *hwctx;
int clientid;
/* Gathers and their memory */
int first_get;
int num_slots;
- /* Context to be freed */
- struct nvhost_hwctx *hwctxref;
-
/* Set to true to force an added wait-for-idle before the job */
int serialize;
* accomodate the submit announced in submit header.
*/
struct nvhost_job *nvhost_job_alloc(struct nvhost_channel *ch,
- struct nvhost_hwctx *hwctx,
int num_cmdbufs, int num_relocs, int num_waitchks,
int num_syncpts);
*/
void nvhost_job_get(struct nvhost_job *job);
-/*
- * Increment reference for a hardware context.
- */
-void nvhost_job_get_hwctx(struct nvhost_job *job, struct nvhost_hwctx *hwctx);
-
/*
* Decrement reference job, free if goes to zero.
*/
.finalize_poweron = nvhost_isp_t124_finalize_poweron,
.prepare_poweroff = nvhost_isp_t124_prepare_poweroff,
.ctrl_ops = &tegra_isp_ctrl_ops,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
};
static struct platform_device tegra_isp01_device = {
.finalize_poweron = nvhost_isp_t124_finalize_poweron,
.prepare_poweroff = nvhost_isp_t124_prepare_poweroff,
.ctrl_ops = &tegra_isp_ctrl_ops,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
};
.finalize_poweron = nvhost_vi_finalize_poweron,
.ctrl_ops = &tegra_vi_ctrl_ops,
.reset = nvhost_vi_reset_all,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
};
EXPORT_SYMBOL(t124_vi_info);
.ctrl_ops = &tegra_vi_ctrl_ops,
.reset = nvhost_vi_reset,
.slave = &tegra_vi01b_device,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
};
EXPORT_SYMBOL(t124_vi_info);
.ctrl_ops = &tegra_vi_ctrl_ops,
.master = &tegra_vi01_device,
.reset = nvhost_vi_reset,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
};
NVHOST_DEFAULT_CLOCKGATE_DELAY,
.moduleid = NVHOST_MODULE_VIC,
.class = NV_GRAPHICS_VIC_CLASS_ID,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.can_powergate = true,
.engine_can_cg = true,
.engine_cg_regs = t12x_vic_gating_registers,
.powergate_delay = 500,
.powergate_ids = { TEGRA_POWERGATE_VIC, -1 },
.finalize_poweron = nvhost_vic_finalize_poweron,
- .prepare_poweroff = nvhost_vic_prepare_poweroff,
.scaling_init = nvhost_scale3d_init,
.scaling_deinit = nvhost_scale3d_deinit,
.busy = nvhost_scale_notify_busy,
struct nvhost_chip_support *);
int nvhost_init_t124_as_support(struct nvhost_chip_support *);
-/* these sort of stick out, per module support */
-int t124_nvhost_hwctx_handler_init(struct nvhost_channel *ch);
-
struct gk20a;
struct t124 {
.prepare_poweroff = nvhost_isp_t124_prepare_poweroff,
.moduleid = NVHOST_MODULE_ISP,
.ctrl_ops = &tegra_isp_ctrl_ops,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
.bond_out_id = BOND_OUT_ISP,
};
.finalize_poweron = nvhost_isp_t210_finalize_poweron,
.prepare_poweroff = nvhost_isp_t124_prepare_poweroff,
.ctrl_ops = &tegra_isp_ctrl_ops,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
.bond_out_id = BOND_OUT_ISP,
};
{"emc", 0, NVHOST_MODULE_ID_EXTERNAL_MEMORY_CONTROLLER} },
.ctrl_ops = &tegra_vi_ctrl_ops,
.num_channels = 6,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.slcg_notifier_enable = true,
.gather_filter_enabled = true,
.bond_out_id = BOND_OUT_VI,
.moduleid = NVHOST_MODULE_VI,
.ctrl_ops = &tegra_vi_ctrl_ops,
.num_channels = 1,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
.bond_out_id = BOND_OUT_VI,
};
.ctrl_ops = &tegra_vi_ctrl_ops,
.slave = &tegra_vi01b_device,
.num_channels = 1,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
.gather_filter_enabled = true,
.bond_out_id = BOND_OUT_VI,
};
.powergate_delay = 500,
.moduleid = NVHOST_MODULE_VIC,
.class = NV_GRAPHICS_VIC_CLASS_ID,
- .alloc_hwctx_handler = nvhost_alloc_hwctx_handler,
- .prepare_poweroff = nvhost_vic_prepare_poweroff,
.engine_cg_regs = t21x_vic_gating_registers,
.engine_can_cg = true,
.poweron_toggle_slcg = true,
#include "nvhost_cdma.h"
#include "host1x/host1x01_hardware.h"
#include "class_ids.h"
-#include "host1x/host1x_hwctx.h"
#include "tsec_methods.h"
#include "tsec_drv.h"
goto exit;
}
- job = nvhost_job_alloc(channel, NULL, 0, 0, 0, syncpt_incrs);
+ job = nvhost_job_alloc(channel, 0, 0, 0, syncpt_incrs);
if (!job) {
err = -ENOMEM;
goto exit;
#include "nvhost_cdma.h"
#include "host1x/host1x01_hardware.h"
#include "class_ids.h"
-#include "host1x/host1x_hwctx.h"
-#include "class_ids.h"
#include "nvhost_cdma.h"
#include "t210/t210.h"