| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: i915_drv.c,v 1.31 2021/12/19 11:18:00 riastradh Exp $ */ | | 1 | /* $NetBSD: i915_drv.c,v 1.32 2021/12/19 11:18:09 riastradh Exp $ */ |
2 | | | 2 | |
3 | /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*- | | 3 | /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*- |
4 | */ | | 4 | */ |
5 | /* | | 5 | /* |
6 | * | | 6 | * |
7 | * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. | | 7 | * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. |
8 | * All Rights Reserved. | | 8 | * All Rights Reserved. |
9 | * | | 9 | * |
10 | * Permission is hereby granted, free of charge, to any person obtaining a | | 10 | * Permission is hereby granted, free of charge, to any person obtaining a |
11 | * copy of this software and associated documentation files (the | | 11 | * copy of this software and associated documentation files (the |
12 | * "Software"), to deal in the Software without restriction, including | | 12 | * "Software"), to deal in the Software without restriction, including |
13 | * without limitation the rights to use, copy, modify, merge, publish, | | 13 | * without limitation the rights to use, copy, modify, merge, publish, |
14 | * distribute, sub license, and/or sell copies of the Software, and to | | 14 | * distribute, sub license, and/or sell copies of the Software, and to |
| @@ -20,27 +20,27 @@ | | | @@ -20,27 +20,27 @@ |
20 | * of the Software. | | 20 | * of the Software. |
21 | * | | 21 | * |
22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | | 22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
23 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | | 23 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
24 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | | 24 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
25 | * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR | | 25 | * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR |
26 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | | 26 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
27 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | | 27 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
28 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | | 28 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
29 | * | | 29 | * |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <sys/cdefs.h> | | 32 | #include <sys/cdefs.h> |
33 | __KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.31 2021/12/19 11:18:00 riastradh Exp $"); | | 33 | __KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.32 2021/12/19 11:18:09 riastradh Exp $"); |
34 | | | 34 | |
35 | #include <linux/acpi.h> | | 35 | #include <linux/acpi.h> |
36 | #include <linux/device.h> | | 36 | #include <linux/device.h> |
37 | #include <linux/oom.h> | | 37 | #include <linux/oom.h> |
38 | #include <linux/module.h> | | 38 | #include <linux/module.h> |
39 | #include <linux/pci.h> | | 39 | #include <linux/pci.h> |
40 | #include <linux/pm.h> | | 40 | #include <linux/pm.h> |
41 | #include <linux/pm_runtime.h> | | 41 | #include <linux/pm_runtime.h> |
42 | #include <linux/pnp.h> | | 42 | #include <linux/pnp.h> |
43 | #include <linux/slab.h> | | 43 | #include <linux/slab.h> |
44 | #include <linux/vga_switcheroo.h> | | 44 | #include <linux/vga_switcheroo.h> |
45 | #include <linux/vt.h> | | 45 | #include <linux/vt.h> |
46 | #include <acpi/video.h> | | 46 | #include <acpi/video.h> |
| @@ -2033,28 +2033,26 @@ int i915_drm_resume_early(struct drm_dev | | | @@ -2033,28 +2033,26 @@ int i915_drm_resume_early(struct drm_dev |
2033 | DRM_ERROR("Resume prepare failed: %d, continuing anyway\n", | | 2033 | DRM_ERROR("Resume prepare failed: %d, continuing anyway\n", |
2034 | ret); | | 2034 | ret); |
2035 | | | 2035 | |
2036 | intel_uncore_resume_early(&dev_priv->uncore); | | 2036 | intel_uncore_resume_early(&dev_priv->uncore); |
2037 | | | 2037 | |
2038 | intel_gt_check_and_clear_faults(&dev_priv->gt); | | 2038 | intel_gt_check_and_clear_faults(&dev_priv->gt); |
2039 | | | 2039 | |
2040 | intel_display_power_resume_early(dev_priv); | | 2040 | intel_display_power_resume_early(dev_priv); |
2041 | | | 2041 | |
2042 | intel_power_domains_resume(dev_priv); | | 2042 | intel_power_domains_resume(dev_priv); |
2043 | | | 2043 | |
2044 | enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); | | 2044 | enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); |
2045 | | | 2045 | |
2046 | i915_rc6_ctx_wa_resume(dev_priv); | | | |
2047 | | | | |
2048 | return ret; | | 2046 | return ret; |
2049 | } | | 2047 | } |
2050 | | | 2048 | |
2051 | #ifndef __NetBSD__ /* XXX vga switcheroo */ | | 2049 | #ifndef __NetBSD__ /* XXX vga switcheroo */ |
2052 | int i915_resume_switcheroo(struct drm_i915_private *i915) | | 2050 | int i915_resume_switcheroo(struct drm_i915_private *i915) |
2053 | { | | 2051 | { |
2054 | int ret; | | 2052 | int ret; |
2055 | | | 2053 | |
2056 | if (i915->drm.switch_power_state == DRM_SWITCH_POWER_OFF) | | 2054 | if (i915->drm.switch_power_state == DRM_SWITCH_POWER_OFF) |
2057 | return 0; | | 2055 | return 0; |
2058 | | | 2056 | |
2059 | ret = i915_drm_resume_early(&i915->drm); | | 2057 | ret = i915_drm_resume_early(&i915->drm); |
2060 | if (ret) | | 2058 | if (ret) |