summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-05-16 04:33:38 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-24 15:39:06 -0400
commit3e431e26c5c3aba6da8a6555ec3d7b7df53f534a (patch)
treede7baabb5bbc4a5d27af36d62c00827b7bad3f54 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
parentdc7af18bf8056c213165d4cd1c55ea0fba9f1341 (diff)
gpu: nvgpu: add PRAMIN support for mem accessors
To support vidmem, implement a way to access buffers via the PRAMIN window instead of just kernel-mapped sysmem buffers for iGPU as of now. Depending on the buffer aperture, choose between the two access types in the buffer memory accessor functions. vmap()/vunmap() pairs are no-ops for buffers that can't be cpu-mapped. Two uses of DMA_ATTR_READ_ONLY are removed in the ucode loading path to support writing to them too via the indirection in addition to cpu. JIRA DNVGPU-23 Change-Id: I282dba6741c6b8224bc12e69c1fb3936bde7e6ed Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1141314 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/pmu_gk20a.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
index 8bf382fd..08ef7738 100644
--- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
@@ -2443,8 +2443,7 @@ static int gk20a_prepare_ucode(struct gk20a *g)
2443 pmu->ucode_image = (u32 *)((u8 *)pmu->desc + 2443 pmu->ucode_image = (u32 *)((u8 *)pmu->desc +
2444 pmu->desc->descriptor_size); 2444 pmu->desc->descriptor_size);
2445 2445
2446 err = gk20a_gmmu_alloc_map_attr(vm, DMA_ATTR_READ_ONLY, 2446 err = gk20a_gmmu_alloc_map(vm, GK20A_PMU_UCODE_SIZE_MAX, &pmu->ucode);
2447 GK20A_PMU_UCODE_SIZE_MAX, &pmu->ucode);
2448 if (err) 2447 if (err)
2449 goto err_release_fw; 2448 goto err_release_fw;
2450 2449