]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: ubuntu: vbox -- Update to 5.1.14-dfsg-3
authorSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Mar 2017 15:59:29 +0000 (09:59 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 6 Mar 2017 21:20:09 +0000 (14:20 -0700)
BugLink: http://bugs.launchpad.net/bugs/1669807
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
ubuntu/vbox/BOM
ubuntu/vbox/vboxvideo/Makefile
ubuntu/vbox/vboxvideo/vbox_drv.c
ubuntu/vbox/vboxvideo/vbox_drv.h
ubuntu/vbox/vboxvideo/vbox_prime.c [new file with mode: 0644]

index f97e1f35e208c807db118cdde03ce91ecb38eaed..d825b283d1f0b01f2c29b07d4c44f54b99c723a1 100644 (file)
@@ -1,2 +1,2 @@
-Source: http://ports.ubuntu.com/pool/multiverse/v/virtualbox/virtualbox-guest-dkms_5.1.14-dfsg-2_all.deb
-Version: 5.1.14-dfsg-2
+Source: http://ports.ubuntu.com/pool/multiverse/v/virtualbox/virtualbox-guest-dkms_5.1.14-dfsg-3_all.deb
+Version: 5.1.14-dfsg-3
index f2f15ada0fd63102155646b4922c7bec243b43bf..4bbd1dfbf2416bc89a487983f05921ba8a47749f 100644 (file)
@@ -33,7 +33,7 @@ ifeq ($(filter 1.% 2.% 3.0.% 3.1.% 3.2.% 3.3.% 3.4.% 3.5.% 3.6.% 3.7.% \
 3.8.% 3.9.% 3.10.%,$(MY_KERNELRELEASE)),)
 MOD_OBJS   = HGSMIBase.o HGSMICommon.o HGSMIMemAlloc.o heapoffset.o \
              Modesetting.o vbox_drv.o vbox_fb.o vbox_irq.o vbox_main.o \
-             vbox_mode.o vbox_ttm.o VBVABase.o
+             vbox_mode.o vbox_ttm.o vbox_prime.o VBVABase.o
 else
 MOD_OBJS   = vbox_dummy.o
 endif
index 91b9de5bc146552ac5618a2e27c05bde78cc7145..d2c1b04f583633c40996b190f5570a606536c750 100644 (file)
@@ -273,7 +273,7 @@ static void vbox_master_drop(struct drm_device *dev,
 
 static struct drm_driver driver =
 {
-    .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
+    .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_PRIME,
     .dev_priv_size = 0,
 
     .load = vbox_driver_load,
@@ -302,6 +302,17 @@ static struct drm_driver driver =
 #else
     .dumb_destroy = drm_gem_dumb_destroy,
 #endif
+    .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
+    .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
+    .gem_prime_export = drm_gem_prime_export,
+    .gem_prime_import = drm_gem_prime_import,
+    .gem_prime_pin = vbox_gem_prime_pin,
+    .gem_prime_unpin = vbox_gem_prime_unpin,
+    .gem_prime_get_sg_table = vbox_gem_prime_get_sg_table,
+    .gem_prime_import_sg_table = vbox_gem_prime_import_sg_table,
+    .gem_prime_vmap = vbox_gem_prime_vmap,
+    .gem_prime_vunmap = vbox_gem_prime_vunmap,
+    .gem_prime_mmap = vbox_gem_prime_mmap,
 
 };
 
index f47e11ac04480cf2d0aa550ff8a9931fc8b76626..ca22cef0216fea8579162da40727236aaa7532eb 100644 (file)
@@ -313,6 +313,18 @@ void vbox_ttm_placement(struct vbox_bo *bo, int domain);
 int vbox_bo_push_sysram(struct vbox_bo *bo);
 int vbox_mmap(struct file *filp, struct vm_area_struct *vma);
 
+/*vbox_prime*/
+int vbox_gem_prime_pin(struct drm_gem_object *obj);
+void vbox_gem_prime_unpin(struct drm_gem_object *obj);
+struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj);
+struct drm_gem_object *vbox_gem_prime_import_sg_table(
+        struct drm_device *dev, struct dma_buf_attachment *attach,
+        struct sg_table *table);
+void *vbox_gem_prime_vmap(struct drm_gem_object *obj);
+void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
+int vbox_gem_prime_mmap(struct drm_gem_object *obj,
+        struct vm_area_struct *area);
+
 /* vbox_irq.c */
 int vbox_irq_init(struct vbox_private *vbox);
 void vbox_irq_fini(struct vbox_private *vbox);
diff --git a/ubuntu/vbox/vboxvideo/vbox_prime.c b/ubuntu/vbox/vboxvideo/vbox_prime.c
new file mode 100644 (file)
index 0000000..3b8ebfe
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2017 Canonical
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Andreas Pokorny
+ */
+
+#include "vbox_drv.h"
+
+/* Based on qxl_prime.c:
+ * Empty Implementations as there should not be any other driver for a virtual
+ * device that might share buffers with vboxvideo */
+
+int vbox_gem_prime_pin(struct drm_gem_object *obj)
+{
+    WARN_ONCE(1, "not implemented");
+    return -ENOSYS;
+}
+
+void vbox_gem_prime_unpin(struct drm_gem_object *obj)
+{
+    WARN_ONCE(1, "not implemented");
+}
+
+
+struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
+{
+    WARN_ONCE(1, "not implemented");
+    return ERR_PTR(-ENOSYS);
+}
+
+struct drm_gem_object *vbox_gem_prime_import_sg_table(
+        struct drm_device *dev, struct dma_buf_attachment *attach,
+        struct sg_table *table)
+{
+    WARN_ONCE(1, "not implemented");
+    return ERR_PTR(-ENOSYS);
+}
+
+void *vbox_gem_prime_vmap(struct drm_gem_object *obj)
+{
+    WARN_ONCE(1, "not implemented");
+    return ERR_PTR(-ENOSYS);
+}
+
+void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
+{
+    WARN_ONCE(1, "not implemented");
+}
+
+int vbox_gem_prime_mmap(struct drm_gem_object *obj,
+        struct vm_area_struct *area)
+{
+    WARN_ONCE(1, "not implemented");
+    return -ENOSYS;
+}