From patchwork Wed Feb 6 05:47:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaik Ameer Basha X-Patchwork-Id: 2101831 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D6EDB3FDF1 for ; Wed, 6 Feb 2013 05:45:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512Ab3BFFpb (ORCPT ); Wed, 6 Feb 2013 00:45:31 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:25255 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461Ab3BFFpa (ORCPT ); Wed, 6 Feb 2013 00:45:30 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MHS00IHUAN5FPC0@mailout1.samsung.com> for linux-media@vger.kernel.org; Wed, 06 Feb 2013 14:45:29 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AC.05.03880.9FDE1115; Wed, 06 Feb 2013 14:45:29 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-50-5111edf95eef Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 8C.05.03880.8FDE1115; Wed, 06 Feb 2013 14:45:29 +0900 (KST) Received: from shaik-linux.sisodomain.com ([107.108.207.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MHS00K16ANI8HT0@mmp1.samsung.com> for linux-media@vger.kernel.org; Wed, 06 Feb 2013 14:45:28 +0900 (KST) From: Shaik Ameer Basha To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com Subject: [PATCH] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish Date: Wed, 06 Feb 2013 11:17:10 +0530 Message-id: <1360129630-22742-1-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsWyRsSkSvfnW8FAg4/feSx6NmxldWD0+LxJ LoAxissmJTUnsyy1SN8ugSvjzcV9LAUNXBUvd/1gbmDcwNHFyMkhIWAicfvYaiYIW0ziwr31 bF2MXBxCAksZJR6fPMsEU3Rg8zRGiMQiRokNP7exQDhrmCT2TfoCVsUmYCix/d4VVhBbREBe 4knvDTYQm1lASuL6xtXsILawgItE46o2oDgHB4uAqsTr6fwgYV4Bd4n3+98xgoQlBBQk5kyy ARkvIbCHTWL1kz6wVhYBAYlvkw+xQNTISmw6wAxxm6TEwRU3WCYwCi5gZFjFKJpakFxQnJSe a6RXnJhbXJqXrpecn7uJERhQp/89k97BuKrB4hCjAAejEg/vDT3BQCHWxLLiytxDjBIczEoi vArbgEK8KYmVValF+fFFpTmpxYcYk4GWT2SWEk3OBwZ7Xkm8obGJuamxqaWRkZmpKWnCSuK8 jKeeBAgJpCeWpGanphakFsFsYeLglGpgVOv+KMB5z26xrcz2q+fLL+569/6B8qRX6couVxZf fMw8YdmSQv/VJ1+UKHR+VIhasD9DzZt5i2zyB5W2tKkXhUQDjHKlBB5pWRYbTXxWcCXV49ni k9WnZnr3qQpuq3OSbpuzOfv/1H0Ckyq2r1v7cf3ZWIV79u8/nXjpl5NYdu3wESXvy3ckpiqx FGckGmoxFxUnAgBtMa6LbAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeLIzCtJLcpLzFFi42I5/e+xgO7Pt4KBBg/WsVr0bNjK6sDo8XmT XABjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYQ1jxpuL+1gKGrgqXu76wdzA uIGji5GTQ0LAROLA5mmMELaYxIV769m6GLk4hAQWMUps+LmNBcJZwySxb9IXJpAqNgFDie33 rrCC2CIC8hJPem+wgdjMAlIS1zeuZgexhQVcJBpXtQHFOThYBFQlXk/nBwnzCrhLvN//jhEk LCGgIDFnks0ERu4FjAyrGEVTC5ILipPSc430ihNzi0vz0vWS83M3MYLD9Zn0DsZVDRaHGAU4 GJV4eG/oCQYKsSaWFVfmHmKU4GBWEuFV2AYU4k1JrKxKLcqPLyrNSS0+xJgMtHsis5Rocj4w lvJK4g2NTcxNjU0tTSxMzCxJE1YS52U89SRASCA9sSQ1OzW1ILUIZgsTB6dUA2NyeGLWiUSf 3Ydzr09b7qOxWyBENDyB4e59d+alqQfbtFvW7IiaOzViyenl/g/4hJU0pTOfTDq5cZ9OksZG iVerjNZf4F9/z+pK9qEmli82QZKTHjFKLf1e2nv+l7pMsARTSmzRk2IN9q2323h37aoWWlp/ 5i5X6s8zchl/hBM2yPI+03tx0EeJpTgj0VCLuag4EQDRIs+TmwIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org fimc_m2m_job_finish() has to be called with the m2m context for the necessary cleanup while resume. But currently fimc_m2m_job_finish() always passes m2m context as NULL. This patch preserves the context before making it null, for necessary cleanup. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/s5p-fimc/fimc-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/fimc-core.c b/drivers/media/platform/s5p-fimc/fimc-core.c index 29f7bb7..a5d7cea 100644 --- a/drivers/media/platform/s5p-fimc/fimc-core.c +++ b/drivers/media/platform/s5p-fimc/fimc-core.c @@ -850,16 +850,18 @@ static int fimc_m2m_suspend(struct fimc_dev *fimc) static int fimc_m2m_resume(struct fimc_dev *fimc) { + struct fimc_ctx *ctx; unsigned long flags; spin_lock_irqsave(&fimc->slock, flags); /* Clear for full H/W setup in first run after resume */ + ctx = fimc->m2m.ctx; fimc->m2m.ctx = NULL; spin_unlock_irqrestore(&fimc->slock, flags); if (test_and_clear_bit(ST_M2M_SUSPENDED, &fimc->state)) - fimc_m2m_job_finish(fimc->m2m.ctx, - VB2_BUF_STATE_ERROR); + fimc_m2m_job_finish(ctx, VB2_BUF_STATE_ERROR); + return 0; }