]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/nouveau: use mdelay instead of large udelay constants
authorArnd Bergmann <arnd@arndb.de>
Fri, 31 May 2013 22:22:40 +0000 (22:22 +0000)
committerDave Airlie <airlied@gmail.com>
Mon, 3 Jun 2013 09:20:56 +0000 (19:20 +1000)
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
Signed-off-by: Dave Airlie <airlied@gmail.com>
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c

index d0817d94454ceb0d17536995e0c053b8585fdf72..ed7415e5e220303ecda2befaefa670726d290198 100644 (file)
@@ -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);