aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/omap3isp/isppreview.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-26 10:24:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-08 14:08:53 -0300
commitb0b29e1e29ee5357f36f27411b5881e470484da5 (patch)
tree70a2b1cf6c6e61b0ab8af8d6a3d59a9a05d69582 /drivers/media/video/omap3isp/isppreview.h
parentbac387efbb88cf0e8df6f46a38387897cea464ee (diff)
[media] omap3isp: preview: Shorten shadow update delay
When applications modify preview engine parameters, the new values are applied to the hardware by the preview engine interrupt handler during vertical blanking. If the parameters are being changed when the interrupt handler is called, it just delays applying the parameters until the next frame. If an application modifies the parameters for every frame, and the preview engine interrupt is triggerred synchronously, the parameters are never applied to the hardware. Fix this by storing new parameters in a shadow copy, and switch the active parameters with the shadow values atomically. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp/isppreview.h')
-rw-r--r--drivers/media/video/omap3isp/isppreview.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/media/video/omap3isp/isppreview.h b/drivers/media/video/omap3isp/isppreview.h
index 6ee830623d5..6663ab64e4b 100644
--- a/drivers/media/video/omap3isp/isppreview.h
+++ b/drivers/media/video/omap3isp/isppreview.h
@@ -69,6 +69,8 @@ enum preview_ycpos_mode {
/*
* struct prev_params - Structure for all configuration
+ * @busy: Bitmask of busy parameters (being updated or used)
+ * @update: Bitmask of the parameters to be updated
* @features: Set of features enabled.
* @cfa: CFA coefficients.
* @csup: Chroma suppression coefficients.
@@ -86,6 +88,8 @@ enum preview_ycpos_mode {
* @brightness: Brightness.
*/
struct prev_params {
+ u32 busy;
+ u32 update;
u32 features;
struct omap3isp_prev_cfa cfa;
struct omap3isp_prev_csup csup;
@@ -118,12 +122,11 @@ struct prev_params {
* @output: Bitmask of the active output
* @video_in: Input video entity
* @video_out: Output video entity
- * @params: Module configuration data
- * @shadow_update: If set, update the hardware configured in the next interrupt
+ * @params.params : Active and shadow parameters sets
+ * @params.active: Bitmask of parameters active in set 0
+ * @params.lock: Parameters lock, protects params.active and params.shadow
* @underrun: Whether the preview entity has queued buffers on the output
* @state: Current preview pipeline state
- * @lock: Shadow update lock
- * @update: Bitmask of the parameters to be updated
*
* This structure is used to store the OMAP ISP Preview module Information.
*/
@@ -140,13 +143,15 @@ struct isp_prev_device {
struct isp_video video_in;
struct isp_video video_out;
- struct prev_params params;
- unsigned int shadow_update:1;
+ struct {
+ struct prev_params params[2];
+ u32 active;
+ spinlock_t lock;
+ } params;
+
enum isp_pipeline_stream_state state;
wait_queue_head_t wait;
atomic_t stopping;
- spinlock_t lock;
- u32 update;
};
struct isp_device;