diff options
Diffstat (limited to 'drivers/media/platform/coda/coda.h')
-rw-r--r-- | drivers/media/platform/coda/coda.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h index 0c35cd5032ff..6a5c8f6c688e 100644 --- a/drivers/media/platform/coda/coda.h +++ b/drivers/media/platform/coda/coda.h | |||
@@ -12,6 +12,9 @@ | |||
12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef __CODA_H__ | ||
16 | #define __CODA_H__ | ||
17 | |||
15 | #include <linux/debugfs.h> | 18 | #include <linux/debugfs.h> |
16 | #include <linux/irqreturn.h> | 19 | #include <linux/irqreturn.h> |
17 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
@@ -26,7 +29,6 @@ | |||
26 | #include "coda_regs.h" | 29 | #include "coda_regs.h" |
27 | 30 | ||
28 | #define CODA_MAX_FRAMEBUFFERS 8 | 31 | #define CODA_MAX_FRAMEBUFFERS 8 |
29 | #define CODA_MAX_FRAME_SIZE 0x100000 | ||
30 | #define FMO_SLICE_SAVE_BUF_SIZE (32) | 32 | #define FMO_SLICE_SAVE_BUF_SIZE (32) |
31 | 33 | ||
32 | enum { | 34 | enum { |
@@ -178,6 +180,7 @@ struct coda_ctx; | |||
178 | struct coda_context_ops { | 180 | struct coda_context_ops { |
179 | int (*queue_init)(void *priv, struct vb2_queue *src_vq, | 181 | int (*queue_init)(void *priv, struct vb2_queue *src_vq, |
180 | struct vb2_queue *dst_vq); | 182 | struct vb2_queue *dst_vq); |
183 | int (*reqbufs)(struct coda_ctx *ctx, struct v4l2_requestbuffers *rb); | ||
181 | int (*start_streaming)(struct coda_ctx *ctx); | 184 | int (*start_streaming)(struct coda_ctx *ctx); |
182 | int (*prepare_run)(struct coda_ctx *ctx); | 185 | int (*prepare_run)(struct coda_ctx *ctx); |
183 | void (*finish_run)(struct coda_ctx *ctx); | 186 | void (*finish_run)(struct coda_ctx *ctx); |
@@ -249,13 +252,6 @@ int coda_alloc_aux_buf(struct coda_dev *dev, struct coda_aux_buf *buf, | |||
249 | size_t size, const char *name, struct dentry *parent); | 252 | size_t size, const char *name, struct dentry *parent); |
250 | void coda_free_aux_buf(struct coda_dev *dev, struct coda_aux_buf *buf); | 253 | void coda_free_aux_buf(struct coda_dev *dev, struct coda_aux_buf *buf); |
251 | 254 | ||
252 | static inline int coda_alloc_context_buf(struct coda_ctx *ctx, | ||
253 | struct coda_aux_buf *buf, size_t size, | ||
254 | const char *name) | ||
255 | { | ||
256 | return coda_alloc_aux_buf(ctx->dev, buf, size, name, ctx->debugfs_entry); | ||
257 | } | ||
258 | |||
259 | int coda_encoder_queue_init(void *priv, struct vb2_queue *src_vq, | 255 | int coda_encoder_queue_init(void *priv, struct vb2_queue *src_vq, |
260 | struct vb2_queue *dst_vq); | 256 | struct vb2_queue *dst_vq); |
261 | int coda_decoder_queue_init(void *priv, struct vb2_queue *src_vq, | 257 | int coda_decoder_queue_init(void *priv, struct vb2_queue *src_vq, |
@@ -263,7 +259,7 @@ int coda_decoder_queue_init(void *priv, struct vb2_queue *src_vq, | |||
263 | 259 | ||
264 | int coda_hw_reset(struct coda_ctx *ctx); | 260 | int coda_hw_reset(struct coda_ctx *ctx); |
265 | 261 | ||
266 | void coda_fill_bitstream(struct coda_ctx *ctx); | 262 | void coda_fill_bitstream(struct coda_ctx *ctx, bool streaming); |
267 | 263 | ||
268 | void coda_set_gdi_regs(struct coda_ctx *ctx); | 264 | void coda_set_gdi_regs(struct coda_ctx *ctx); |
269 | 265 | ||
@@ -284,7 +280,7 @@ const char *coda_product_name(int product); | |||
284 | 280 | ||
285 | int coda_check_firmware(struct coda_dev *dev); | 281 | int coda_check_firmware(struct coda_dev *dev); |
286 | 282 | ||
287 | static inline int coda_get_bitstream_payload(struct coda_ctx *ctx) | 283 | static inline unsigned int coda_get_bitstream_payload(struct coda_ctx *ctx) |
288 | { | 284 | { |
289 | return kfifo_len(&ctx->bitstream_fifo); | 285 | return kfifo_len(&ctx->bitstream_fifo); |
290 | } | 286 | } |
@@ -301,3 +297,5 @@ extern const struct coda_context_ops coda_bit_encode_ops; | |||
301 | extern const struct coda_context_ops coda_bit_decode_ops; | 297 | extern const struct coda_context_ops coda_bit_decode_ops; |
302 | 298 | ||
303 | irqreturn_t coda_irq_handler(int irq, void *data); | 299 | irqreturn_t coda_irq_handler(int irq, void *data); |
300 | |||
301 | #endif /* __CODA_H__ */ | ||