]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy-390xx.git/blob - kenrel-6.2.patch
split uvm part of kernel 6.3 fix into separate patch
[packages/xorg-driver-video-nvidia-legacy-390xx.git] / kenrel-6.2.patch
1 --- NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia/nv-acpi.c.orig        2022-10-12 11:30:26.000000000 +0200
2 +++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia/nv-acpi.c     2023-02-25 14:32:19.579118091 +0100
3 @@ -23,7 +23,9 @@
4  
5  static int         nv_acpi_add             (struct acpi_device *);
6  
7 -#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
9 +static void        nv_acpi_remove_one_arg_void(struct acpi_device *device);
10 +#elif !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
11  static int         nv_acpi_remove_two_args(struct acpi_device *device, int type);
12  #else
13  static int         nv_acpi_remove_one_arg(struct acpi_device *device);
14 @@ -73,7 +75,9 @@
15  #endif
16      .ops = {
17          .add = nv_acpi_add,
18 -#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
20 +        .remove = nv_acpi_remove_one_arg_void,
21 +#elif !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
22          .remove = nv_acpi_remove_two_args,
23  #else
24          .remove = nv_acpi_remove_one_arg,
25 @@ -331,7 +335,9 @@
26      return 0;
27  }
28  
29 -#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
30 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
31 +static void nv_acpi_remove_one_arg_void(struct acpi_device *device)
32 +#elif !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
33  static int nv_acpi_remove_two_args(struct acpi_device *device, int type)
34  #else
35  static int nv_acpi_remove_one_arg(struct acpi_device *device)
36 @@ -385,7 +391,9 @@
37          device->driver_data = NULL;
38      }
39  
40 +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
41      return status;
42 +#endif
43  }
44  
45  static void nv_acpi_event(acpi_handle handle, u32 event_type, void *data)
46 --- NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c~ 2022-10-12 11:30:31.000000000 +0200
47 +++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c  2023-02-25 14:36:54.064187922 +0100
48 @@ -60,6 +60,7 @@
49  #endif
50  
51  #include <linux/pci.h>
52 +#include <linux/version.h>
53  
54  /*
55   * Commit fcd70cd36b9b ("drm: Split out drm_probe_helper.h")
56 @@ -240,9 +240,9 @@
57      dev->mode_config.prefer_shadow = 1;
58  
59      /* Currently unused. Update when needed. */
60 -
61 +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
62      dev->mode_config.fb_base = 0;
63 -
64 +#endif
65      dev->mode_config.async_page_flip = false;
66  
67      /* Initialize output polling support */
68 --- NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c.orig       2022-10-12 11:30:31.000000000 +0200
69 +++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c    2023-02-25 14:44:30.759596334 +0100
70 @@ -43,6 +43,8 @@
71  #include <drm/drm_atomic.h>
72  #include <drm/drm_atomic_helper.h>
73  
74 +#include <linux/version.h>
75 +
76  static void nv_drm_connector_destroy(struct drm_connector *connector)
77  {
78      struct nv_drm_connector *nv_connector = to_nv_connector(connector);
79 @@ -98,6 +100,7 @@
80              break;
81      }
82  
83 +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
84      if (connector->override_edid) {
85          const struct drm_property_blob *edid = connector->edid_blob_ptr;
86  
87 @@ -110,6 +113,7 @@
88                      sizeof(pDetectParams->edid.buffer));
89          }
90      }
91 +#endif
92  
93      if (!nvKms->getDynamicDisplayInfo(nv_dev->pDevice, pDetectParams)) {
94          NV_DRM_DEV_LOG_ERR(
This page took 0.723291 seconds and 3 git commands to generate.