From patchwork Mon Feb 18 22:00:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 2160541 Return-Path: X-Original-To: patchwork-intel-gfx@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 CC611DF25A for ; Mon, 18 Feb 2013 22:03:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3493E634A for ; Mon, 18 Feb 2013 14:03:27 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 92B3EE6318 for ; Mon, 18 Feb 2013 14:01:07 -0800 (PST) Received: by mail-gg0-f182.google.com with SMTP id d1so661048ggn.13 for ; Mon, 18 Feb 2013 14:01:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=eaDpeAqvSjjwYr4PvHHXSNUTl1zQvL8A6iAIg67twaA=; b=a18AzmEbkqmEhT+xw+uAbyxhVSFY44dje/vC+xp2Lhyu90rJI2S00Z8ZngALVtfos1 lKmGrU4pjIwBYJGHYUNC69qz+kCdIIrY3hUvgBpa8q7faGa19IEw1SEHnmHSEAdrifr9 CGYlFvEABMYLXrxinp1dH32jJe+0d7XJyVkES+qIksap7ddhUQ+hOIN1FW63l9FXTjMf BDxok6phnHPbhB/yXZXdcm8jR6NSUGp643GeG9tTo7HZurGsWOyzgrMV+YAIbBkajjQC BOfHWB3Yz1DBH2KriJWw2q9j3vR05JfQc/RGFr4CypNClvQBevW+Ixo4Xivv9eduJvt7 Q9Tw== X-Received: by 10.236.130.111 with SMTP id j75mr23841414yhi.82.1361224866966; Mon, 18 Feb 2013 14:01:06 -0800 (PST) Received: from localhost.localdomain ([177.96.10.96]) by mx.google.com with ESMTPS id f29sm64517530anj.17.2013.02.18.14.01.05 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Feb 2013 14:01:06 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 18 Feb 2013 19:00:24 -0300 Message-Id: <1361224828-3730-6-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361224828-3730-1-git-send-email-przanoni@gmail.com> References: <1361224828-3730-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 5/8] drm/i915: wait_event_timeout's timeout is in jiffies X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni So use msecs_to_jiffies(10) to make the timeout the same as in the "!has_aux_irq" case. This patch was initially written by Daniel Vetter and posted on pastebin a few weeks ago. I'm just bringing it to the mailing list. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 770ec90..00bc79f 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -353,7 +353,8 @@ intel_dp_aux_wait_done(struct intel_dp *intel_dp, bool has_aux_irq) #define C (((status = I915_READ_NOTRACE(ch_ctl)) & DP_AUX_CH_CTL_SEND_BUSY) == 0) if (has_aux_irq) - done = wait_event_timeout(dev_priv->gmbus_wait_queue, C, 10); + done = wait_event_timeout(dev_priv->gmbus_wait_queue, C, + msecs_to_jiffies(10)); else done = wait_for_atomic(C, 10) == 0; if (!done)