From patchwork Mon Jan 18 16:10:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 8055921 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A5BE39F440 for ; Mon, 18 Jan 2016 16:10:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3D7320397 for ; Mon, 18 Jan 2016 16:10:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03577204A9 for ; Mon, 18 Jan 2016 16:10:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755607AbcARQKt (ORCPT ); Mon, 18 Jan 2016 11:10:49 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:59840 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755455AbcARQKs (ORCPT ); Mon, 18 Jan 2016 11:10:48 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O1500W4LOXZND20@mailout2.samsung.com> for linux-media@vger.kernel.org; Tue, 19 Jan 2016 01:10:47 +0900 (KST) X-AuditID: cbfee61a-f79266d000003652-be-569d0e874470 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 8F.01.13906.78E0D965; Tue, 19 Jan 2016 01:10:47 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O15002PEOXHRQ00@mmp2.samsung.com>; Tue, 19 Jan 2016 01:10:47 +0900 (KST) From: Jacek Anaszewski To: linux-media@vger.kernel.org Cc: Jacek Anaszewski , Sylwester Nawrocki Subject: [PATCH 3/3] exynos4-is: Wait for 100us before opening sensor Date: Mon, 18 Jan 2016 17:10:27 +0100 Message-id: <1453133427-20793-4-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1453133427-20793-1-git-send-email-j.anaszewski@samsung.com> References: <1453133427-20793-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMJMWRmVeSWpSXmKPExsVy+t9jQd12vrlhBt9Oilv0Xn3OaNGzYSur xeE37awOzB59W1YxenzeJBfAFMVlk5Kak1mWWqRvl8CVcXf1U+aCJZwVv0+dZmpg/MzexcjJ ISFgIrGs+yEbhC0mceHeeiCbi0NIYBajxP0Pf1khnJ+MEqdbd4N1sAkYSvx88ZoJxBYRkJd4 0nsDrJtZIE7iwdkTzCC2sICrxKH1d8DqWQRUJaacaWAEsXkFPCQ+dS4BsjmAtilIzJlkAxLm FPCU6Hh/AGykEFDJ8tkdzBMYeRcwMqxilEgtSC4oTkrPNcxLLdcrTswtLs1L10vOz93ECA6K Z1I7GA/ucj/EKMDBqMTD63B2dpgQa2JZcWXuIUYJDmYlEd5DHHPDhHhTEiurUovy44tKc1KL DzFKc7AoifPWXooMExJITyxJzU5NLUgtgskycXBKNTDqHYuuudc6642MfceWy6/bD73IO7zD 7+qvXYc8F0zmZEjYf0rwGP+jW1YH1sQXrLb/tslI69jV356JLWfeXHhX/a3UxWah/r3X22yv Vc7dc1v08Hnnh7FBMoFFV355x7SYKK0V7FNpePOZ80XwVxYrBdEj28X/b50bMKVyZdWC8/Mm HEs5sNWtVomlOCPRUIu5qDgRAGqQmHwGAgAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some user space use cases result in kernel hangup on the HIC_OPEN_SENSOR command write. In case when a minimalistic application is used for setting up the streaming, the hangups occur only occasionally. In case of GStreamer use cases it is always the case. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Sylwester Nawrocki --- drivers/media/platform/exynos4-is/fimc-is.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 123772f..3f50856 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -631,6 +631,12 @@ static int fimc_is_hw_open_sensor(struct fimc_is *is, fimc_is_mem_barrier(); + /* + * Some user space use cases hang up here without this + * empirically chosen delay. + */ + udelay(100); + mcuctl_write(HIC_OPEN_SENSOR, is, MCUCTL_REG_ISSR(0)); mcuctl_write(is->sensor_index, is, MCUCTL_REG_ISSR(1)); mcuctl_write(sensor->drvdata->id, is, MCUCTL_REG_ISSR(2));