summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
diff options
context:
space:
mode:
authorAntony Clince Alex <aalex@nvidia.com>2018-05-29 05:59:06 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-15 00:41:31 -0400
commit9751fb0b5405bb283f5bd884115465443f5f8608 (patch)
tree80df0a6e599e33d9b6e3a7e62dd0792e64b30862 /drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
parentd27d9ff7a89ab1a590a9cc8367af7f3a3ea698a8 (diff)
gpu: nvgpu: vgpu: Unified CSS VGPU HAL
- defined platform agnostic wrapper for mempool mapping and unmapping. - used platform agnositc wrapper for device tree parsing. - modified css_gr_gk20a to include special handling incase of rm-server JIRA: VQRM:3699 Change-Id: I08fd26052edfa1edf45a67be57f7d27c38ad106a Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1733576 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
index 764ffe1a..6fd0d330 100644
--- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
@@ -453,15 +453,24 @@ static int css_gr_create_client_data(struct gk20a *g,
453 u32 perfmon_count, 453 u32 perfmon_count,
454 struct gk20a_cs_snapshot_client *cur) 454 struct gk20a_cs_snapshot_client *cur)
455{ 455{
456 memset(cur->snapshot, 0, sizeof(*cur->snapshot)); 456 /*
457 cur->snapshot->start = sizeof(*cur->snapshot); 457 * Special handling in-case of rm-server
458 /* we should be ensure that can fit all fifo entries here */ 458 *
459 cur->snapshot->end = 459 * client snapshot buffer will not be mapped
460 CSS_FIFO_ENTRY_CAPACITY(cur->snapshot_size) 460 * in-case of rm-server its only mapped in
461 * sizeof(struct gk20a_cs_snapshot_fifo_entry) 461 * guest side
462 + sizeof(struct gk20a_cs_snapshot_fifo); 462 */
463 cur->snapshot->get = cur->snapshot->start; 463 if (cur->snapshot) {
464 cur->snapshot->put = cur->snapshot->start; 464 memset(cur->snapshot, 0, sizeof(*cur->snapshot));
465 cur->snapshot->start = sizeof(*cur->snapshot);
466 /* we should be ensure that can fit all fifo entries here */
467 cur->snapshot->end =
468 CSS_FIFO_ENTRY_CAPACITY(cur->snapshot_size)
469 * sizeof(struct gk20a_cs_snapshot_fifo_entry)
470 + sizeof(struct gk20a_cs_snapshot_fifo);
471 cur->snapshot->get = cur->snapshot->start;
472 cur->snapshot->put = cur->snapshot->start;
473 }
465 474
466 cur->perfmon_count = perfmon_count; 475 cur->perfmon_count = perfmon_count;
467 476