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: Make sure to call i915_d...



details:   https://anonhg.NetBSD.org/src/rev/7c1f1c1baf3f
branches:  trunk
changeset: 370639:7c1f1c1baf3f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Sep 22 14:37:38 2022 +0000

description:
i915: Make sure to call i915_drm_prepare too on suspend.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    |  8 +++-----
 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h    |  3 ++-
 sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c |  7 +++++--
 3 files changed, 10 insertions(+), 8 deletions(-)

diffs (81 lines):

diff -r ac3fa8ce2f08 -r 7c1f1c1baf3f sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Thu Sep 22 14:27:52 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Thu Sep 22 14:37:38 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_drv.c,v 1.47 2021/12/21 11:44:18 tnn Exp $        */
+/*     $NetBSD: i915_drv.c,v 1.48 2022/09/22 14:37:38 riastradh Exp $  */
 
 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*-
  */
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.47 2021/12/21 11:44:18 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.48 2022/09/22 14:37:38 riastradh Exp $");
 
 #include <linux/acpi.h>
 #include <linux/device.h>
@@ -1747,8 +1747,7 @@
        return false;
 }
 
-#ifndef __NetBSD__             /* XXX runtime pm */
-static int i915_drm_prepare(struct drm_device *dev)
+int i915_drm_prepare(struct drm_device *dev)
 {
        struct drm_i915_private *i915 = to_i915(dev);
 
@@ -1762,7 +1761,6 @@
 
        return 0;
 }
-#endif
 
 int i915_drm_suspend(struct drm_device *dev)
 {
diff -r ac3fa8ce2f08 -r 7c1f1c1baf3f sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h    Thu Sep 22 14:27:52 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h    Thu Sep 22 14:37:38 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_drv.h,v 1.47 2022/02/27 14:22:29 riastradh Exp $  */
+/*     $NetBSD: i915_drv.h,v 1.48 2022/09/22 14:37:38 riastradh Exp $  */
 
 /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
  */
@@ -1826,6 +1826,7 @@
 
 int i915_drm_resume(struct drm_device *);
 int i915_drm_resume_early(struct drm_device *);
+int i915_drm_prepare(struct drm_device *);
 int i915_drm_suspend(struct drm_device *);
 int i915_drm_suspend_late(struct drm_device *, bool);
 
diff -r ac3fa8ce2f08 -r 7c1f1c1baf3f sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c
--- a/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Thu Sep 22 14:27:52 2022 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Thu Sep 22 14:37:38 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_pci_autoconf.c,v 1.12 2022/07/18 23:34:02 riastradh Exp $ */
+/*     $NetBSD: i915_pci_autoconf.c,v 1.13 2022/09/22 14:37:38 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.12 2022/07/18 23:34:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_pci_autoconf.c,v 1.13 2022/09/22 14:37:38 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -255,6 +255,9 @@
        struct drm_device *const dev = sc->sc_drm_dev;
        int ret;
 
+       ret = i915_drm_prepare(dev);
+       if (ret)
+               return false;
        ret = i915_drm_suspend(dev);
        if (ret)
                return false;



Home | Main Index | Thread Index | Old Index