Changeset 63551 in vbox for trunk/src/VBox/Additions/linux/drm
- Timestamp:
- Aug 16, 2016 1:02:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vbox_drv.c
r62557 r63551 195 195 }; 196 196 197 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) 198 /* This works around a bug in X servers prior to 1.18.4, which sometimes 199 * submit more dirty rectangles than the kernel is willing to handle and 200 * then disable dirty rectangle handling altogether when they see the 201 * EINVAL error. I do not want the code to hang around forever, which is 202 * why I am limiting it to certain kernel versions. We can increase the 203 * limit if some distributions uses old X servers with new kernels. */ 204 long vbox_ioctl(struct file *filp, 205 unsigned int cmd, unsigned long arg) 206 { 207 long rc = drm_ioctl(filp, cmd, arg); 208 if (cmd == DRM_IOCTL_MODE_DIRTYFB && rc == -EINVAL) 209 return -EOVERFLOW; 210 return rc; 211 } 212 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) */ 213 197 214 static const struct file_operations vbox_fops = 198 215 { … … 200 217 .open = drm_open, 201 218 .release = drm_release, 219 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) 220 .unlocked_ioctl = vbox_ioctl, 221 #else 202 222 .unlocked_ioctl = drm_ioctl, 223 #endif 203 224 .mmap = vbox_mmap, 204 225 .poll = drm_poll,
Note:
See TracChangeset
for help on using the changeset viewer.