From patchwork Tue Apr 15 09:27:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 3990281 Return-Path: X-Original-To: patchwork-linux-media@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 B3C92BFF02 for ; Tue, 15 Apr 2014 09:28:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3A0720211 for ; Tue, 15 Apr 2014 09:28:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17BD42012E for ; Tue, 15 Apr 2014 09:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752360AbaDOJ2N (ORCPT ); Tue, 15 Apr 2014 05:28:13 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:15929 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbaDOJ2B (ORCPT ); Tue, 15 Apr 2014 05:28:01 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N420086EFM6ZY50@mailout2.samsung.com>; Tue, 15 Apr 2014 18:27:42 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-c9-534cfb8ed4e5 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 61.7C.28157.E8BFC435; Tue, 15 Apr 2014 18:27:42 +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 <0N42001CMFLM6080@mmp2.samsung.com>; Tue, 15 Apr 2014 18:27:42 +0900 (KST) From: Tomasz Stanislawski To: linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org Cc: m.chehab@samsung.com, robh+dt@kernel.org, inki.dae@samsung.com, kyungmin.park@samsung.com, sw0312.kim@samsung.com, t.figa@samsung.com, b.zolnierkie@samsung.com, jy0922.shim@samsung.com, rahul.sharma@samsung.com, pawel.moll@arm.com, Tomasz Stanislawski Subject: [PATCHv2 2/4] drm: exynos: mixer: fix using usleep() in atomic context Date: Tue, 15 Apr 2014 11:27:18 +0200 Message-id: <1397554040-4037-3-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1397554040-4037-1-git-send-email-t.stanislaws@samsung.com> References: <1397554040-4037-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrELMWRmVeSWpSXmKPExsVy+t9jQd2+3z7BBmsalS02zljPanHl63s2 i0n3J7BYvLh3kcXibNMbdoueDVtZLWac38dkcXGdvMWE6WtZLKYsOsxq0br3CLvFjMkv2SzW z3jNYjGv/SWrA5/HmnlrGD02repk87jffZzJo2/LKkaPz5vkAlijuGxSUnMyy1KL9O0SuDJO Nj9kLjjDXrF49mLmBsYNbF2MnBwSAiYSKxc8Z4awxSQu3FsPFOfiEBKYzihxdudhFgini0ni /+1WRpAqNqCOY0s+g9kiAqkS81d3MIMUMQssYJKYurWHvYuRg0NYwF9iXadQFyMbB4uAqgQL SDGvgLvEwuabUGsVJbqfTWADqeUU8JC4fDUYJCwEVPLx5hqmCYy8CxgZVjGKphYkFxQnpeca 6RUn5haX5qXrJefnbmIEh+Qz6R2MqxosDjEKcDAq8fBOeOcdLMSaWFZcmXuIUYKDWUmE98tL n2Ah3pTEyqrUovz4otKc1OJDjNIcLErivAdbrQOFBNITS1KzU1MLUotgskwcnFINjDn/D77g OOHVoKh+9Wx/vtOitkWHi9eE9a/54LmAz0t27VEmO6NVJj97uw9+1nGOqSnTLyt0CK2an810 d2sie5vg3O79fRKPS3T7Sy4wmnQ9r3OIWXe62ubjkwaVdONdB8XZ7nXJbjBOyfCPmfEy6Fs+ o8dX7i/z5VSfvr7rXfwzj0tlwkMFJZbijERDLeai4kQAAF/IQ0UCAAA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 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 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"); }