mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: vgpu: add channel enable support
Bug 200173403 VFND-1568 Change-Id: I3636a77bbbbd719e961dce5ca7ca7bdd5aa33881 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: http://git-master/r/1159620 (cherry picked from commit b22fb6518da15a09c3e298213af5e60b8e6907a2) Reviewed-on: http://git-master/r/1155403 Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
e8b20c12cd
commit
c624f35383
@@ -102,6 +102,23 @@ static void vgpu_channel_free_inst(struct gk20a *g, struct channel_gk20a *ch)
|
||||
WARN_ON(err || msg.ret);
|
||||
}
|
||||
|
||||
static void vgpu_channel_enable(struct channel_gk20a *ch)
|
||||
{
|
||||
struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev);
|
||||
struct tegra_vgpu_cmd_msg msg;
|
||||
struct tegra_vgpu_channel_config_params *p =
|
||||
&msg.params.channel_config;
|
||||
int err;
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
msg.cmd = TEGRA_VGPU_CMD_CHANNEL_ENABLE;
|
||||
msg.handle = platform->virt_handle;
|
||||
p->handle = ch->virt_ctx;
|
||||
err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
|
||||
WARN_ON(err || msg.ret);
|
||||
}
|
||||
|
||||
static void vgpu_channel_disable(struct channel_gk20a *ch)
|
||||
{
|
||||
struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev);
|
||||
@@ -741,7 +758,7 @@ void vgpu_init_fifo_ops(struct gpu_ops *gops)
|
||||
{
|
||||
gops->fifo.bind_channel = vgpu_channel_bind;
|
||||
gops->fifo.unbind_channel = vgpu_channel_unbind;
|
||||
gops->fifo.enable_channel = NULL;
|
||||
gops->fifo.enable_channel = vgpu_channel_enable;
|
||||
gops->fifo.disable_channel = vgpu_channel_disable;
|
||||
gops->fifo.alloc_inst = vgpu_channel_alloc_inst;
|
||||
gops->fifo.free_inst = vgpu_channel_free_inst;
|
||||
|
||||
@@ -94,6 +94,7 @@ enum {
|
||||
TEGRA_VGPU_CMD_TSG_SET_TIMESLICE,
|
||||
TEGRA_VGPU_CMD_TSG_SET_RUNLIST_INTERLEAVE,
|
||||
TEGRA_VGPU_CMD_CHANNEL_FORCE_RESET,
|
||||
TEGRA_VGPU_CMD_CHANNEL_ENABLE,
|
||||
};
|
||||
|
||||
struct tegra_vgpu_connect_params {
|
||||
|
||||
Reference in New Issue
Block a user