Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk This ...



details:   https://anonhg.NetBSD.org/src/rev/fcde2542cc1c
branches:  trunk
changeset: 366264:fcde2542cc1c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:17:50 2018 +0000

description:
This can happen while cold.  Wait up to 100ms for it.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_base.c |  13 ++++++++-
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 3534dc5f4c4f -r fcde2542cc1c sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_base.c     Mon Aug 27 14:17:36 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_base.c     Mon Aug 27 14:17:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_subdev_clk_base.c,v 1.3 2018/08/27 07:43:06 riastradh Exp $       */
+/*     $NetBSD: nouveau_nvkm_subdev_clk_base.c,v 1.4 2018/08/27 14:17:50 riastradh Exp $       */
 
 /*
  * Copyright 2013 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_clk_base.c,v 1.3 2018/08/27 07:43:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_clk_base.c,v 1.4 2018/08/27 14:17:50 riastradh Exp $");
 
 #include "priv.h"
 
@@ -258,6 +258,15 @@
        schedule_work(&clk->work);
        if (wait) {
 #ifdef __NetBSD__
+               if (cold) {
+                       unsigned timo = 1000;
+                       while (timo --> 0) {
+                               if (atomic_read(&clk->waiting))
+                                       return 0;
+                               DELAY(100);
+                       }
+                       return -ETIMEDOUT;
+               }
                int ret;
                spin_lock(&clk->lock);
                DRM_SPIN_WAIT_NOINTR_UNTIL(ret, &clk->wait, &clk->lock,



Home | Main Index | Thread Index | Old Index