]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-virtio-gl-accel.patch
- 4.4.88
[packages/kernel.git] / kernel-virtio-gl-accel.patch
index 5c873819a26db0ca18dcee14dc8695aa04295daf..c1f825a3a46ebfabd413bd43060de2c1238b498a 100644 (file)
@@ -4,8 +4,8 @@ index 30879df..35699a0 100644
 --- a/drivers/gpu/Makefile
 +++ b/drivers/gpu/Makefile
 @@ -1 +1 @@
--obj-y                 += drm/ vga/ stub/
-+obj-y                 += drm/ vga/ stub/ misc/
+-obj-y                 += drm/ vga/
++obj-y                 += drm/ vga/ misc/
 diff --git a/drivers/gpu/misc/Kconfig b/drivers/gpu/misc/Kconfig
 new file mode 100644
 index 0000000..50043d3
@@ -32,7 +32,7 @@ new file mode 100644
 index 0000000..8882bda
 --- /dev/null
 +++ b/drivers/gpu/misc/virtio-gl.c
-@@ -0,0 +1,312 @@
+@@ -0,0 +1,315 @@
 +/*
 + * Copyright (C) 2010 Intel Corporation
 + *
@@ -52,7 +52,6 @@ index 0000000..8882bda
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 + */
-+
 +#include <linux/kernel.h>
 +#include <linux/module.h>
 +#include <linux/fs.h>
@@ -60,6 +59,7 @@ index 0000000..8882bda
 +#include <linux/sched.h>
 +#include <linux/slab.h>
 +#include <linux/miscdevice.h>
++#include <linux/vmalloc.h>
 +#include <linux/virtio.h>
 +#include <linux/virtio_ids.h>
 +#include <linux/virtio_config.h>
@@ -176,7 +176,10 @@ index 0000000..8882bda
 +      }
 +
 +      /* Transfer data */
-+      if (virtqueue_add_buf(vq, sg_list, o_page, i_page, (void *)1, GFP_ATOMIC) >= 0) {
++      struct scatterlist *sgs[2];
++      sgs[0] = &sg_list[0];
++      sgs[1] = &sg_list[1];
++      if (virtqueue_add_sgs(vq, sgs, o_page, i_page, (void *)1, GFP_ATOMIC) >= 0) {
 +              virtqueue_kick(vq);
 +              /* Chill out until it's done with the buffer. */
 +              while (!virtqueue_get_buf(vq, &count))
@@ -242,7 +245,7 @@ index 0000000..8882bda
 +      return 0;
 +}
 +
-+static int glmem_fsync(struct file *filp, int datasync)
++static int glmem_fsync(struct file *filp, loff_t unused1, loff_t unused2, int datasync)
 +{
 +      struct virtio_gl_data *gldata = to_virtio_gl_data(filp);
 +
@@ -306,7 +309,7 @@ index 0000000..8882bda
 +      return 0;
 +}
 +
-+static void __devexit glmem_remove(struct virtio_device *vdev)
++static void glmem_remove(struct virtio_device *vdev)
 +{
 +      vdev->config->reset(vdev);
 +      misc_deregister(&glmem_dev);
@@ -325,7 +328,7 @@ index 0000000..8882bda
 +      },
 +      .id_table =     id_table,
 +      .probe =        glmem_probe,
-+      .remove =       __devexit_p(glmem_remove),
++      .remove =       glmem_remove,
 +};
 +
 +static int __init glmem_init(void)
@@ -350,15 +353,15 @@ index 3d94a14..9a9a6cc 100644
 --- a/drivers/video/Kconfig
 +++ b/drivers/video/Kconfig
 @@ -16,6 +16,7 @@ source "drivers/char/agp/Kconfig"
- source "drivers/gpu/vga/Kconfig"
+ endmenu
  
- source "drivers/gpu/drm/Kconfig"
+ source "drivers/video/backlight/Kconfig"
 +source "drivers/gpu/misc/Kconfig"
  
  config VGASTATE
         tristate
---- linux-3.4/include/linux/virtio_ids.h~      2012-05-21 08:42:02.000000000 +0200
-+++ linux-3.4/include/linux/virtio_ids.h       2012-05-21 09:02:40.065957644 +0200
+--- linux-3.4/include/uapi/linux/virtio_ids.h~ 2012-05-21 08:42:02.000000000 +0200
++++ linux-3.4/include/uapi/linux/virtio_ids.h  2012-05-21 09:02:40.065957644 +0200
 @@ -34,6 +34,7 @@
  #define VIRTIO_ID_CONSOLE     3 /* virtio console */
  #define VIRTIO_ID_RNG         4 /* virtio ring */
This page took 0.030269 seconds and 4 git commands to generate.