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:
Konsta Holtta
2017-06-05 17:40:44 +03:00
committed by mobile promotions
parent 26487b82df
commit 80197d2c9d
11 changed files with 33 additions and 25 deletions

View File

@@ -86,7 +86,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
.ch_wdt_timeout_ms = 7000,
.vidmem_is_vidmem = true,
.honors_aperture = true,
.vbios_min_version = 0x86063000,
.hardcode_sw_threshold = true,
.ina3221_dcb_index = 0,
@@ -121,7 +121,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
.ch_wdt_timeout_ms = 7000,
.vidmem_is_vidmem = true,
.honors_aperture = true,
.vbios_min_version = 0x86062d00,
.hardcode_sw_threshold = true,
.ina3221_dcb_index = 0,
@@ -156,7 +156,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
.ch_wdt_timeout_ms = 7000,
.vidmem_is_vidmem = true,
.honors_aperture = true,
.vbios_min_version = 0x86063000,
.hardcode_sw_threshold = true,
.ina3221_dcb_index = 0,
@@ -191,7 +191,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
.ch_wdt_timeout_ms = 7000,
.vidmem_is_vidmem = true,
.honors_aperture = true,
.vbios_min_version = 0x86065600,
.hardcode_sw_threshold = false,
.ina3221_dcb_index = 1,