drivers/gpu/drm/via/init_ttm.c |   44 -----------------------------------------
 drivers/gpu/drm/via/via_drv.h  |   10 ++++-----
 drivers/gpu/drm/via/via_ttm.c  |   19 +++++++++++++++++
 3 files changed, 24 insertions(+), 49 deletions(-)

New commits:
commit 26ce7f070e5a4f3d06b503e7a03cde14c3601c4f
Author: Kevin Brace <kevinbr...@gmx.com>
Date:   Tue Jan 24 14:03:48 2017 -0600

    Version bumped to 3.0.21
    
    Signed-off-by: Kevin Brace <kevinbr...@gmx.com>

diff --git a/drivers/gpu/drm/via/init_ttm.c b/drivers/gpu/drm/via/init_ttm.c
deleted file mode 100644
index e69de29..0000000
diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 1e5e853..d89f802 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -34,7 +34,7 @@
 
 #define DRIVER_MAJOR           3
 #define DRIVER_MINOR           0
-#define DRIVER_PATCHLEVEL      20
+#define DRIVER_PATCHLEVEL      21
 
 #include <linux/module.h>
 
commit e9dd75292ddba4d583c895312f13b84ddaf59d83
Author: Kevin Brace <kevinbr...@gmx.com>
Date:   Tue Jan 24 14:01:43 2017 -0600

    Discontinuing init_ttm.c
    
    The last remaining function was moved into via_ttm.c.
    
    Signed-off-by: Kevin Brace <kevinbr...@gmx.com>

diff --git a/drivers/gpu/drm/via/init_ttm.c b/drivers/gpu/drm/via/init_ttm.c
index 78916a6..e69de29 100644
--- a/drivers/gpu/drm/via/init_ttm.c
+++ b/drivers/gpu/drm/via/init_ttm.c
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2012 James Simmons
- * All Rights Reserved.
- *
- * 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, sub license,
- * 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 (including the
- * next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
- */
-#include "drmP.h"
-#include "via_drv.h"
-
-int
-ttm_allocate_kernel_buffer(struct ttm_bo_device *bdev, unsigned long size,
-                               uint32_t alignment, uint32_t domain,
-                               struct ttm_bo_kmap_obj *kmap)
-{
-       int ret = via_bo_create(bdev, size, ttm_bo_type_kernel, domain,
-                                 alignment, PAGE_SIZE, false, NULL,
-                                 NULL, &kmap->bo);
-       if (likely(!ret)) {
-               ret = via_bo_pin(kmap->bo, kmap);
-               if (unlikely(ret)) {
-                       DRM_ERROR("failed to mmap the buffer\n");
-                       ttm_bo_unref(&kmap->bo);
-                       kmap->bo = NULL;
-               }
-       }
-       return ret;
-}
diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 314c1f6..1e5e853 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -236,10 +236,6 @@ extern int via_dma_cleanup(struct drm_device *dev);
 extern void via_dmablit_handler(struct drm_device *dev, int engine, int 
from_irq);
 extern int via_dmablit_init(struct drm_device *dev);
 
-extern int ttm_allocate_kernel_buffer(struct ttm_bo_device *bdev, unsigned 
long size,
-                      uint32_t alignment, uint32_t domain,
-                      struct ttm_bo_kmap_obj *kmap);
-
 extern int via_mm_init(struct via_device *dev_priv);
 void via_mm_fini(struct drm_device *dev);
 extern void ttm_placement_from_domain(struct ttm_buffer_object *bo,
@@ -253,6 +249,10 @@ extern int via_bo_create(struct ttm_bo_device *bdev, 
unsigned long size,
                struct ttm_buffer_object **p_bo);
 extern int via_bo_pin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj 
*kmap);
 extern int via_bo_unpin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj 
*kmap);
+extern int ttm_allocate_kernel_buffer(struct ttm_bo_device *bdev, unsigned 
long size,
+                      uint32_t alignment, uint32_t domain,
+                      struct ttm_bo_kmap_obj *kmap);
+
 
 extern int ttm_mmap(struct file *filp, struct vm_area_struct *vma);
 
diff --git a/drivers/gpu/drm/via/via_ttm.c b/drivers/gpu/drm/via/via_ttm.c
index 49df2af..9a6bfdf 100644
--- a/drivers/gpu/drm/via/via_ttm.c
+++ b/drivers/gpu/drm/via/via_ttm.c
@@ -773,3 +773,22 @@ via_bo_unpin(struct ttm_buffer_object *bo, struct 
ttm_bo_kmap_obj *kmap)
     }
     return ret;
 }
+
+int
+ttm_allocate_kernel_buffer(struct ttm_bo_device *bdev, unsigned long size,
+                uint32_t alignment, uint32_t domain,
+                struct ttm_bo_kmap_obj *kmap)
+{
+    int ret = via_bo_create(bdev, size, ttm_bo_type_kernel, domain,
+                  alignment, PAGE_SIZE, false, NULL,
+                  NULL, &kmap->bo);
+    if (likely(!ret)) {
+        ret = via_bo_pin(kmap->bo, kmap);
+        if (unlikely(ret)) {
+            DRM_ERROR("failed to mmap the buffer\n");
+            ttm_bo_unref(&kmap->bo);
+            kmap->bo = NULL;
+        }
+    }
+    return ret;
+}
_______________________________________________
Openchrome-devel mailing list
Openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

Reply via email to