diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-05-31 03:31:27 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:17 -0500 |
commit | 8a2be379cd25f2096ca63a50893688b8cf538691 (patch) | |
tree | 35d68700ae1a409a0b58535dcdfb92ad96b440a0 /drivers/gpu/nvgpu/gp106/hw_fb_gp106.h | |
parent | 9454529abe0ac42d15df01e36898cd2c840de9c8 (diff) |
gpu: nvgpu: detect vidmem configuration from HW
Read video memory size from hardware during initialization for devices
that support it.
JIRA DNVGPU-14
Change-Id: I84e1bca0eaac8dc204e1fb82628acc6b52c3e5cc
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1157212
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/hw_fb_gp106.h')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hw_fb_gp106.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hw_fb_gp106.h b/drivers/gpu/nvgpu/gp106/hw_fb_gp106.h index 42d32ab3..1ab876cd 100644 --- a/drivers/gpu/nvgpu/gp106/hw_fb_gp106.h +++ b/drivers/gpu/nvgpu/gp106/hw_fb_gp106.h | |||
@@ -486,4 +486,20 @@ static inline u32 fb_niso_flush_sysmem_addr_r(void) | |||
486 | { | 486 | { |
487 | return 0x00100c10; | 487 | return 0x00100c10; |
488 | } | 488 | } |
489 | static inline u32 fb_mmu_local_memory_range_r(void) | ||
490 | { | ||
491 | return 0x00100ce0; | ||
492 | } | ||
493 | static inline u32 fb_mmu_local_memory_range_lower_scale_v(u32 r) | ||
494 | { | ||
495 | return (r >> 0) & 0xf; | ||
496 | } | ||
497 | static inline u32 fb_mmu_local_memory_range_lower_mag_v(u32 r) | ||
498 | { | ||
499 | return (r >> 4) & 0x3f; | ||
500 | } | ||
501 | static inline u32 fb_mmu_local_memory_range_ecc_mode_v(u32 r) | ||
502 | { | ||
503 | return (r >> 30) & 0x1; | ||
504 | } | ||
489 | #endif | 505 | #endif |