mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: split vidmem_is_vidmem
As the vidmem_is_vidmem flag has got two separate meanings in one bit, split it in two bits into the enabled() API: Add NVGPU_MM_HONORS_APERTURE bit, which is the same as vidmem_is_vidmem with its original meaning, and use it to test which aperture bits to write to hardware. Add NVGPU_MM_UNIFIED_MEMORY bit, which has the opposite meaning: that the GPU shares the SoC memory. When this flag is false, the GPU has its own local video memory. Jira NVGPU-86 Change-Id: I2d0bed3b1ede5a712be99323d3035b154bb23c3a Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1496080 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
26487b82df
commit
80197d2c9d
@@ -21,6 +21,7 @@
|
||||
#include <nvgpu/lock.h>
|
||||
#include <nvgpu/bug.h>
|
||||
#include <nvgpu/gmmu.h>
|
||||
#include <nvgpu/enabled.h>
|
||||
|
||||
#include <nvgpu/linux/dma.h>
|
||||
|
||||
@@ -69,7 +70,7 @@ int nvgpu_dma_alloc(struct gk20a *g, size_t size, struct nvgpu_mem *mem)
|
||||
int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size,
|
||||
struct nvgpu_mem *mem)
|
||||
{
|
||||
if (g->mm.vidmem_is_vidmem) {
|
||||
if (!nvgpu_is_enabled(g, NVGPU_MM_UNIFIED_MEMORY)) {
|
||||
/*
|
||||
* Force the no-kernel-mapping flag on because we don't support
|
||||
* the lack of it for vidmem - the user should not care when
|
||||
@@ -251,7 +252,7 @@ int nvgpu_dma_alloc_map(struct vm_gk20a *vm, size_t size,
|
||||
int nvgpu_dma_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags,
|
||||
size_t size, struct nvgpu_mem *mem)
|
||||
{
|
||||
if (vm->mm->vidmem_is_vidmem) {
|
||||
if (!nvgpu_is_enabled(gk20a_from_vm(vm), NVGPU_MM_UNIFIED_MEMORY)) {
|
||||
/*
|
||||
* Force the no-kernel-mapping flag on because we don't support
|
||||
* the lack of it for vidmem - the user should not care when
|
||||
|
||||
Reference in New Issue
Block a user