From: Roy Spliet Subject: Re: [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants Date: Sat, 01 Jun 2013 00:30:45 +0200 Message-ID: <51A92495.3010902@student.tudelft.nl> References: <1370038972-2318779-1-git-send-email-arnd@arndb.de> <1370038972-2318779-4-git-send-email-arnd@arndb.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0236874375==" Return-path: Received: from mailservice.tudelft.nl (mailservice.tudelft.nl [130.161.131.5]) by gabe.freedesktop.org (Postfix) with ESMTP id D15B9E5FC1 for ; Fri, 31 May 2013 15:58:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by amavis (Postfix) with ESMTP id 8030CCC24D for ; Sat, 1 Jun 2013 00:30:49 +0200 (CEST) Received: from mailservice.tudelft.nl ([130.161.131.71]) by localhost (tudelft.nl [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OH-YsE199EzT for ; Sat, 1 Jun 2013 00:30:45 +0200 (CEST) Received: from smtp-a.tudelft.nl (smtp-a.tudelft.nl [130.161.180.7]) by mx4.tudelft.nl (Postfix) with ESMTP id CDD37CC22E for ; Sat, 1 Jun 2013 00:30:45 +0200 (CEST) Received: from [192.168.1.37] (53537511.cm-6-4b.dynamic.ziggo.nl [83.83.117.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-a.tudelft.nl (Postfix) with ESMTP id 7CF92B3A62 for ; Sat, 1 Jun 2013 00:30:45 +0200 (CEST) In-Reply-To: <1370038972-2318779-4-git-send-email-arnd@arndb.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is a multi-part message in MIME format. --===============0236874375== Content-Type: multipart/alternative; boundary="------------080408020909070907090208" This is a multi-part message in MIME format. --------------080408020909070907090208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit You probably want to patch up mclk_wait in nva3_pm.c as well for now (until this code is ported to HWSQ or PDAEMON), even though it's not used by a lot of people. Op 01-06-13 00:22, Arnd Bergmann schreef: > ARM cannot handle udelay for more than 2 miliseconds, so we > should use mdelay instead for those. > > Signed-off-by: Arnd Bergmann > Cc: David Airlie > Cc: Ben Skeggs > Cc: dri-devel@lists.freedesktop.org > --- > drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c > index d0817d9..ed7415e 100644 > --- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c > +++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c > @@ -51,7 +51,8 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval) > const u32 doff = (or * 0x800); > int load = -EINVAL; > nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval); > - udelay(9500); > + mdelay(9); > + udelay(500); > nv_wr32(priv, 0x61a00c + doff, 0x80000000); > load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27; > nv_wr32(priv, 0x61a00c + doff, 0x00000000); -- Roy Spliet BSc. MSc. Student Delft University of Technology http://www.pds.ewi.tudelft.nl/msc/mallocinopencl/ --------------080408020909070907090208 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
You probably want to patch up mclk_wait in nva3_pm.c as well for now (until this code is ported to HWSQ or PDAEMON), even though it's not used by a lot of people.

Op 01-06-13 00:22, Arnd Bergmann schreef:
ARM cannot handle udelay for more than 2 miliseconds, so we
should use mdelay instead for those.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
index d0817d9..ed7415e 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
@@ -51,7 +51,8 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval)
 	const u32 doff = (or * 0x800);
 	int load = -EINVAL;
 	nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval);
-	udelay(9500);
+	mdelay(9);
+	udelay(500);
 	nv_wr32(priv, 0x61a00c + doff, 0x80000000);
 	load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27;
 	nv_wr32(priv, 0x61a00c + doff, 0x00000000);

--
Roy Spliet BSc.
MSc. Student
Delft University of Technology
http://www.pds.ewi.tudelft.nl/msc/mallocinopencl/
--------------080408020909070907090208-- --===============0236874375== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0236874375==--