Changeset 86196 in vbox for trunk/src/VBox
- Timestamp:
- Sep 21, 2020 1:17:37 PM (4 years ago)
- Location:
- trunk/src/VBox/Additions/linux/drm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vbox_drv.c
r86174 r86196 62 62 static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 63 63 { 64 #if RTLNX_VER_MAX(4,19,0) 65 return drm_get_pci_dev(pdev, ent, &driver); 66 #else 64 #if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3) 67 65 struct drm_device *dev = NULL; 68 66 int ret = 0; … … 91 89 err_drv_alloc: 92 90 return ret; 91 #else /* < 4.19.0 || RHEL < 8.3 */ 92 return drm_get_pci_dev(pdev, ent, &driver); 93 93 #endif 94 94 } … … 304 304 305 305 static struct drm_driver driver = { 306 #if RTLNX_VER_MAX(5,4,0) 307 .driver_features = 308 DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | 306 #if RTLNX_VER_MAX(5,4,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3) 307 .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | 309 308 # if RTLNX_VER_MAX(5,1,0) && !RTLNX_RHEL_MAJ_PREREQ(8,1) 310 309 DRIVER_IRQ_SHARED | 311 310 # endif 312 311 DRIVER_PRIME, 313 #else /* >= 5.4.0 */312 #else /* >= 5.4.0 && RHEL >= 8.3 */ 314 313 .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, 315 314 #endif /* < 5.4.0 */ 316 315 .dev_priv_size = 0, 317 316 318 #if RTLNX_VER_MAX(4,19,0) 317 #if RTLNX_VER_MAX(4,19,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3) 319 318 /* Legacy hooks, but still supported. */ 320 319 .load = vbox_driver_load, -
trunk/src/VBox/Additions/linux/drm/vbox_drv.h
r86174 r86196 152 152 #endif 153 153 154 #if RTLNX_VER_MAX(5,5,0) 155 # include <drm/drmP.h> 156 #else /* >= 5.5.0 */ 154 #if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3) 157 155 # include <drm/drm_file.h> 158 156 # include <drm/drm_drv.h> … … 162 160 # include <drm/drm_irq.h> 163 161 # include <drm/drm_vblank.h> 164 #endif /* >= 5.5.0 */ 162 #else /* < 5.5.0 || RHEL < 8.3 */ 163 # include <drm/drmP.h> 164 #endif 165 165 #if RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5) 166 166 # include <drm/drm_encoder.h> … … 299 299 #undef CURSOR_DATA_SIZE 300 300 301 #if RTLNX_VER_MAX(4,19,0) 301 #if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3) 302 int vbox_driver_load(struct drm_device *dev); 303 #else 302 304 int vbox_driver_load(struct drm_device *dev, unsigned long flags); 303 #else304 int vbox_driver_load(struct drm_device *dev);305 305 #endif 306 306 #if RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5) -
trunk/src/VBox/Additions/linux/drm/vbox_main.c
r86174 r86196 448 448 } 449 449 450 #if RTLNX_VER_MAX(4,19,0) 450 #if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3) 451 int vbox_driver_load(struct drm_device *dev) 452 #else 451 453 int vbox_driver_load(struct drm_device *dev, unsigned long flags) 452 #else453 int vbox_driver_load(struct drm_device *dev)454 454 #endif 455 455 { … … 622 622 static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo) 623 623 { 624 #if RTLNX_VER_MIN(5,4,0) 624 #if RTLNX_VER_MIN(5,4,0) || RTLNX_RHEL_MIN(8,3) 625 625 return drm_vma_node_offset_addr(&bo->bo.base.vma_node); 626 626 #elif RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,0) -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r86174 r86196 399 399 *connector) 400 400 { 401 #if RTLNX_VER_MIN(5,5,0) 401 #if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3) 402 402 struct drm_encoder *encoder; 403 403 … … 405 405 drm_connector_for_each_possible_encoder(connector, encoder) 406 406 return encoder; 407 #else /* < 5.5 */407 #else /* < 5.5 || RHEL < 8.3 */ 408 408 int enc_id = connector->encoder_ids[0]; 409 409 … … 415 415 return drm_encoder_find(connector->dev, enc_id); 416 416 # endif 417 #endif /* < 5.5 */417 #endif /* < 5.5 || RHEL < 8.3 */ 418 418 return NULL; 419 419 } -
trunk/src/VBox/Additions/linux/drm/vbox_ttm.c
r86174 r86196 304 304 dev->anon_inode->i_mapping, 305 305 #endif 306 #if RTLNX_VER_MIN(5,5,0) 306 #if RTLNX_VER_MIN(5,5,0) || RTLNX_RHEL_MIN(8,3) 307 307 dev->vma_offset_manager, 308 308 #elif RTLNX_VER_MAX(5,2,0) && !RTLNX_RHEL_MAJ_PREREQ(8,2)
Note:
See TracChangeset
for help on using the changeset viewer.