Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cubox] linux: Fix GPU/VPU memory setup
- Loading branch information
1 parent
c0f349d
commit b91abde
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
config/platforms/arm/armada5xx/packages/linux/patches/100_fix_gpu_vpu_memory_setup.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- a/arch/arm/mach-dove/common.c 2016-02-02 14:55:45.809852983 +0100 | ||
+++ b/arch/arm/mach-dove/common.c 2016-02-02 14:55:45.825852983 +0100 | ||
@@ -91,17 +91,14 @@ void __init dove_map_io(void) | ||
#define UIO_DOVE_VMETA_MEM_SIZE 0 | ||
#endif | ||
|
||
-unsigned int vmeta_size = UIO_DOVE_VMETA_MEM_SIZE; | ||
+static unsigned int vmeta_size = UIO_DOVE_VMETA_MEM_SIZE; | ||
|
||
static int __init vmeta_size_setup(char *str) | ||
{ | ||
- get_option(&str, &vmeta_size); | ||
- | ||
- if (!vmeta_size) | ||
- return 1; | ||
- | ||
- vmeta_size <<= 20; | ||
- | ||
+ if (get_option(&str, &vmeta_size) == 1) | ||
+ vmeta_size <<= 20; | ||
+ else | ||
+ vmeta_size = UIO_DOVE_VMETA_MEM_SIZE; | ||
return 1; | ||
} | ||
__setup("vmeta_size=", vmeta_size_setup); | ||
@@ -176,14 +173,14 @@ EXPORT_SYMBOL(dove_vmeta_get_memory_size); | ||
#define DOVE_GPU_MEM_SIZE 0 | ||
#endif | ||
|
||
-unsigned int __initdata gpu_size = DOVE_GPU_MEM_SIZE; | ||
+static unsigned int gpu_size = DOVE_GPU_MEM_SIZE; | ||
|
||
static int __init gpu_size_setup(char *str) | ||
{ | ||
- get_option(&str, &gpu_size); | ||
- if (!gpu_size) | ||
- return 1; | ||
- gpu_size <<= 20; | ||
+ if (get_option(&str, &gpu_size) == 1) | ||
+ gpu_size <<= 20; | ||
+ else | ||
+ gpu_size = DOVE_GPU_MEM_SIZE; | ||
return 1; | ||
} | ||
__setup("gpu_size=", gpu_size_setup); | ||
@@ -234,6 +231,7 @@ unsigned int dove_gpu_get_memory_start(void) | ||
return dove_gpu_memory_start; | ||
} | ||
EXPORT_SYMBOL(dove_gpu_get_memory_start); | ||
+ | ||
int dove_gpu_get_memory_size(void) | ||
{ | ||
return gpu_size; |