aboutsummaryrefslogtreecommitdiffstats
path: root/include/video/sh_mobile_meram.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-12-12 10:36:13 -0500
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-12 17:41:11 -0400
commit481100506b34d666243832c3f2aee905c03cb8e7 (patch)
treecee1b897a4c87c5c211d75d70ecb73095001576b /include/video/sh_mobile_meram.h
parent974d250be2c70c7bf899275b23b241685d4ed7f8 (diff)
fbdev: sh_mobile_meram: Allocate ICBs automatically
Instead of manually specifying the ICBs to use in platform data, allocate them automatically at runtime. The range of reserved ICBs (for instance to be used through UIO), if any, is passed in the platform data reserved_icbs field as a bitmask. The MERAM registration function now returns a pointer to an opaque MERAM object, which is passed to the update and unregistration functions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/video/sh_mobile_meram.h')
-rw-r--r--include/video/sh_mobile_meram.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h
index f7700fcb054a..e0f650c843c7 100644
--- a/include/video/sh_mobile_meram.h
+++ b/include/video/sh_mobile_meram.h
@@ -17,8 +17,13 @@ enum {
17struct sh_mobile_meram_priv; 17struct sh_mobile_meram_priv;
18struct sh_mobile_meram_ops; 18struct sh_mobile_meram_ops;
19 19
20/*
21 * struct sh_mobile_meram_info - MERAM platform data
22 * @reserved_icbs: Bitmask of reserved ICBs (for instance used through UIO)
23 */
20struct sh_mobile_meram_info { 24struct sh_mobile_meram_info {
21 int addr_mode; 25 int addr_mode;
26 u32 reserved_icbs;
22 struct sh_mobile_meram_ops *ops; 27 struct sh_mobile_meram_ops *ops;
23 struct sh_mobile_meram_priv *priv; 28 struct sh_mobile_meram_priv *priv;
24 struct platform_device *pdev; 29 struct platform_device *pdev;
@@ -39,23 +44,23 @@ struct module;
39struct sh_mobile_meram_ops { 44struct sh_mobile_meram_ops {
40 struct module *module; 45 struct module *module;
41 /* register usage of meram */ 46 /* register usage of meram */
42 int (*meram_register)(struct sh_mobile_meram_info *meram_dev, 47 void *(*meram_register)(struct sh_mobile_meram_info *meram_dev,
43 const struct sh_mobile_meram_cfg *cfg, 48 const struct sh_mobile_meram_cfg *cfg,
44 unsigned int xres, unsigned int yres, 49 unsigned int xres, unsigned int yres,
45 unsigned int pixelformat, 50 unsigned int pixelformat,
46 unsigned long base_addr_y, 51 unsigned long base_addr_y,
47 unsigned long base_addr_c, 52 unsigned long base_addr_c,
48 unsigned long *icb_addr_y, 53 unsigned long *icb_addr_y,
49 unsigned long *icb_addr_c, 54 unsigned long *icb_addr_c,
50 unsigned int *pitch); 55 unsigned int *pitch);
51 56
52 /* unregister usage of meram */ 57 /* unregister usage of meram */
53 int (*meram_unregister)(struct sh_mobile_meram_info *meram_dev, 58 int (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
54 const struct sh_mobile_meram_cfg *cfg); 59 void *data);
55 60
56 /* update meram settings */ 61 /* update meram settings */
57 int (*meram_update)(struct sh_mobile_meram_info *meram_dev, 62 int (*meram_update)(struct sh_mobile_meram_info *meram_dev,
58 const struct sh_mobile_meram_cfg *cfg, 63 void *data,
59 unsigned long base_addr_y, 64 unsigned long base_addr_y,
60 unsigned long base_addr_c, 65 unsigned long base_addr_c,
61 unsigned long *icb_addr_y, 66 unsigned long *icb_addr_y,