Skip to content

Commit

Permalink
[cubox] linux: Fix GPU/VPU memory setup
Browse files Browse the repository at this point in the history
  • Loading branch information
warped-rudi committed Feb 6, 2016
1 parent c0f349d commit b91abde
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/platforms/arm/armada5xx/packages/linux/meta
Expand Up @@ -2,4 +2,4 @@ PKG_URL_PROTO=git
PKG_URL_REV="1~4237a7e"
PKG_URL="https://github.com/warped-rudi/linux.git"
PKG_VERSION="cubox-3.6.9-patched+${PKG_URL_REV}"
PKG_REV=3
PKG_REV=4
@@ -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;

0 comments on commit b91abde

Please sign in to comment.