Skip to content

Commit

Permalink
Adapt video memory limit according to wandboard version
Browse files Browse the repository at this point in the history
(cherry picked from commit 11a509c6d0958741af52fd85661c08975d1e271d)
  • Loading branch information
wolfgar committed Jul 31, 2013
1 parent 15bb848 commit c81dfc9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/arm/mach-mx6/board-wand.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,12 @@ static void __init wand_reserve(void) {
phys_addr_t phys;

if (wand_gpu_pdata.reserved_mem_size) {
phys = memblock_alloc_base(wand_gpu_pdata.reserved_mem_size, SZ_4K, SZ_2G);
if (cpu_is_mx6q())
phys = memblock_alloc_base(wand_gpu_pdata.reserved_mem_size, SZ_4K, SZ_2G);
else if (cpu_is_mx6dl())
phys = memblock_alloc_base(wand_gpu_pdata.reserved_mem_size, SZ_4K, SZ_1G);
else
phys = memblock_alloc_base(wand_gpu_pdata.reserved_mem_size, SZ_4K, SZ_512M);
memblock_remove(phys, wand_gpu_pdata.reserved_mem_size);
wand_gpu_pdata.reserved_mem_base = phys;
}
Expand Down

2 comments on commit c81dfc9

@wolfgar
Copy link
Author

@wolfgar wolfgar commented on c81dfc9 Aug 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, this commit is buggy : It seems that when wand_reserve is called cpu type is not yet probed so this code does not behaves properly...

@johnweber
Copy link
Owner

@johnweber johnweber commented on c81dfc9 Aug 3, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.