16 #include <linux/videodev2.h>
21 #define S5P_JPEG_MIN_WIDTH 32
22 #define S5P_JPEG_MIN_HEIGHT 32
23 #define S5P_JPEG_MAX_WIDTH 8192
24 #define S5P_JPEG_MAX_HEIGHT 8192
25 #define S5P_JPEG_ENCODE 0
26 #define S5P_JPEG_DECODE 1
27 #define S5P_JPEG_RAW_IN_565 0
28 #define S5P_JPEG_RAW_IN_422 1
29 #define S5P_JPEG_RAW_OUT_422 0
30 #define S5P_JPEG_RAW_OUT_420 1
50 static inline void jpeg_input_raw_mode(
void __iomem *
regs,
unsigned long mode)
66 static inline void jpeg_input_raw_y16(
void __iomem *regs,
bool y16)
78 static inline void jpeg_proc_mode(
void __iomem *regs,
unsigned long mode)
93 static inline void jpeg_subsampling_mode(
void __iomem *regs,
unsigned int mode)
108 static inline unsigned int jpeg_get_subsampling_mode(
void __iomem *regs)
113 static inline void jpeg_dri(
void __iomem *regs,
unsigned int dri)
119 reg |= (dri >> 8) & 0xff;
128 static inline void jpeg_qtbl(
void __iomem *regs,
unsigned int t,
unsigned int n)
138 static inline void jpeg_htbl_ac(
void __iomem *regs,
unsigned int t)
149 static inline void jpeg_htbl_dc(
void __iomem *regs,
unsigned int t)
160 static inline void jpeg_y(
void __iomem *regs,
unsigned int y)
166 reg |= (y >> 8) & 0xff;
175 static inline void jpeg_x(
void __iomem *regs,
unsigned int x)
181 reg |= (x >> 8) & 0xff;
190 static inline void jpeg_rst_int_enable(
void __iomem *regs,
bool enable)
201 static inline void jpeg_data_num_int_enable(
void __iomem *regs,
bool enable)
212 static inline void jpeg_final_mcu_num_int_enable(
void __iomem *regs,
bool enbl)
223 static inline void jpeg_timer_enable(
void __iomem *regs,
unsigned long val)
234 static inline void jpeg_timer_disable(
void __iomem *regs)
243 static inline int jpeg_timer_stat(
void __iomem *regs)
249 static inline void jpeg_clear_timer_stat(
void __iomem *regs)
258 static inline void jpeg_enc_stream_int(
void __iomem *regs,
unsigned long size)
269 static inline int jpeg_enc_stream_stat(
void __iomem *regs)
275 static inline void jpeg_clear_enc_stream_stat(
void __iomem *regs)
284 static inline void jpeg_outform_raw(
void __iomem *regs,
unsigned long format)
286 unsigned long reg,
f;
299 static inline void jpeg_jpgadr(
void __iomem *regs,
unsigned long addr)
304 static inline void jpeg_imgadr(
void __iomem *regs,
unsigned long addr)
309 static inline void jpeg_coef(
void __iomem *regs,
unsigned int i,
310 unsigned int j,
unsigned int coef)
325 static inline int jpeg_result_stat_ok(
void __iomem *regs)
331 static inline int jpeg_stream_stat_ok(
void __iomem *regs)
337 static inline void jpeg_clear_int(
void __iomem *regs)
346 static inline unsigned int jpeg_compressed_size(
void __iomem *regs)
348 unsigned long jpeg_size = 0;
354 return (
unsigned int)jpeg_size;