Changeset 52599 in vbox
- Timestamp:
- Sep 4, 2014 8:34:43 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 95875
- Location:
- trunk/src/VBox/Additions/linux/drm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vbox_drv.c
r50902 r52599 102 102 }; 103 103 104 /* Intercept the old-style cursor IOCtl which does not pass the hot-spot to stop105 * the kernel from translating it to a new-style one with a zero hot-spot, which106 * we do not want. */107 static long vbox_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)108 {109 if (cmd != DRM_IOCTL_MODE_CURSOR)110 return drm_ioctl(filp, cmd, arg);111 return -EINVAL;112 }113 114 #ifdef CONFIG_COMPAT115 static long vbox_compat_ioctl(struct file *filp, unsigned int cmd,116 unsigned long arg)117 {118 if (cmd != DRM_IOCTL_MODE_CURSOR)119 return drm_compat_ioctl(filp, cmd, arg);120 return -EINVAL;121 }122 #endif123 124 104 static const struct file_operations vbox_fops = 125 105 { … … 127 107 .open = drm_open, 128 108 .release = drm_release, 129 .unlocked_ioctl = vbox_ioctl,109 .unlocked_ioctl = drm_ioctl, 130 110 .mmap = vbox_mmap, 131 111 .poll = drm_poll, 112 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) 132 113 .fasync = drm_fasync, 114 #endif 133 115 #ifdef CONFIG_COMPAT 134 .compat_ioctl = vbox_compat_ioctl,116 .compat_ioctl = drm_compat_ioctl, 135 117 #endif 136 118 .read = drm_read, … … 139 121 static struct drm_driver driver = 140 122 { 141 .driver_features = DRIVER_ USE_MTRR | DRIVER_MODESET | DRIVER_GEM,123 .driver_features = DRIVER_MODESET | DRIVER_GEM, 142 124 .dev_priv_size = 0, 143 125 … … 155 137 .patchlevel = DRIVER_PATCHLEVEL, 156 138 157 .gem_init_object = vbox_gem_init_object,158 139 .gem_free_object = vbox_gem_free_object, 159 140 .dumb_create = vbox_dumb_create, -
trunk/src/VBox/Additions/linux/drm/vbox_drv.h
r50902 r52599 180 180 #endif 181 181 182 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) 183 # define CRTC_FB(crtc) (crtc)->fb 184 #else 185 # define CRTC_FB(crtc) (crtc)->primary->fb 186 #endif 187 182 188 void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb, 183 189 struct drm_clip_rect *pRects, … … 219 225 uint32_t handle); 220 226 221 extern int vbox_gem_init_object(struct drm_gem_object *obj);222 227 extern void vbox_gem_free_object(struct drm_gem_object *obj); 223 228 extern int vbox_dumb_mmap_offset(struct drm_file *file,
Note:
See TracChangeset
for help on using the changeset viewer.