diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-07-23 19:28:40 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-22 00:25:21 +0400 |
commit | a1192a17eed8ee30fd0f8d944d66fbe5288641e2 (patch) | |
tree | 47a585ee6420e533084de4b0cc9a9d7c8b501b49 /drivers/media/platform/coda/coda.h | |
parent | a2b3e46acbf1edfc772a15e79ab1dbd20ad55cba (diff) | |
download | linux-a1192a17eed8ee30fd0f8d944d66fbe5288641e2.tar.xz |
[media] coda: add context ops
Add a struct coda_context_ops that encapsulates context specific operations.
This will simplify adding JPEG support in the future and helps to avoid
exporting all functions individually when they move out of the main code
file.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/coda/coda.h')
-rw-r--r-- | drivers/media/platform/coda/coda.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h index aafd1869004b..c98270c2532a 100644 --- a/drivers/media/platform/coda/coda.h +++ b/drivers/media/platform/coda/coda.h @@ -164,6 +164,18 @@ struct gdi_tiled_map { #define GDI_LINEAR_FRAME_MAP 0 }; +struct coda_ctx; + +struct coda_context_ops { + int (*queue_init)(void *priv, struct vb2_queue *src_vq, + struct vb2_queue *dst_vq); + int (*start_streaming)(struct coda_ctx *ctx); + int (*prepare_run)(struct coda_ctx *ctx); + void (*finish_run)(struct coda_ctx *ctx); + void (*seq_end_work)(struct work_struct *work); + void (*release)(struct coda_ctx *ctx); +}; + struct coda_ctx { struct coda_dev *dev; struct mutex buffer_mutex; @@ -171,6 +183,7 @@ struct coda_ctx { struct work_struct pic_run_work; struct work_struct seq_end_work; struct completion completion; + const struct coda_context_ops *ops; int aborting; int initialized; int streamon_out; |