diff options
author | Jacek Anaszewski <j.anaszewski@samsung.com> | 2013-11-25 04:58:12 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-12-18 03:13:07 -0500 |
commit | 31dc0ac0d0686a5e9246d83f98105d0aa21eb2b8 (patch) | |
tree | 0f318cf6f017b7f9af820ee5f243be27aca71f77 | |
parent | 170f55bd85d19b06d825c18462fcb5985d6e5508 (diff) |
[media] s5p-jpeg: Rename functions specific to the S5PC210 SoC accordingly
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/platform/s5p-jpeg/jpeg-core.c | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index c5b6873eca71..e11923930623 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c | |||
@@ -213,8 +213,9 @@ static inline struct s5p_jpeg_ctx *fh_to_ctx(struct v4l2_fh *fh) | |||
213 | return container_of(fh, struct s5p_jpeg_ctx, fh); | 213 | return container_of(fh, struct s5p_jpeg_ctx, fh); |
214 | } | 214 | } |
215 | 215 | ||
216 | static inline void jpeg_set_qtbl(void __iomem *regs, const unsigned char *qtbl, | 216 | static inline void s5p_jpeg_set_qtbl(void __iomem *regs, |
217 | unsigned long tab, int len) | 217 | const unsigned char *qtbl, |
218 | unsigned long tab, int len) | ||
218 | { | 219 | { |
219 | int i; | 220 | int i; |
220 | 221 | ||
@@ -222,22 +223,25 @@ static inline void jpeg_set_qtbl(void __iomem *regs, const unsigned char *qtbl, | |||
222 | writel((unsigned int)qtbl[i], regs + tab + (i * 0x04)); | 223 | writel((unsigned int)qtbl[i], regs + tab + (i * 0x04)); |
223 | } | 224 | } |
224 | 225 | ||
225 | static inline void jpeg_set_qtbl_lum(void __iomem *regs, int quality) | 226 | static inline void s5p_jpeg_set_qtbl_lum(void __iomem *regs, int quality) |
226 | { | 227 | { |
227 | /* this driver fills quantisation table 0 with data for luma */ | 228 | /* this driver fills quantisation table 0 with data for luma */ |
228 | jpeg_set_qtbl(regs, qtbl_luminance[quality], S5P_JPG_QTBL_CONTENT(0), | 229 | s5p_jpeg_set_qtbl(regs, qtbl_luminance[quality], |
229 | ARRAY_SIZE(qtbl_luminance[quality])); | 230 | S5P_JPG_QTBL_CONTENT(0), |
231 | ARRAY_SIZE(qtbl_luminance[quality])); | ||
230 | } | 232 | } |
231 | 233 | ||
232 | static inline void jpeg_set_qtbl_chr(void __iomem *regs, int quality) | 234 | static inline void s5p_jpeg_set_qtbl_chr(void __iomem *regs, int quality) |
233 | { | 235 | { |
234 | /* this driver fills quantisation table 1 with data for chroma */ | 236 | /* this driver fills quantisation table 1 with data for chroma */ |
235 | jpeg_set_qtbl(regs, qtbl_chrominance[quality], S5P_JPG_QTBL_CONTENT(1), | 237 | s5p_jpeg_set_qtbl(regs, qtbl_chrominance[quality], |
236 | ARRAY_SIZE(qtbl_chrominance[quality])); | 238 | S5P_JPG_QTBL_CONTENT(1), |
239 | ARRAY_SIZE(qtbl_chrominance[quality])); | ||
237 | } | 240 | } |
238 | 241 | ||
239 | static inline void jpeg_set_htbl(void __iomem *regs, const unsigned char *htbl, | 242 | static inline void s5p_jpeg_set_htbl(void __iomem *regs, |
240 | unsigned long tab, int len) | 243 | const unsigned char *htbl, |
244 | unsigned long tab, int len) | ||
241 | { | 245 | { |
242 | int i; | 246 | int i; |
243 | 247 | ||
@@ -245,28 +249,32 @@ static inline void jpeg_set_htbl(void __iomem *regs, const unsigned char *htbl, | |||
245 | writel((unsigned int)htbl[i], regs + tab + (i * 0x04)); | 249 | writel((unsigned int)htbl[i], regs + tab + (i * 0x04)); |
246 | } | 250 | } |
247 | 251 | ||
248 | static inline void jpeg_set_hdctbl(void __iomem *regs) | 252 | static inline void s5p_jpeg_set_hdctbl(void __iomem *regs) |
249 | { | 253 | { |
250 | /* this driver fills table 0 for this component */ | 254 | /* this driver fills table 0 for this component */ |
251 | jpeg_set_htbl(regs, hdctbl0, S5P_JPG_HDCTBL(0), ARRAY_SIZE(hdctbl0)); | 255 | s5p_jpeg_set_htbl(regs, hdctbl0, S5P_JPG_HDCTBL(0), |
256 | ARRAY_SIZE(hdctbl0)); | ||
252 | } | 257 | } |
253 | 258 | ||
254 | static inline void jpeg_set_hdctblg(void __iomem *regs) | 259 | static inline void s5p_jpeg_set_hdctblg(void __iomem *regs) |
255 | { | 260 | { |
256 | /* this driver fills table 0 for this component */ | 261 | /* this driver fills table 0 for this component */ |
257 | jpeg_set_htbl(regs, hdctblg0, S5P_JPG_HDCTBLG(0), ARRAY_SIZE(hdctblg0)); | 262 | s5p_jpeg_set_htbl(regs, hdctblg0, S5P_JPG_HDCTBLG(0), |
263 | ARRAY_SIZE(hdctblg0)); | ||
258 | } | 264 | } |
259 | 265 | ||
260 | static inline void jpeg_set_hactbl(void __iomem *regs) | 266 | static inline void s5p_jpeg_set_hactbl(void __iomem *regs) |
261 | { | 267 | { |
262 | /* this driver fills table 0 for this component */ | 268 | /* this driver fills table 0 for this component */ |
263 | jpeg_set_htbl(regs, hactbl0, S5P_JPG_HACTBL(0), ARRAY_SIZE(hactbl0)); | 269 | s5p_jpeg_set_htbl(regs, hactbl0, S5P_JPG_HACTBL(0), |
270 | ARRAY_SIZE(hactbl0)); | ||
264 | } | 271 | } |
265 | 272 | ||
266 | static inline void jpeg_set_hactblg(void __iomem *regs) | 273 | static inline void s5p_jpeg_set_hactblg(void __iomem *regs) |
267 | { | 274 | { |
268 | /* this driver fills table 0 for this component */ | 275 | /* this driver fills table 0 for this component */ |
269 | jpeg_set_htbl(regs, hactblg0, S5P_JPG_HACTBLG(0), ARRAY_SIZE(hactblg0)); | 276 | s5p_jpeg_set_htbl(regs, hactblg0, S5P_JPG_HACTBLG(0), |
277 | ARRAY_SIZE(hactblg0)); | ||
270 | } | 278 | } |
271 | 279 | ||
272 | /* | 280 | /* |
@@ -962,8 +970,8 @@ static void s5p_jpeg_device_run(void *priv) | |||
962 | * JPEG IP allows storing 4 quantization tables | 970 | * JPEG IP allows storing 4 quantization tables |
963 | * We fill table 0 for luma and table 1 for chroma | 971 | * We fill table 0 for luma and table 1 for chroma |
964 | */ | 972 | */ |
965 | jpeg_set_qtbl_lum(jpeg->regs, ctx->compr_quality); | 973 | s5p_jpeg_set_qtbl_lum(jpeg->regs, ctx->compr_quality); |
966 | jpeg_set_qtbl_chr(jpeg->regs, ctx->compr_quality); | 974 | s5p_jpeg_set_qtbl_chr(jpeg->regs, ctx->compr_quality); |
967 | /* use table 0 for Y */ | 975 | /* use table 0 for Y */ |
968 | jpeg_qtbl(jpeg->regs, 1, 0); | 976 | jpeg_qtbl(jpeg->regs, 1, 0); |
969 | /* use table 1 for Cb and Cr*/ | 977 | /* use table 1 for Cb and Cr*/ |
@@ -1406,14 +1414,16 @@ static int s5p_jpeg_runtime_suspend(struct device *dev) | |||
1406 | static int s5p_jpeg_runtime_resume(struct device *dev) | 1414 | static int s5p_jpeg_runtime_resume(struct device *dev) |
1407 | { | 1415 | { |
1408 | struct s5p_jpeg *jpeg = dev_get_drvdata(dev); | 1416 | struct s5p_jpeg *jpeg = dev_get_drvdata(dev); |
1417 | |||
1409 | /* | 1418 | /* |
1410 | * JPEG IP allows storing two Huffman tables for each component | 1419 | * JPEG IP allows storing two Huffman tables for each component |
1411 | * We fill table 0 for each component | 1420 | * We fill table 0 for each component |
1412 | */ | 1421 | */ |
1413 | jpeg_set_hdctbl(jpeg->regs); | 1422 | s5p_jpeg_set_hdctbl(jpeg->regs); |
1414 | jpeg_set_hdctblg(jpeg->regs); | 1423 | s5p_jpeg_set_hdctblg(jpeg->regs); |
1415 | jpeg_set_hactbl(jpeg->regs); | 1424 | s5p_jpeg_set_hactbl(jpeg->regs); |
1416 | jpeg_set_hactblg(jpeg->regs); | 1425 | s5p_jpeg_set_hactblg(jpeg->regs); |
1426 | |||
1417 | return 0; | 1427 | return 0; |
1418 | } | 1428 | } |
1419 | 1429 | ||