]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/video/sh_mobile_meram.h
sh_mobile_meram: MERAM framework for LCDC
[mirror_ubuntu-bionic-kernel.git] / include / video / sh_mobile_meram.h
CommitLineData
7caa4342
DHG
1#ifndef __VIDEO_SH_MOBILE_MERAM_H__
2#define __VIDEO_SH_MOBILE_MERAM_H__
3
4/* For sh_mobile_meram_info.addr_mode */
5enum {
6 SH_MOBILE_MERAM_MODE0 = 0,
7 SH_MOBILE_MERAM_MODE1
8};
9
10enum {
11 SH_MOBILE_MERAM_PF_NV = 0,
12 SH_MOBILE_MERAM_PF_RGB
13};
14
15
16struct sh_mobile_meram_priv;
17struct sh_mobile_meram_ops;
18
19struct sh_mobile_meram_info {
20 int addr_mode;
21 struct sh_mobile_meram_ops *ops;
22 struct sh_mobile_meram_priv *priv;
23 struct platform_device *pdev;
24};
25
26/* icb config */
27struct sh_mobile_meram_icb {
28 int marker_icb; /* ICB # for Marker ICB */
29 int cache_icb; /* ICB # for Cache ICB */
30 int meram_offset; /* MERAM Buffer Offset to use */
31 int meram_size; /* MERAM Buffer Size to use */
32
33 int cache_unit; /* bytes to cache per ICB */
34};
35
36struct sh_mobile_meram_cfg {
37 struct sh_mobile_meram_icb icb[2];
38 int pixelformat;
39 int current_reg;
40};
41
42struct module;
43struct sh_mobile_meram_ops {
44 struct module *module;
45 /* register usage of meram */
46 int (*meram_register)(struct sh_mobile_meram_info *meram_dev,
47 struct sh_mobile_meram_cfg *cfg,
48 int xres, int yres, int pixelformat,
49 unsigned long base_addr_y,
50 unsigned long base_addr_c,
51 unsigned long *icb_addr_y,
52 unsigned long *icb_addr_c, int *pitch);
53
54 /* unregister usage of meram */
55 int (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
56 struct sh_mobile_meram_cfg *cfg);
57
58 /* update meram settings */
59 int (*meram_update)(struct sh_mobile_meram_info *meram_dev,
60 struct sh_mobile_meram_cfg *cfg,
61 unsigned long base_addr_y,
62 unsigned long base_addr_c,
63 unsigned long *icb_addr_y,
64 unsigned long *icb_addr_c);
65};
66
67#endif /* __VIDEO_SH_MOBILE_MERAM_H__ */