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/i915drm i915: Suspend ioctls while dev...



details:   https://anonhg.NetBSD.org/src/rev/bba4f14fa3e0
branches:  trunk
changeset: 371869:bba4f14fa3e0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Oct 15 15:20:06 2022 +0000

description:
i915: Suspend ioctls while device is suspended.

diffstat:

 sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (52 lines):

diff -r fbd4a0ea533d -r bba4f14fa3e0 sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c
--- a/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Sat Oct 15 15:19:28 2022 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Sat Oct 15 15:20:06 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_pci_autoconf.c,v 1.13 2022/09/22 14:37:38 riastradh Exp $ */
+/*     $NetBSD: i915_pci_autoconf.c,v 1.14 2022/10/15 15:20:06 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_pci_autoconf.c,v 1.13 2022/09/22 14:37:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_pci_autoconf.c,v 1.14 2022/10/15 15:20:06 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -39,6 +39,7 @@
 #include <sys/queue.h>
 #include <sys/workqueue.h>
 
+#include <drm/drm_ioctl.h>
 #include <drm/drm_pci.h>
 
 #include "i915_drv.h"
@@ -255,6 +256,8 @@
        struct drm_device *const dev = sc->sc_drm_dev;
        int ret;
 
+       drm_suspend_ioctl(dev);
+
        ret = i915_drm_prepare(dev);
        if (ret)
                return false;
@@ -277,12 +280,13 @@
 
        ret = i915_drm_resume_early(dev);
        if (ret)
-               return false;
+               goto out;
        ret = i915_drm_resume(dev);
        if (ret)
-               return false;
+               goto out;
 
-       return true;
+out:   drm_resume_ioctl(dev);
+       return ret == 0;
 }
 
 static void



Home | Main Index | Thread Index | Old Index