From patchwork Sun Nov 30 00:35:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Jakobi X-Patchwork-Id: 5409701 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B46F9F6B5 for ; Mon, 1 Dec 2014 01:10:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C412D2021B for ; Mon, 1 Dec 2014 01:09:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B7A0520220 for ; Mon, 1 Dec 2014 01:09:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 04E476E1DB; Sun, 30 Nov 2014 17:09:57 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from unibi-smtp-b.hrz.uni-bielefeld.de (unibi-smtp-b.hrz.uni-bielefeld.de [129.70.208.22]) by gabe.freedesktop.org (Postfix) with ESMTP id C54B66E53C for ; Sat, 29 Nov 2014 16:50:43 -0800 (PST) Received: from leena.entropy ([84.119.19.8]) by unibi-smtp-b.hrz.uni-bielefeld.de (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPPA id <0NFT00K8VTNFTJ90@unibi-smtp-b.hrz.uni-bielefeld.de> for dri-devel@lists.freedesktop.org; Sun, 30 Nov 2014 01:35:42 +0100 (CET) X-Connecting-IP: [84.119.19.8] X-PMX-Version: 6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.11.30.2121, pmx12 X-EnvFrom: tjakobi@math.uni-bielefeld.de Received: by leena.entropy (sSMTP sendmail emulation); Sun, 30 Nov 2014 01:35:39 +0100 From: tjakobi@math.uni-bielefeld.de To: linux-samsung-soc@vger.kernel.org Subject: drm: exynos: mixer: fix using usleep() in atomic context Date: Sun, 30 Nov 2014 01:35:25 +0100 Message-id: <1417307725-5975-2-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailer: git-send-email 2.0.4 In-reply-to: <1417307725-5975-1-git-send-email-tjakobi@math.uni-bielefeld.de> References: <1417307725-5975-1-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailman-Approved-At: Sun, 30 Nov 2014 17:09:51 -0800 Cc: Tomasz Stanislawski , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 From: Tomasz Stanislawski 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 a41c84e..cc7cccc 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -632,7 +632,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"); }