aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/coda/coda.h
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-07-23 17:28:40 +0200
committerKamil Debski <k.debski@samsung.com>2014-08-05 17:18:43 +0200
commitad7999aafab9b76efe28f585d79fb95d4301eb01 (patch)
tree17efe0d809f6d1eec2702f4f7ed97b9aaaed8d9f /drivers/media/platform/coda/coda.h
parent8862ae7291b2592b870755e182014a64e0565b5d (diff)
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>
Diffstat (limited to 'drivers/media/platform/coda/coda.h')
-rw-r--r--drivers/media/platform/coda/coda.h13
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;

Privacy Policy