Ticket #11984: vboxvideo_drm.c-sles11sp3.diff
| File vboxvideo_drm.c-sles11sp3.diff, 2.7 KB (added by , 11 years ago) |
|---|
-
vboxvideo_drm.c
old new 60 60 #include <linux/module.h> 61 61 #include "version-generated.h" 62 62 63 /* Taken from the igb driver's kcompat.h (http://sf.net/projects/e1000) */ 64 /* SuSE version macro is the same as Linux kernel version */ 65 #ifndef SLE_VERSION 66 #define SLE_VERSION(a,b,c) KERNEL_VERSION(a,b,c) 67 #endif 68 #ifdef CONFIG_SUSE_KERNEL 69 #if ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) ) 70 /* SLES11 GA is 2.6.27 based */ 71 #define SLE_VERSION_CODE SLE_VERSION(11,0,0) 72 #elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) ) 73 /* SLES11 SP1 is 2.6.32 based */ 74 #define SLE_VERSION_CODE SLE_VERSION(11,1,0) 75 #elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,61)) && \ 76 (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))) 77 /* SLES11 SP3 is at least 3.0.61+ based */ 78 #define SLE_VERSION_CODE SLE_VERSION(11,3,0) 79 #endif /* LINUX_VERSION_CODE == KERNEL_VERSION(x,y,z) */ 80 #endif /* CONFIG_SUSE_KERNEL */ 81 #ifndef SLE_VERSION_CODE 82 #define SLE_VERSION_CODE 0 83 #endif /* SLE_VERSION_CODE */ 84 63 85 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) 64 86 65 87 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) … … 79 101 #include "drm/drmP.h" 80 102 #include "vboxvideo_drm.h" 81 103 104 # if SLE_VERSION_CODE >= SLE_VERSION(11,3,0) 105 # define DRM_SLES11SP3 106 # endif 107 82 108 # ifndef RHEL_RELEASE_CODE 83 109 # if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 39) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) 84 110 # if defined(DRM_MODE_OBJECT_PLANE) && defined(DRM_IOCTL_MODE_ADDFB2) … … 99 125 return 0; 100 126 #endif 101 127 } 102 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_ DEBIAN_34ON32)128 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) || defined(DRM_SLES11SP3) || defined(DRM_DEBIAN_34ON32) 103 129 /* since linux-3.3.0-rc1 drm_driver::fops is pointer */ 104 130 static struct file_operations driver_fops = 105 131 { … … 117 143 { 118 144 /* .driver_features = DRIVER_USE_MTRR, */ 119 145 .load = vboxvideo_driver_load, 120 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) && !defined(DRM_ RHEL64)146 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) && !defined(DRM_SLES11SP3) && !defined(DRM_RHEL64) 121 147 .reclaim_buffers = drm_core_reclaim_buffers, 122 148 #endif 123 149 /* As of Linux 2.6.37, always the internal functions are used. */ … … 125 151 .get_map_ofs = drm_core_get_map_ofs, 126 152 .get_reg_ofs = drm_core_get_reg_ofs, 127 153 #endif 128 # if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63) && !defined(DRM_ DEBIAN_34ON32)154 # if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && !defined(DRM_RHEL63) && !defined(DRM_SLES11SP3) && !defined(DRM_DEBIAN_34ON32) 129 155 .fops = 130 156 { 131 157 .owner = THIS_MODULE,

