VirtualBox

Changeset 50902 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 26, 2014 10:05:24 PM (11 years ago)
Author:
vboxsync
Message:

Additions/linux/drm: add host mouse cursor support to the kernel video driver.

Location:
trunk/src/VBox/Additions/linux/drm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.c

    r49627 r50902  
    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. */
     107static 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
     115static 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
    104123
    105124static const struct file_operations vbox_fops =
     
    108127    .open = drm_open,
    109128    .release = drm_release,
    110     .unlocked_ioctl = drm_ioctl,
     129    .unlocked_ioctl = vbox_ioctl,
    111130    .mmap = vbox_mmap,
    112131    .poll = drm_poll,
    113132    .fasync = drm_fasync,
    114133#ifdef CONFIG_COMPAT
    115     .compat_ioctl = drm_compat_ioctl,
     134    .compat_ioctl = vbox_compat_ioctl,
    116135#endif
    117136    .read = drm_read,
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r49878 r50902  
    7777#define DRIVER_MINOR        0
    7878#define DRIVER_PATCHLEVEL   0
     79
     80#define VBOX_MAX_CURSOR_WIDTH  64
     81#define VBOX_MAX_CURSOR_HEIGHT 64
    7982
    8083struct vbox_fbdev;
     
    108111    } ttm;
    109112
    110     struct drm_gem_object *cursor_cache;
    111     uint64_t cursor_cache_gpu_addr;
    112     struct ttm_bo_kmap_obj cache_kmap;
    113     int next_cursor;
    114113    spinlock_t dev_lock;
    115114};
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