VirtualBox

Changeset 52599 in vbox


Ignore:
Timestamp:
Sep 4, 2014 8:34:43 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95875
Message:

Additions/linux/drm: updated KMS driver to kernel 3.16.

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  
    102102};
    103103
    104 /* Intercept the old-style cursor IOCtl which does not pass the hot-spot to stop
    105  * the kernel from translating it to a new-style one with a zero hot-spot, which
    106  * 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_COMPAT
    115 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 #endif
    123 
    124104static const struct file_operations vbox_fops =
    125105{
     
    127107    .open = drm_open,
    128108    .release = drm_release,
    129     .unlocked_ioctl = vbox_ioctl,
     109    .unlocked_ioctl = drm_ioctl,
    130110    .mmap = vbox_mmap,
    131111    .poll = drm_poll,
     112#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
    132113    .fasync = drm_fasync,
     114#endif
    133115#ifdef CONFIG_COMPAT
    134     .compat_ioctl = vbox_compat_ioctl,
     116    .compat_ioctl = drm_compat_ioctl,
    135117#endif
    136118    .read = drm_read,
     
    139121static struct drm_driver driver =
    140122{
    141     .driver_features = DRIVER_USE_MTRR | DRIVER_MODESET | DRIVER_GEM,
     123    .driver_features = DRIVER_MODESET | DRIVER_GEM,
    142124    .dev_priv_size = 0,
    143125
     
    155137    .patchlevel = DRIVER_PATCHLEVEL,
    156138
    157     .gem_init_object = vbox_gem_init_object,
    158139    .gem_free_object = vbox_gem_free_object,
    159140    .dumb_create = vbox_dumb_create,
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r50902 r52599  
    180180#endif
    181181
     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
    182188void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
    183189                                       struct drm_clip_rect *pRects,
     
    219225                uint32_t handle);
    220226
    221 extern int vbox_gem_init_object(struct drm_gem_object *obj);
    222227extern void vbox_gem_free_object(struct drm_gem_object *obj);
    223228extern int vbox_dumb_mmap_offset(struct drm_file *file,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette