diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-02-25 11:20:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-31 10:02:39 -0400 |
commit | 80f958f40d702ab322947f648bbd42174facf19d (patch) | |
tree | 88e592c4433f750e0e43e101c3c6bf121845674a | |
parent | f8bca4f52947f0d6c10299b10e4ccf5711688acc (diff) |
[media] s5p-fimc: Remove dependency on fimc-core.h in fimc-lite driver
Drop fimc-lite.h header inclusion to make the exynos-fimc-lite
module independent on other modules. Move struct fimc_fmt
declaration to the driver's private headers as it is used in
multiple modules.
Reported-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-core.h | 31 | ||||
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-lite.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-lite.h | 3 | ||||
-rw-r--r-- | include/media/s5p_fimc.h | 34 |
4 files changed, 35 insertions, 34 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-core.h b/drivers/media/platform/s5p-fimc/fimc-core.h index 6355b3387b96..793333a33b24 100644 --- a/drivers/media/platform/s5p-fimc/fimc-core.h +++ b/drivers/media/platform/s5p-fimc/fimc-core.h | |||
@@ -137,37 +137,6 @@ enum fimc_color_fmt { | |||
137 | #define FIMC_COLOR_RANGE_NARROW (1 << 3) | 137 | #define FIMC_COLOR_RANGE_NARROW (1 << 3) |
138 | 138 | ||
139 | /** | 139 | /** |
140 | * struct fimc_fmt - the driver's internal color format data | ||
141 | * @mbus_code: Media Bus pixel code, -1 if not applicable | ||
142 | * @name: format description | ||
143 | * @fourcc: the fourcc code for this format, 0 if not applicable | ||
144 | * @color: the corresponding fimc_color_fmt | ||
145 | * @memplanes: number of physically non-contiguous data planes | ||
146 | * @colplanes: number of physically contiguous data planes | ||
147 | * @depth: per plane driver's private 'number of bits per pixel' | ||
148 | * @mdataplanes: bitmask indicating meta data plane(s), (1 << plane_no) | ||
149 | * @flags: flags indicating which operation mode format applies to | ||
150 | */ | ||
151 | struct fimc_fmt { | ||
152 | enum v4l2_mbus_pixelcode mbus_code; | ||
153 | char *name; | ||
154 | u32 fourcc; | ||
155 | u32 color; | ||
156 | u16 memplanes; | ||
157 | u16 colplanes; | ||
158 | u8 depth[VIDEO_MAX_PLANES]; | ||
159 | u16 mdataplanes; | ||
160 | u16 flags; | ||
161 | #define FMT_FLAGS_CAM (1 << 0) | ||
162 | #define FMT_FLAGS_M2M_IN (1 << 1) | ||
163 | #define FMT_FLAGS_M2M_OUT (1 << 2) | ||
164 | #define FMT_FLAGS_M2M (1 << 1 | 1 << 2) | ||
165 | #define FMT_HAS_ALPHA (1 << 3) | ||
166 | #define FMT_FLAGS_COMPRESSED (1 << 4) | ||
167 | #define FMT_FLAGS_WRITEBACK (1 << 5) | ||
168 | }; | ||
169 | |||
170 | /** | ||
171 | * struct fimc_dma_offset - pixel offset information for DMA | 140 | * struct fimc_dma_offset - pixel offset information for DMA |
172 | * @y_h: y value horizontal offset | 141 | * @y_h: y value horizontal offset |
173 | * @y_v: y value vertical offset | 142 | * @y_v: y value vertical offset |
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c index 65082fe2578c..a37282e27cb0 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite.c +++ b/drivers/media/platform/s5p-fimc/fimc-lite.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <media/s5p_fimc.h> | 32 | #include <media/s5p_fimc.h> |
33 | 33 | ||
34 | #include "fimc-mdevice.h" | 34 | #include "fimc-mdevice.h" |
35 | #include "fimc-core.h" | ||
36 | #include "fimc-lite.h" | 35 | #include "fimc-lite.h" |
37 | #include "fimc-lite-reg.h" | 36 | #include "fimc-lite-reg.h" |
38 | 37 | ||
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.h b/drivers/media/platform/s5p-fimc/fimc-lite.h index 7085761f8c4b..4c2345086366 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite.h +++ b/drivers/media/platform/s5p-fimc/fimc-lite.h | |||
@@ -20,12 +20,11 @@ | |||
20 | 20 | ||
21 | #include <media/media-entity.h> | 21 | #include <media/media-entity.h> |
22 | #include <media/videobuf2-core.h> | 22 | #include <media/videobuf2-core.h> |
23 | #include <media/v4l2-ctrls.h> | ||
23 | #include <media/v4l2-device.h> | 24 | #include <media/v4l2-device.h> |
24 | #include <media/v4l2-mediabus.h> | 25 | #include <media/v4l2-mediabus.h> |
25 | #include <media/s5p_fimc.h> | 26 | #include <media/s5p_fimc.h> |
26 | 27 | ||
27 | #include "fimc-core.h" | ||
28 | |||
29 | #define FIMC_LITE_DRV_NAME "exynos-fimc-lite" | 28 | #define FIMC_LITE_DRV_NAME "exynos-fimc-lite" |
30 | #define FLITE_CLK_NAME "flite" | 29 | #define FLITE_CLK_NAME "flite" |
31 | #define FIMC_LITE_MAX_DEVS 2 | 30 | #define FIMC_LITE_MAX_DEVS 2 |
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h index e2434bb0b308..2363aff24df7 100644 --- a/include/media/s5p_fimc.h +++ b/include/media/s5p_fimc.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define S5P_FIMC_H_ | 13 | #define S5P_FIMC_H_ |
14 | 14 | ||
15 | #include <media/media-entity.h> | 15 | #include <media/media-entity.h> |
16 | #include <media/v4l2-mediabus.h> | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * Enumeration of data inputs to the camera subsystem. | 19 | * Enumeration of data inputs to the camera subsystem. |
@@ -93,6 +94,39 @@ struct s5p_platform_fimc { | |||
93 | */ | 94 | */ |
94 | #define S5P_FIMC_TX_END_NOTIFY _IO('e', 0) | 95 | #define S5P_FIMC_TX_END_NOTIFY _IO('e', 0) |
95 | 96 | ||
97 | #define FIMC_MAX_PLANES 3 | ||
98 | |||
99 | /** | ||
100 | * struct fimc_fmt - color format data structure | ||
101 | * @mbus_code: media bus pixel code, -1 if not applicable | ||
102 | * @name: format description | ||
103 | * @fourcc: fourcc code for this format, 0 if not applicable | ||
104 | * @color: the driver's private color format id | ||
105 | * @memplanes: number of physically non-contiguous data planes | ||
106 | * @colplanes: number of physically contiguous data planes | ||
107 | * @depth: per plane driver's private 'number of bits per pixel' | ||
108 | * @mdataplanes: bitmask indicating meta data plane(s), (1 << plane_no) | ||
109 | * @flags: flags indicating which operation mode format applies to | ||
110 | */ | ||
111 | struct fimc_fmt { | ||
112 | enum v4l2_mbus_pixelcode mbus_code; | ||
113 | char *name; | ||
114 | u32 fourcc; | ||
115 | u32 color; | ||
116 | u16 memplanes; | ||
117 | u16 colplanes; | ||
118 | u8 depth[FIMC_MAX_PLANES]; | ||
119 | u16 mdataplanes; | ||
120 | u16 flags; | ||
121 | #define FMT_FLAGS_CAM (1 << 0) | ||
122 | #define FMT_FLAGS_M2M_IN (1 << 1) | ||
123 | #define FMT_FLAGS_M2M_OUT (1 << 2) | ||
124 | #define FMT_FLAGS_M2M (1 << 1 | 1 << 2) | ||
125 | #define FMT_HAS_ALPHA (1 << 3) | ||
126 | #define FMT_FLAGS_COMPRESSED (1 << 4) | ||
127 | #define FMT_FLAGS_WRITEBACK (1 << 5) | ||
128 | }; | ||
129 | |||
96 | enum fimc_subdev_index { | 130 | enum fimc_subdev_index { |
97 | IDX_SENSOR, | 131 | IDX_SENSOR, |
98 | IDX_CSIS, | 132 | IDX_CSIS, |