VirtualBox

Ignore:
Timestamp:
Mar 22, 2017 8:18:00 AM (8 years ago)
Author:
vboxsync
Message:

bugref:4567: Linux kernel driver maintenance: [vboxvideo] Add support for PRIME. Contributed by Andreas Pokorny/Canonical.

Location:
trunk/src/VBox/Additions/linux/drm
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/Makefile.module.kms

    r66093 r66189  
    3737MOD_OBJS   = HGSMIBase.o HGSMICommon.o HGSMIMemAlloc.o \
    3838             Modesetting.o vbox_drv.o vbox_fb.o vbox_irq.o vbox_main.o \
    39              vbox_mode.o vbox_ttm.o VBVABase.o
     39             vbox_mode.o vbox_ttm.o VBVABase.o vbox_prime.o
    4040
    4141MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -fno-pie
  • trunk/src/VBox/Additions/linux/drm/files_vboxvideo_drv

    r65381 r66189  
    5353    ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_main.c=>vbox_main.c \
    5454    ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_mode.c=>vbox_mode.c \
     55    ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_prime.c=>vbox_prime.c \
    5556    ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_ttm.c=>vbox_ttm.c \
    5657    ${PATH_ROOT}/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp=>HGSMICommon.c \
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.c

    r64337 r66189  
    273273static struct drm_driver driver =
    274274{
    275     .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
     275    .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_PRIME,
    276276    .dev_priv_size = 0,
    277277
     
    302302    .dumb_destroy = drm_gem_dumb_destroy,
    303303#endif
     304    .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
     305    .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
     306    .gem_prime_export = drm_gem_prime_export,
     307    .gem_prime_import = drm_gem_prime_import,
     308    .gem_prime_pin = vbox_gem_prime_pin,
     309    .gem_prime_unpin = vbox_gem_prime_unpin,
     310    .gem_prime_get_sg_table = vbox_gem_prime_get_sg_table,
     311    .gem_prime_import_sg_table = vbox_gem_prime_import_sg_table,
     312    .gem_prime_vmap = vbox_gem_prime_vmap,
     313    .gem_prime_vunmap = vbox_gem_prime_vunmap,
     314    .gem_prime_mmap = vbox_gem_prime_mmap,
    304315
    305316};
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r65992 r66189  
    321321int vbox_mmap(struct file *filp, struct vm_area_struct *vma);
    322322
     323/*vbox_prime*/
     324int vbox_gem_prime_pin(struct drm_gem_object *obj);
     325void vbox_gem_prime_unpin(struct drm_gem_object *obj);
     326struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj);
     327struct drm_gem_object *vbox_gem_prime_import_sg_table(
     328        struct drm_device *dev,
     329#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
     330        size_t size,
     331#else
     332        struct dma_buf_attachment *attach,
     333#endif
     334        struct sg_table *table);
     335void *vbox_gem_prime_vmap(struct drm_gem_object *obj);
     336void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
     337int vbox_gem_prime_mmap(struct drm_gem_object *obj,
     338        struct vm_area_struct *area);
     339
    323340/* vbox_irq.c */
    324341int vbox_irq_init(struct vbox_private *vbox);
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