From patchwork Sun Oct 9 02:37:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 8097 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1RCjH4-0008Co-Fz; Sun, 09 Oct 2011 04:38:18 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-1) with esmtp id 1RCjH3-0002Ss-LW; Sun, 09 Oct 2011 04:37:58 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706Ab1JIChz (ORCPT + 3 others); Sat, 8 Oct 2011 22:37:55 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:50774 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641Ab1JIChy (ORCPT ); Sat, 8 Oct 2011 22:37:54 -0400 Received: by wwf22 with SMTP id 22so7606530wwf.1 for ; Sat, 08 Oct 2011 19:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Y9EhhA5PsKVfMndv2jVRFQXXJzBSXyYKuoKkX4bzINo=; b=OkprB4rJ9HJ1Cu9P5v0xZoq05zf6lixGdL2J1kKAezrWuwLbjxYQzOWGC8OHBUHvFc bHULtUvZv48a/+Pgch02dnwpBbLAMe6KlolbwvRqDzneW6POZppSWKVnLoZEnJku8ebB GcNUpRNPaSOzQdA51zqzbhJo5cfXa2WQJpQcw= Received: by 10.216.134.169 with SMTP id s41mr2724103wei.68.1318127865978; Sat, 08 Oct 2011 19:37:45 -0700 (PDT) Received: from localhost.localdomain (216.Red-79-152-171.dynamicIP.rima-tde.net. [79.152.171.216]) by mx.google.com with ESMTPS id z9sm24659188wbn.19.2011.10.08.19.37.44 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 08 Oct 2011 19:37:45 -0700 (PDT) From: Javier Martinez Canillas To: Laurent Pinchart Cc: Sakari Ailus , Enrico , Gary Thomas , Adam Pledger , Deepthy Ravi , linux-media@vger.kernel.org, Javier Martinez Canillas Subject: [PATCH 1/2] omap3isp: video: Decouple buffer obtaining and set ISP entities format Date: Sun, 9 Oct 2011 04:37:32 +0200 Message-Id: <1318127853-1879-2-git-send-email-martinez.javier@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1318127853-1879-1-git-send-email-martinez.javier@gmail.com> References: <1318127853-1879-1-git-send-email-martinez.javier@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.10.9.22715 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1500_1599 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, FROM_NAME_PHRASE 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' X-LSpam-Score: 1.1 (+) X-LSpam-Report: No, score=1.1 required=5.0 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, KB_DATE_CONTAINS_TAB=2.751, RCVD_IN_DNSWL_MED=-2.3, TAB_IN_FROM=2.494, T_DKIM_INVALID=0.01 autolearn=no The ISP driver release the last buffer (waking up the pending process) before returning the next buffer to the caller. This is done on the VD0 interrupt handler. But, by the time the CCDC is executing the VD0 interrupt handler some ISP registers like CCDC_SDR_ADDR are shadowed which means that the values written to it will not take effect until the next frame starts. We have to configure the CCDC during the processing of the current frame in the VD1 interrupt handler. This means the next buffer obtaining and the last buffer releasing occur at different moments. So we have to decouple these two actions. Signed-off-by: Javier Martinez Canillas --- drivers/media/video/omap3isp/ispvideo.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/media/video/omap3isp/ispvideo.c b/drivers/media/video/omap3isp/ispvideo.c index cc73375..c2d4cd9 100644 --- a/drivers/media/video/omap3isp/ispvideo.c +++ b/drivers/media/video/omap3isp/ispvideo.c @@ -635,10 +635,6 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video, else buf->vbuf.sequence = atomic_read(&pipe->frame_number); - buf->state = error ? ISP_BUF_STATE_ERROR : ISP_BUF_STATE_DONE; - - wake_up(&buf->wait); - if (list_empty(&video->dmaqueue)) { if (queue->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) state = ISP_PIPELINE_QUEUE_OUTPUT