Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int get_ashmem_file(int fd, struct file **filp, unsigned long *start, unsigned long *len)
- {
- struct file *file = fget(fd);
- unsigned long *smi=0x00400000; //physical address SMI+4, 2mb for now
- if (is_ashmem_file(file)) {
- struct ashmem_area *asma = file->private_data;
- *filp = file;
- *start = asma->file;
- *len = asma->size;
- memcpy((void *)MSM_ASHMEM_BLIT_BASE, asma->file, asma->size); //copy src img from virt to smi via iomem
- *start = smi; //change start addr to smi for blit
- return 0;
- }
- else
- fput(file);
- return -1;
- }
- EXPORT_SYMBOL(get_ashmem_file);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement