| 1 | --- vbox_drv.h.orig 2020-09-18 01:41:29.504934215 -0400
|
|---|
| 2 | +++ vbox_drv.h 2020-09-21 04:59:11.893135153 -0400
|
|---|
| 3 | @@ -147,9 +147,7 @@
|
|---|
| 4 | #define S64_MIN ((s64)(-S64_MAX - 1))
|
|---|
| 5 | #endif
|
|---|
| 6 |
|
|---|
| 7 | -#if RTLNX_VER_MAX(5,5,0)
|
|---|
| 8 | -# include <drm/drmP.h>
|
|---|
| 9 | -#else /* >= 5.5.0 */
|
|---|
| 10 | +#if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3)
|
|---|
| 11 | # include <drm/drm_file.h>
|
|---|
| 12 | # include <drm/drm_drv.h>
|
|---|
| 13 | # include <drm/drm_device.h>
|
|---|
| 14 | @@ -157,7 +155,9 @@
|
|---|
| 15 | # include <drm/drm_fourcc.h>
|
|---|
| 16 | # include <drm/drm_irq.h>
|
|---|
| 17 | # include <drm/drm_vblank.h>
|
|---|
| 18 | -#endif /* >= 5.5.0 */
|
|---|
| 19 | +#else /* < 5.5.0 || RHEL < 8.3 */
|
|---|
| 20 | +# include <drm/drmP.h>
|
|---|
| 21 | +#endif
|
|---|
| 22 | #if RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
|
|---|
| 23 | # include <drm/drm_encoder.h>
|
|---|
| 24 | #endif
|
|---|
| 25 | @@ -294,10 +294,10 @@
|
|---|
| 26 | #undef CURSOR_PIXEL_COUNT
|
|---|
| 27 | #undef CURSOR_DATA_SIZE
|
|---|
| 28 |
|
|---|
| 29 | -#if RTLNX_VER_MAX(4,19,0)
|
|---|
| 30 | -int vbox_driver_load(struct drm_device *dev, unsigned long flags);
|
|---|
| 31 | -#else
|
|---|
| 32 | +#if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3)
|
|---|
| 33 | int vbox_driver_load(struct drm_device *dev);
|
|---|
| 34 | +#else
|
|---|
| 35 | +int vbox_driver_load(struct drm_device *dev, unsigned long flags);
|
|---|
| 36 | #endif
|
|---|
| 37 | #if RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
|
|---|
| 38 | void vbox_driver_unload(struct drm_device *dev);
|
|---|
| 39 | --- vbox_drv.c.orig 2020-09-18 03:59:43.372824508 -0400
|
|---|
| 40 | +++ vbox_drv.c 2020-09-21 06:11:31.781316359 -0400
|
|---|
| 41 | @@ -56,9 +56,7 @@
|
|---|
| 42 |
|
|---|
| 43 | static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|---|
| 44 | {
|
|---|
| 45 | -#if RTLNX_VER_MAX(4,19,0)
|
|---|
| 46 | - return drm_get_pci_dev(pdev, ent, &driver);
|
|---|
| 47 | -#else
|
|---|
| 48 | +#if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3)
|
|---|
| 49 | struct drm_device *dev = NULL;
|
|---|
| 50 | int ret = 0;
|
|---|
| 51 |
|
|---|
| 52 | @@ -85,6 +83,8 @@
|
|---|
| 53 | drm_dev_put(dev);
|
|---|
| 54 | err_drv_alloc:
|
|---|
| 55 | return ret;
|
|---|
| 56 | +#else /* > 4.19.0 || RHEL < 8.3 */
|
|---|
| 57 | + return drm_get_pci_dev(pdev, ent, &driver);
|
|---|
| 58 | #endif
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | @@ -298,19 +298,18 @@
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | static struct drm_driver driver = {
|
|---|
| 65 | -#if RTLNX_VER_MAX(5,4,0)
|
|---|
| 66 | - .driver_features =
|
|---|
| 67 | - DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ |
|
|---|
| 68 | +#if RTLNX_VER_MAX(5,4,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3)
|
|---|
| 69 | + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ |
|
|---|
| 70 | # if RTLNX_VER_MAX(5,1,0) && !RTLNX_RHEL_MAJ_PREREQ(8,1)
|
|---|
| 71 | DRIVER_IRQ_SHARED |
|
|---|
| 72 | # endif
|
|---|
| 73 | DRIVER_PRIME,
|
|---|
| 74 | -#else /* >= 5.4.0 */
|
|---|
| 75 | - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
|
|---|
| 76 | +#else /* >= 5.4.0 && RHEL >= 8.3 */
|
|---|
| 77 | + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
|
|---|
| 78 | #endif /* < 5.4.0 */
|
|---|
| 79 | .dev_priv_size = 0,
|
|---|
| 80 |
|
|---|
| 81 | -#if RTLNX_VER_MAX(4,19,0)
|
|---|
| 82 | +#if RTLNX_VER_MAX(4,19,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3)
|
|---|
| 83 | /* Legacy hooks, but still supported. */
|
|---|
| 84 | .load = vbox_driver_load,
|
|---|
| 85 | .unload = vbox_driver_unload,
|
|---|
| 86 | --- vbox_main.c.orig 2020-09-18 04:06:16.881708939 -0400
|
|---|
| 87 | +++ vbox_main.c 2020-09-21 04:59:39.255040149 -0400
|
|---|
| 88 | @@ -443,10 +443,10 @@
|
|---|
| 89 | pci_iounmap(vbox->dev->pdev, vbox->guest_heap);
|
|---|
| 90 | }
|
|---|
| 91 |
|
|---|
| 92 | -#if RTLNX_VER_MAX(4,19,0)
|
|---|
| 93 | -int vbox_driver_load(struct drm_device *dev, unsigned long flags)
|
|---|
| 94 | -#else
|
|---|
| 95 | +#if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3)
|
|---|
| 96 | int vbox_driver_load(struct drm_device *dev)
|
|---|
| 97 | +#else
|
|---|
| 98 | +int vbox_driver_load(struct drm_device *dev, unsigned long flags)
|
|---|
| 99 | #endif
|
|---|
| 100 | {
|
|---|
| 101 | struct vbox_private *vbox;
|
|---|
| 102 | @@ -617,7 +617,7 @@
|
|---|
| 103 |
|
|---|
| 104 | static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)
|
|---|
| 105 | {
|
|---|
| 106 | -#if RTLNX_VER_MIN(5,4,0)
|
|---|
| 107 | +#if RTLNX_VER_MIN(5,4,0) || RTLNX_RHEL_MIN(8,3)
|
|---|
| 108 | return drm_vma_node_offset_addr(&bo->bo.base.vma_node);
|
|---|
| 109 | #elif RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,0)
|
|---|
| 110 | return bo->bo.addr_space_offset;
|
|---|
| 111 | --- vbox_mode.c.orig 2020-09-18 04:27:07.535725873 -0400
|
|---|
| 112 | +++ vbox_mode.c 2020-09-21 04:59:53.557990482 -0400
|
|---|
| 113 | @@ -394,13 +394,13 @@
|
|---|
| 114 | static struct drm_encoder *vbox_best_single_encoder(struct drm_connector
|
|---|
| 115 | *connector)
|
|---|
| 116 | {
|
|---|
| 117 | -#if RTLNX_VER_MIN(5,5,0)
|
|---|
| 118 | +#if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3)
|
|---|
| 119 | struct drm_encoder *encoder;
|
|---|
| 120 |
|
|---|
| 121 | /* There is only one encoder per connector */
|
|---|
| 122 | drm_connector_for_each_possible_encoder(connector, encoder)
|
|---|
| 123 | return encoder;
|
|---|
| 124 | -#else /* < 5.5 */
|
|---|
| 125 | +#else /* < 5.5 || RHEL < 8.3 */
|
|---|
| 126 | int enc_id = connector->encoder_ids[0];
|
|---|
| 127 |
|
|---|
| 128 | /* pick the encoder ids */
|
|---|
| 129 | @@ -410,7 +410,7 @@
|
|---|
| 130 | # else
|
|---|
| 131 | return drm_encoder_find(connector->dev, enc_id);
|
|---|
| 132 | # endif
|
|---|
| 133 | -#endif /* < 5.5 */
|
|---|
| 134 | +#endif /* < 5.5 || RHEL < 8.3 */
|
|---|
| 135 | return NULL;
|
|---|
| 136 | }
|
|---|
| 137 |
|
|---|
| 138 | --- vbox_ttm.c.orig 2020-09-18 04:59:57.147642037 -0400
|
|---|
| 139 | +++ vbox_ttm.c 2020-09-18 08:43:39.908449297 -0400
|
|---|
| 140 | @@ -299,7 +299,7 @@
|
|---|
| 141 | #if RTLNX_VER_MIN(3,15,0) || RTLNX_RHEL_MAJ_PREREQ(7,1)
|
|---|
| 142 | dev->anon_inode->i_mapping,
|
|---|
| 143 | #endif
|
|---|
| 144 | -#if RTLNX_VER_MIN(5,5,0)
|
|---|
| 145 | +#if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3)
|
|---|
| 146 | dev->vma_offset_manager,
|
|---|
| 147 | #elif RTLNX_VER_MAX(5,2,0) && !RTLNX_RHEL_MAJ_PREREQ(8,2)
|
|---|
| 148 | DRM_FILE_PAGE_OFFSET,
|
|---|