summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/sim.h
diff options
context:
space:
mode:
authorAntony Clince Alex <aalex@nvidia.com>2018-04-25 00:49:01 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-09 21:25:32 -0400
commit2a23cd249451c952aaab71eaad6cf5f77d2bc6e2 (patch)
treec9804d669872cc78ef2eb7d941c443ebec42b674 /drivers/gpu/nvgpu/common/linux/sim.h
parent703d00d730d230f9ac9970e7d2d22a7d8f0cd2d1 (diff)
gpu: nvgpu: refectored sim_readl/sim_writel
refactored sim_readl and sim_writel to use os-agnostic structures. converted all sim buffers to the type nvgpu_mem and replaced all alloc_page and free_page calls with corresponding nvgpu_dma_alloc/nvgpu_dma_free calls. JIRA VQRM-2368 Change-Id: Ia9d29119d31f239ed16be932cfd16c334002c727 Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1702050 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Sourab Gupta <sourabg@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/sim.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/sim.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/sim.h b/drivers/gpu/nvgpu/common/linux/sim.h
index a9ec0dba..4b5e910c 100644
--- a/drivers/gpu/nvgpu/common/linux/sim.h
+++ b/drivers/gpu/nvgpu/common/linux/sim.h
@@ -2,7 +2,7 @@
2 * 2 *
3 * GK20A sim support 3 * GK20A sim support
4 * 4 *
5 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 5 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License, 8 * under the terms and conditions of the GNU General Public License,
@@ -20,17 +20,16 @@
20#ifndef __SIM_LINUX_H__ 20#ifndef __SIM_LINUX_H__
21#define __SIM_LINUX_H__ 21#define __SIM_LINUX_H__
22 22
23#include <nvgpu/nvgpu_mem.h>
23#include "gk20a/sim_gk20a.h" 24#include "gk20a/sim_gk20a.h"
24 25
25struct sim_gk20a_linux { 26struct sim_gk20a_linux {
26 struct sim_gk20a sim; 27 struct sim_gk20a sim;
27 struct resource *reg_mem; 28 struct resource *reg_mem;
28 void __iomem *regs; 29 void __iomem *regs;
29 struct { 30 struct nvgpu_mem send_bfr;
30 struct page *page; 31 struct nvgpu_mem recv_bfr;
31 void *kvaddr; 32 struct nvgpu_mem msg_bfr;
32 u64 phys;
33 } send_bfr, recv_bfr, msg_bfr;
34}; 33};
35 34
36int gk20a_init_sim_support(struct gk20a *g); 35int gk20a_init_sim_support(struct gk20a *g);