From patchwork Mon Apr 14 15:00:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 3982341 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2D81DBFF02 for ; Mon, 14 Apr 2014 15:01:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CEF3201EC for ; Mon, 14 Apr 2014 15:01:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2172A201DE for ; Mon, 14 Apr 2014 15:00:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69E3A6E4CC; Mon, 14 Apr 2014 08:00:52 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BBAC6E7B3 for ; Mon, 14 Apr 2014 08:00:51 -0700 (PDT) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N41008CJ0DE6270@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 15 Apr 2014 00:00:50 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-7c-534bf822d4b0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 52.ED.29263.228FB435; Tue, 15 Apr 2014 00:00:50 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4100LEU0COAT20@mmp2.samsung.com>; Tue, 15 Apr 2014 00:00:50 +0900 (KST) From: Tomasz Stanislawski To: linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org Subject: [PATCH 2/4] drm: exynos: mixer: fix using usleep() in atomic context Date: Mon, 14 Apr 2014 17:00:20 +0200 Message-id: <1397487622-3577-3-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1397487622-3577-1-git-send-email-t.stanislaws@samsung.com> References: <1397487622-3577-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOLMWRmVeSWpSXmKPExsVy+t9jQV2lH97BBgsaRS02zljPanHl63s2 i0n3J7BYvLh3kcXibNMbdoueDVtZLWac38dkcXGdvMWE6WtZLKYsOsxq0br3CLvFjMkv2SzW z3jNYjGv/SWrA5/HmnlrGD02repk87jffZzJo2/LKkaPz5vkAlijuGxSUnMyy1KL9O0SuDJO Nj9kLjjDXrF49mLmBsYNbF2MnBwSAiYSC/fsgLLFJC7cWw9kc3EICUxnlDhz6TALhNPFJLHq 2loWkCo2oI5jSz4zgtgiAqkS81d3MIMUMQssYJKYurWHHSQhLOAr8eDFTDCbRUBVYsrPdWDN vALuEv2vzjJCrFOU6H42AWw1p4CHRN/amUwgthBQzdHfW5knMPIuYGRYxSiaWpBcUJyUnmuo V5yYW1yal66XnJ+7iREcnM+kdjCubLA4xCjAwajEwzvhnXewEGtiWXFl7iFGCQ5mJRFe161A Id6UxMqq1KL8+KLSnNTiQ4zSHCxK4rwHWq0DhQTSE0tSs1NTC1KLYLJMHJxSDYw7igOETQ4c X3KYZ0srZ+zPtexxtx8oiVRz2zpW75y2j6s9jd//4offQkmZ8xctuykhlfys5EWcnldics3H 8zfTuNfsmWN+aMExo/vvWYs43etVxbnSNyadNfpdLdWzo7+V+zbrvNmbzJ/ZWBfFftqx/7xR 0+nc7SeMzAunHJIqer3IL7mGe7USS3FGoqEWc1FxIgBAnNwzSgIAAA== Cc: Tomasz Stanislawski , pawel.moll@arm.com, b.zolnierkie@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, robh+dt@kernel.org, rahul.sharma@samsung.com, m.chehab@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 This patch fixes calling usleep_range() after taking reg_slock using spin_lock_irqsave(). The mdelay() is used instead. Waiting in atomic context is not the best idea in general. Hopefully, waiting occurs only when Video Processor fails to reset correctly. Signed-off-by: Tomasz Stanislawski --- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index ce28881..e3306c8 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -615,7 +615,7 @@ static void vp_win_reset(struct mixer_context *ctx) /* waiting until VP_SRESET_PROCESSING is 0 */ if (~vp_reg_read(res, VP_SRESET) & VP_SRESET_PROCESSING) break; - usleep_range(10000, 12000); + mdelay(10); } WARN(tries == 0, "failed to reset Video Processor\n"); }