[Openchrome-devel] drm-openchrome: Branch 'drm-next-4.13' - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Aug 19 00:04:39 UTC 2017


 drivers/gpu/drm/openchrome/ttm_gem.c |    8 ++++----
 drivers/gpu/drm/openchrome/via_drv.h |    6 +++---
 drivers/gpu/drm/openchrome/via_ttm.c |   10 +++++-----
 3 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 1950450c740e2aacec9f7d994a5a3eb34372f6ae
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 18 17:04:22 2017 -0700

    Rename ttm_heap struct’s pbo to bo
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/ttm_gem.c b/drivers/gpu/drm/openchrome/ttm_gem.c
index a5eb74e656e2..b6a995b7af2e 100644
--- a/drivers/gpu/drm/openchrome/ttm_gem.c
+++ b/drivers/gpu/drm/openchrome/ttm_gem.c
@@ -37,10 +37,10 @@ int ttm_gem_open_object(struct drm_gem_object *obj, struct drm_file *file_priv)
 void ttm_gem_free_object(struct drm_gem_object *obj)
 {
 	struct ttm_gem_object *gem = container_of(obj, struct ttm_gem_object, gem);
+	struct ttm_buffer_object *bo;
 
 	if (gem->heap != NULL) {
-		struct ttm_buffer_object *bo = &gem->heap->pbo;
-
+		bo = &gem->heap->bo;
 		ttm_bo_unref(&bo);
 		gem->heap = NULL;
 	}
@@ -56,7 +56,7 @@ ttm_gem_mapping(struct drm_gem_object *obj)
 	gem = container_of(obj, struct ttm_gem_object, gem);
 	if (gem->heap == NULL)
 		return NULL;
-	return &gem->heap->pbo;
+	return &gem->heap->bo;
 }
 
 /*
@@ -109,7 +109,7 @@ ttm_gem_create(struct drm_device *dev, struct ttm_bo_device *bdev,
 		return ERR_PTR(ret);
 	}
 
-	obj->heap = container_of(bo, struct ttm_heap, pbo);
+	obj->heap = container_of(bo, struct ttm_heap, bo);
 	bo->persistent_swap_storage = obj->gem.filp;
 	return &obj->gem;
 }
diff --git a/drivers/gpu/drm/openchrome/via_drv.h b/drivers/gpu/drm/openchrome/via_drv.h
index e5ff67b88eb9..e9473e667a26 100644
--- a/drivers/gpu/drm/openchrome/via_drv.h
+++ b/drivers/gpu/drm/openchrome/via_drv.h
@@ -106,9 +106,9 @@ struct via_state {
 };
 
 struct ttm_heap {
-    struct ttm_place busy_placements[TTM_NUM_MEM_TYPES];
-    struct ttm_place placements[TTM_NUM_MEM_TYPES];
-    struct ttm_buffer_object pbo;
+	struct ttm_buffer_object bo;
+	struct ttm_place busy_placements[TTM_NUM_MEM_TYPES];
+	struct ttm_place placements[TTM_NUM_MEM_TYPES];
 };
 
 struct ttm_gem_object {
diff --git a/drivers/gpu/drm/openchrome/via_ttm.c b/drivers/gpu/drm/openchrome/via_ttm.c
index a4566a2cf74c..c1860464e7df 100644
--- a/drivers/gpu/drm/openchrome/via_ttm.c
+++ b/drivers/gpu/drm/openchrome/via_ttm.c
@@ -99,7 +99,7 @@ via_ttm_global_release(struct drm_global_reference *global_ref,
 static void
 via_ttm_bo_destroy(struct ttm_buffer_object *bo)
 {
-    struct ttm_heap *heap = container_of(bo, struct ttm_heap, pbo);
+    struct ttm_heap *heap = container_of(bo, struct ttm_heap, bo);
 
     kfree(heap);
     heap = NULL;
@@ -665,7 +665,7 @@ void
 ttm_placement_from_domain(struct ttm_buffer_object *bo, struct ttm_placement *placement, u32 domains,
                 struct ttm_bo_device *bdev)
 {
-    struct ttm_heap *heap = container_of(bo, struct ttm_heap, pbo);
+    struct ttm_heap *heap = container_of(bo, struct ttm_heap, bo);
     int cnt = 0, i = 0;
 
     if (!(domains & TTM_PL_MASK_MEM))
@@ -717,7 +717,7 @@ via_bo_create(struct ttm_bo_device *bdev,
         goto exit;
     }
 
-    bo = &heap->pbo;
+    bo = &heap->bo;
 
     ttm_placement_from_domain(bo, &placement, domains, bdev);
 
@@ -746,7 +746,7 @@ exit:
 int
 via_bo_pin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj *kmap)
 {
-    struct ttm_heap *heap = container_of(bo, struct ttm_heap, pbo);
+    struct ttm_heap *heap = container_of(bo, struct ttm_heap, bo);
     struct ttm_placement placement;
     int ret;
 
@@ -767,7 +767,7 @@ via_bo_pin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj *kmap)
 int
 via_bo_unpin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj *kmap)
 {
-    struct ttm_heap *heap = container_of(bo, struct ttm_heap, pbo);
+    struct ttm_heap *heap = container_of(bo, struct ttm_heap, bo);
     struct ttm_placement placement;
     int ret;
 


More information about the Openchrome-devel mailing list