blob: b172bf2eedb92ee32304c583c585dbfdcb63962a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*
* Samsung Exynos5 SoC series FIMC-IS driver
*
*
* Copyright (c) 2011 Samsung Electronics Co., Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef FIMC_IS_MEM_H
#define FIMC_IS_MEM_H
#include <linux/platform_device.h>
#include <media/videobuf2-core.h>
#if defined(CONFIG_VIDEOBUF2_CMA_PHYS)
#include <media/videobuf2-cma-phys.h>
#elif defined(CONFIG_VIDEOBUF2_ION)
#include <media/videobuf2-ion.h>
#endif
struct fimc_is_minfo {
dma_addr_t base; /* buffer base */
size_t size; /* total length */
dma_addr_t vaddr_base; /* buffer base */
dma_addr_t vaddr_curr; /* current addr */
void *bitproc_buf;
void *fw_cookie;
dma_addr_t dvaddr;
ulong kvaddr;
u32 dvaddr_debug;
ulong kvaddr_debug;
u32 dvaddr_fshared;
ulong kvaddr_fshared;
u32 dvaddr_region;
ulong kvaddr_region;
u32 dvaddr_shared; /*shared region of is region*/
ulong kvaddr_shared;
u32 dvaddr_odc;
ulong kvaddr_odc;
u32 dvaddr_dis;
ulong kvaddr_dis;
u32 dvaddr_3dnr;
ulong kvaddr_3dnr;
};
struct fimc_is_vb2 {
const struct vb2_mem_ops *ops;
void *(*init)(struct platform_device *pdev);
void (*cleanup)(void *alloc_ctx);
unsigned long (*plane_dvaddr)(ulong cookie, u32 plane_no);
unsigned long (*plane_kvaddr)(struct vb2_buffer *vb, u32 plane_no);
unsigned long (*plane_cookie)(struct vb2_buffer *vb, u32 plane_no);
int (*resume)(void *alloc_ctx);
void (*suspend)(void *alloc_ctx);
void (*set_cacheable)(void *alloc_ctx, bool cacheable);
};
struct fimc_is_mem {
struct platform_device *pdev;
struct vb2_alloc_ctx *alloc_ctx;
const struct fimc_is_vb2 *vb2;
};
int fimc_is_mem_probe(struct fimc_is_mem *this,
struct platform_device *pdev);
#endif
|