From patchwork Mon Mar 3 18:01:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 3758091 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 61187BF13A for ; Tue, 4 Mar 2014 00:46:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8713F201FA for ; Tue, 4 Mar 2014 00:46:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6CE9B203B6 for ; Tue, 4 Mar 2014 00:46:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AF750FB456; Mon, 3 Mar 2014 16:46:30 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pandora.arm.linux.org.uk (gw-1.arm.linux.org.uk [78.32.30.217]) by gabe.freedesktop.org (Postfix) with ESMTP id 2EABAFB387 for ; Mon, 3 Mar 2014 10:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora; h=Date:Sender:Message-Id:Subject:Cc:To:From; bh=p00rqzWk45zfhJhySyjwYC6xdRya149hn++xw7F5K+s=; b=KC339yTHQvAcoIntwM32SKxMhaQb9vr+D6Vz3RSAmEisv8PPWRQETHcvb4t8aYjS0ncRiY9gqKF19KWsANZBAvCFb3i9qKo7rY5uNId/TzV9bW26ifOX2nbXIe0xoawuF9b2U6z8/j/huecuiGhR4Q7Qsu5l/jg1ccuoimpGThs=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2001:4d48:ad52:3201:222:68ff:fe15:37dd]:46485 helo=rmk-PC.arm.linux.org.uk) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1WKXBG-0001XY-R9; Mon, 03 Mar 2014 18:01:34 +0000 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1WKXBG-0003gB-GK; Mon, 03 Mar 2014 18:01:34 +0000 From: Russell King To: Jean-Francois Moine Subject: [PATCH] drm/i2c: tda998x: potentially faster polling for edid Message-Id: Date: Mon, 03 Mar 2014 18:01:34 +0000 X-Mailman-Approved-At: Mon, 03 Mar 2014 16:46:25 -0800 Cc: dri-devel@lists.freedesktop.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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 One of Jean-Francois patches changed the EDID polling to once every 10ms for 10 interations, whereas the original code did 1ms for 100 interations. This appears to cause boot-time detection to take slightly - but noticably - longer. Revert this change. Signed-off-by: Russell King Acked-by: Jean-Francois Moine --- Jean, I'm not sure why you made the change along with adding IRQ support in "drm/i2c: tda998x: use irq for connection status and EDID read" - you didn't include any commentry as to why you made this change. However, we shouldn't write code assuming HZ=100 - where this kind of thing matters, we should come up with better solutions (eg, using jiffy-based timeouts if we want to timeout after a set period of time.) I'm not sure whether one or other really is faster, it's just a perception I have. Anyway, let's just revert back to the original code for the non-IRQ case, and maybe improve it later. drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 40c4f658abfb..956d857ee2c9 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1041,8 +1041,8 @@ static int read_edid_block(struct tda998x_priv *priv, uint8_t *buf, int blk) return i; } } else { - for (i = 10; i > 0; i--) { - msleep(10); + for (i = 100; i > 0; i--) { + msleep(1); ret = reg_read(priv, REG_INT_FLAGS_2); if (ret < 0) return ret;