mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
osd: fixed fb mmap failed on android [3/3]
PD#SWPL-6631 Problem: dolby vision graphic tests need fb_test Solution: Alloc buffer when mmap Verify: verified on tm2 t96e2 Change-Id: I12896d7ef9ad4a8122e2784c4692ff2d0bc69d1b Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
This commit is contained in:
@@ -1526,13 +1526,15 @@ static int osd_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
unsigned long start;
|
||||
u32 len;
|
||||
int ret = 0;
|
||||
static int mem_alloced;
|
||||
|
||||
if (!b_alloc_mem) {
|
||||
/* alloc mem when osd_open */
|
||||
if (info->screen_base == NULL) {
|
||||
if (!mem_alloced) {
|
||||
ret = malloc_osd_memory(info);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
mem_alloced = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user