diff options
author | Richard Zhao <rizhao@nvidia.com> | 2015-04-16 14:57:10 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-06-06 10:24:40 -0400 |
commit | df67ff6a75cba1fc96ae5fbe7dba260250eae9fd (patch) | |
tree | 7a14ec613736d295d4d06da8e2bf11609290102a /drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |
parent | cb28a538cfbec71b441b29290166c114145d6d60 (diff) |
gpu: nvgpu: add zbc support to vgpu
For both adding and querying zbc entry, added callbacks in gr ops.
Native gpu driver (gk20a) and vgpu will both hook there. For vgpu, it
will add or query zbc entry from RM server.
Bug 1558561
Change-Id: If8a4850ecfbff41d8592664f5f93ad8c25f6fbce
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/732775
(cherry picked from commit a3787cf971128904c2712338087685b02673065d)
Reviewed-on: http://git-master/r/737880
(cherry picked from commit fca2a0457c968656dc29455608f35acab094d816)
Reviewed-on: http://git-master/r/753278
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c index d73eae86..88a933b8 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |||
@@ -588,10 +588,6 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
588 | case NVGPU_GPU_IOCTL_ZBC_SET_TABLE: | 588 | case NVGPU_GPU_IOCTL_ZBC_SET_TABLE: |
589 | set_table_args = (struct nvgpu_gpu_zbc_set_table_args *)buf; | 589 | set_table_args = (struct nvgpu_gpu_zbc_set_table_args *)buf; |
590 | 590 | ||
591 | /* not supported for vgpu */ | ||
592 | if (gk20a_gpu_is_virtual(dev)) | ||
593 | return -ENOMEM; | ||
594 | |||
595 | zbc_val = kzalloc(sizeof(struct zbc_entry), GFP_KERNEL); | 591 | zbc_val = kzalloc(sizeof(struct zbc_entry), GFP_KERNEL); |
596 | if (zbc_val == NULL) | 592 | if (zbc_val == NULL) |
597 | return -ENOMEM; | 593 | return -ENOMEM; |
@@ -616,7 +612,7 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
616 | if (!err) { | 612 | if (!err) { |
617 | err = gk20a_busy(dev); | 613 | err = gk20a_busy(dev); |
618 | if (!err) { | 614 | if (!err) { |
619 | err = gk20a_gr_zbc_set_table(g, &g->gr, | 615 | err = g->ops.gr.zbc_set_table(g, &g->gr, |
620 | zbc_val); | 616 | zbc_val); |
621 | gk20a_idle(dev); | 617 | gk20a_idle(dev); |
622 | } | 618 | } |
@@ -635,7 +631,7 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
635 | zbc_tbl->type = query_table_args->type; | 631 | zbc_tbl->type = query_table_args->type; |
636 | zbc_tbl->index_size = query_table_args->index_size; | 632 | zbc_tbl->index_size = query_table_args->index_size; |
637 | 633 | ||
638 | err = gr_gk20a_query_zbc(g, &g->gr, zbc_tbl); | 634 | err = g->ops.gr.zbc_query_table(g, &g->gr, zbc_tbl); |
639 | 635 | ||
640 | if (!err) { | 636 | if (!err) { |
641 | switch (zbc_tbl->type) { | 637 | switch (zbc_tbl->type) { |