[PORT FROM R2] atomisp: Corrupt preview on changing zoom ratio in video mode
authorLokesh Gupta <lokesh.gupta@intel.com>
Tue, 3 Jan 2012 13:19:46 +0000 (14:19 +0100)
committerbuildbot <buildbot@intel.com>
Thu, 19 Jan 2012 11:57:59 +0000 (03:57 -0800)
BZ: 20531

When the ISP is started from within the ISR context, the condition
of first invalid frame was not being handled properly. Therefore, a
corrupt frame was displayed when switching the video binaries. This
patch fixes this issue.

Change-Id: Ia73ae4d871db91fe6c37305d0164777d1f2a07a9
Orig-Change-Id: Idfccb6437ae181fedea1ab61412c59248b29054b
Signed-off-by: Lokesh Gupta <lokesh.gupta@intel.com>
Reviewed-on: http://android.intel.com:8080/30316
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: Kruger, Jozef <jozef.kruger@intel.com>
Reviewed-by: Cohen, David A <david.a.cohen@intel.com>
Reviewed-by: Wang, Wen W <wen.w.wang@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Reviewed-on: http://android.intel.com:8080/32444
Reviewed-by: Lampila, KalleX <kallex.lampila@intel.com>
Tested-by: Lampila, KalleX <kallex.lampila@intel.com>
drivers/media/video/atomisp/atomisp_cmd.c
drivers/media/video/atomisp/css/sh_css.c

index d335a1c..051c92a 100644 (file)
@@ -330,9 +330,11 @@ irqreturn_t atomisp_isr(int irq, void *dev)
        if (irq_infos & SH_CSS_IRQ_INFO_FRAME_DONE) {
                int ret;
 
-               atomisp_buf_done(isp, 0);
-
                if (!isp->sw_contex.invalid_frame) {
+                       /* Signal the upper layers that a frame
+                        * is done, only when it is a valid frame
+                        */
+                       atomisp_buf_done(isp, 0);
                        ret = atomisp_buffer_dequeue(isp, 0);
                        if (ret)
                                /* buffer underrun? */
index 547b321..72e2b90 100644 (file)
@@ -204,6 +204,7 @@ struct sh_css_video_settings {
 { \
        .output_info         = DEFAULT_FRAME_INFO, \
        .vf_info             = DEFAULT_FRAME_INFO, \
+       .invalid_first_frame = true,               \
 }
 
 struct sh_css {