From patchwork Mon Jan 14 22:03:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 1973881 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id BD964DF2E1 for ; Mon, 14 Jan 2013 22:03:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61754E64DF for ; Mon, 14 Jan 2013 14:03:49 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f48.google.com (mail-qa0-f48.google.com [209.85.216.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 38375E5EDE for ; Mon, 14 Jan 2013 14:03:38 -0800 (PST) Received: by mail-qa0-f48.google.com with SMTP id l8so1858740qaq.7 for ; Mon, 14 Jan 2013 14:03:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=ZdQQ2B9CPN0n24vjIUHfGE+SdAyRQFyucwtjE4bM8iE=; b=KNIeRVIY8BfNAutVHtUNTv71e/aPwl8YGOhWA2kR5lqklaJ+QYpKufGxedHEzvnNMk RyP160jwF4WnGk7MwTATremQLI38Ls13GXyGJnBp3y/Y2NN4yBcLuwDi3FUk7leDvFUU WrgyrO7z5LJuGz2NBEotkrcwsKLxIJMhlkRK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=ZdQQ2B9CPN0n24vjIUHfGE+SdAyRQFyucwtjE4bM8iE=; b=BhEGqJ/HHhR5kb8FZxmH0Lo6jQJ4IaRugnwB+UTLARnBukEInO4eo0rZI6NQjRqsdW HdPNLTnE/woDezLkO8tpqa8cZA+AJP9J5lGHklzOvza0bXWKATD2X1PRsNi4JkhTs7gD HBYPtZVRb+HwPyWOSPqXd+Qv0KsKBf2QDhXnzqXht4xe6aUgd5USS9y/tHNz7d6ZDa7u Ao0FmBKSSYc90uG32b7M7cRXBMHaxU51Pqg0Rd537icWBSRQ+YmJVQtv7oqYY2FyVyD9 1tY425vrLVRePyicmGkrKHfZBNemgvYYwRazHyfuGyTqeOyK08k5VojBJi6Qqp45pp/g RIOg== X-Received: by 10.224.58.69 with SMTP id f5mr47610088qah.87.1358201017694; Mon, 14 Jan 2013 14:03:37 -0800 (PST) Received: from seanpaul-linux2.cnc.corp.google.com (dhcp-172-29-92-172.cnc.corp.google.com [172.29.92.172]) by mx.google.com with ESMTPS id hr3sm10610772qab.4.2013.01.14.14.03.36 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jan 2013 14:03:37 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH] drm/exynos: Replace mdelay with usleep_range Date: Mon, 14 Jan 2013 17:03:20 -0500 Message-Id: <1358201000-25324-1-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.7.7.3 X-Gm-Message-State: ALoCoQlNWIGitCsPlnNNk4po/yCApamfspd2T/IpGFj4llcack5VmNys30c6FedNhYDrx8b8PmpY Cc: marcheu@chromium.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Replace the unnecessary atomic mdelay calls with usleep_range calls. Signed-off-by: Sean Paul --- drivers/gpu/drm/exynos/exynos_hdmi.c | 14 +++++++------- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index b2f8de9..4cf01f3 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1646,9 +1646,9 @@ static void hdmi_conf_reset(struct hdmi_context *hdata) /* resetting HDMI core */ hdmi_reg_writemask(hdata, reg, 0, HDMI_CORE_SW_RSTOUT); - mdelay(10); + usleep_range(10000, 12000); hdmi_reg_writemask(hdata, reg, ~0, HDMI_CORE_SW_RSTOUT); - mdelay(10); + usleep_range(10000, 12000); } static void hdmi_conf_init(struct hdmi_context *hdata) @@ -1773,7 +1773,7 @@ static void hdmi_v13_timing_apply(struct hdmi_context *hdata) u32 val = hdmi_reg_read(hdata, HDMI_V13_PHY_STATUS); if (val & HDMI_PHY_STATUS_READY) break; - mdelay(1); + usleep_range(1000, 2000); } /* steady state not achieved */ if (tries == 0) { @@ -1940,7 +1940,7 @@ static void hdmi_v14_timing_apply(struct hdmi_context *hdata) u32 val = hdmi_reg_read(hdata, HDMI_PHY_STATUS_0); if (val & HDMI_PHY_STATUS_READY) break; - mdelay(1); + usleep_range(1000, 2000); } /* steady state not achieved */ if (tries == 0) { @@ -1992,9 +1992,9 @@ static void hdmiphy_conf_reset(struct hdmi_context *hdata) /* reset hdmiphy */ hdmi_reg_writemask(hdata, reg, ~0, HDMI_PHY_SW_RSTOUT); - mdelay(10); + usleep_range(10000, 12000); hdmi_reg_writemask(hdata, reg, 0, HDMI_PHY_SW_RSTOUT); - mdelay(10); + usleep_range(10000, 12000); } static void hdmiphy_poweron(struct hdmi_context *hdata) @@ -2042,7 +2042,7 @@ static void hdmiphy_conf_apply(struct hdmi_context *hdata) return; } - mdelay(10); + usleep_range(10000, 12000); /* operation mode */ operation[0] = 0x1f; diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index e9dbf79..2be9833 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -600,7 +600,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; - mdelay(10); + usleep_range(10000, 12000); } WARN(tries == 0, "failed to reset Video Processor\n"); }