[openchrome-devel] drm-openchrome: Branch 'drm-next-5.13' - 8 commits - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat May 15 03:16:41 UTC 2021


 drivers/gpu/drm/openchrome/openchrome_crtc.c   |   39 +++++++++++++----------
 drivers/gpu/drm/openchrome/openchrome_cursor.c |   41 +++++++++++++++----------
 drivers/gpu/drm/openchrome/openchrome_drv.h    |    6 +--
 drivers/gpu/drm/openchrome/openchrome_object.c |   11 ++----
 drivers/gpu/drm/openchrome/openchrome_ttm.c    |    6 +--
 5 files changed, 57 insertions(+), 46 deletions(-)

New commits:
commit c3588b84799e3ac2bad1e73b2b076816a3363a1c
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:15:31 2021 -0700

    drm: Use state helper instead of the plane state pointer
    
    Based on commit 37418bf (drm: Use state helper instead of the plane
    state pointer).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index 44005587ab18..0ce9af620d01 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1886,7 +1886,8 @@ static void openchrome_primary_atomic_disable(struct drm_plane *plane,
 void openchrome_primary_atomic_update(struct drm_plane *plane,
 					struct drm_atomic_state *state)
 {
-	struct drm_plane_state *new_state = plane->state;
+	struct drm_plane_state *new_state =
+			drm_atomic_get_new_plane_state(state, plane);
 	struct drm_crtc *crtc = new_state->crtc;
 	struct drm_framebuffer *fb = new_state->fb;
 	uint32_t pitch = (new_state->crtc_y * fb->pitches[0]) +
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index dcd8eaab4c5c..ab870ede2035 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -357,7 +357,8 @@ exit:
 static void openchrome_cursor_atomic_update(struct drm_plane *plane,
 					struct drm_atomic_state *state)
 {
-	struct drm_plane_state *new_state = plane->state;
+	struct drm_plane_state *new_state =
+			drm_atomic_get_new_plane_state(state, plane);
 	struct drm_plane_state *old_state =
 			drm_atomic_get_old_plane_state(state, plane);
 	struct drm_crtc *crtc = new_state->crtc;
@@ -383,7 +384,8 @@ static void openchrome_cursor_atomic_update(struct drm_plane *plane,
 void openchrome_cursor_atomic_disable(struct drm_plane *plane,
 					struct drm_atomic_state *state)
 {
-	struct drm_plane_state *new_state = plane->state;
+	struct drm_plane_state *new_state =
+			drm_atomic_get_new_plane_state(state, plane);
 	struct drm_device *dev = plane->dev;
 	struct drm_crtc *crtc = new_state->crtc;
 
commit dca26c46653aa06c97fadb8abb2390a31fe90073
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:15:24 2021 -0700

    drm/atomic: Pass the full state to planes atomic disable and update
    
    Based on commit 977697e (drm/atomic: Pass the full state to planes
    atomic disable and update).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index e025c9c905f3..44005587ab18 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1875,7 +1875,7 @@ exit:
 }
 
 static void openchrome_primary_atomic_disable(struct drm_plane *plane,
-				struct drm_plane_state *old_state)
+					struct drm_atomic_state *state)
 {
 	DRM_DEBUG_KMS("Entered %s.\n", __func__);
 
@@ -1884,7 +1884,7 @@ static void openchrome_primary_atomic_disable(struct drm_plane *plane,
 }
 
 void openchrome_primary_atomic_update(struct drm_plane *plane,
-				struct drm_plane_state *old_state)
+					struct drm_atomic_state *state)
 {
 	struct drm_plane_state *new_state = plane->state;
 	struct drm_crtc *crtc = new_state->crtc;
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index 2b56b0409887..dcd8eaab4c5c 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -355,9 +355,11 @@ exit:
 }
 
 static void openchrome_cursor_atomic_update(struct drm_plane *plane,
-				struct drm_plane_state *old_state)
+					struct drm_atomic_state *state)
 {
 	struct drm_plane_state *new_state = plane->state;
+	struct drm_plane_state *old_state =
+			drm_atomic_get_old_plane_state(state, plane);
 	struct drm_crtc *crtc = new_state->crtc;
 	struct openchrome_bo *bo;
 	struct drm_gem_object *gem;
@@ -379,7 +381,7 @@ static void openchrome_cursor_atomic_update(struct drm_plane *plane,
 }
 
 void openchrome_cursor_atomic_disable(struct drm_plane *plane,
-			struct drm_plane_state *old_state)
+					struct drm_atomic_state *state)
 {
 	struct drm_plane_state *new_state = plane->state;
 	struct drm_device *dev = plane->dev;
commit de29172c4b218ae70734845b2963c40fad6a1470
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:15:17 2021 -0700

    drm: Rename plane->state variables in atomic update and disable
    
    Based on commit 41016fe (Based on commit drm: Rename plane->state
    variables in atomic update and disable).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index f029e91de163..e025c9c905f3 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1886,11 +1886,11 @@ static void openchrome_primary_atomic_disable(struct drm_plane *plane,
 void openchrome_primary_atomic_update(struct drm_plane *plane,
 				struct drm_plane_state *old_state)
 {
-	struct drm_plane_state *state = plane->state;
-	struct drm_crtc *crtc = state->crtc;
-	struct drm_framebuffer *fb = state->fb;
-	uint32_t pitch = (state->crtc_y * fb->pitches[0]) +
-			(state->crtc_x * ((fb->format->cpp[0] * 8) >> 3));
+	struct drm_plane_state *new_state = plane->state;
+	struct drm_crtc *crtc = new_state->crtc;
+	struct drm_framebuffer *fb = new_state->fb;
+	uint32_t pitch = (new_state->crtc_y * fb->pitches[0]) +
+			(new_state->crtc_x * ((fb->format->cpp[0] * 8) >> 3));
 	uint32_t addr;
 	struct via_crtc *iga = container_of(crtc, struct via_crtc, base);
 	struct openchrome_drm_private *dev_private =
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index ffb6c102cd23..2b56b0409887 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -357,22 +357,22 @@ exit:
 static void openchrome_cursor_atomic_update(struct drm_plane *plane,
 				struct drm_plane_state *old_state)
 {
-	struct drm_plane_state *state = plane->state;
-	struct drm_crtc *crtc = plane->state->crtc;
+	struct drm_plane_state *new_state = plane->state;
+	struct drm_crtc *crtc = new_state->crtc;
 	struct openchrome_bo *bo;
 	struct drm_gem_object *gem;
 
 	DRM_DEBUG_KMS("Entered %s.\n", __func__);
 
-	if (state->fb != old_state->fb) {
-		gem = state->fb->obj[0];
+	if (new_state->fb != old_state->fb) {
+		gem = new_state->fb->obj[0];
 		bo = container_of(gem, struct openchrome_bo, gem);
 		openchrome_cursor_address(crtc, bo);
 	}
 
 	openchrome_set_hi_location(crtc,
-				state->crtc_x,
-				state->crtc_y);
+					new_state->crtc_x,
+					new_state->crtc_y);
 	openchrome_show_cursor(crtc);
 
 	DRM_DEBUG_KMS("Exiting %s.\n", __func__);
@@ -381,8 +381,9 @@ static void openchrome_cursor_atomic_update(struct drm_plane *plane,
 void openchrome_cursor_atomic_disable(struct drm_plane *plane,
 			struct drm_plane_state *old_state)
 {
+	struct drm_plane_state *new_state = plane->state;
 	struct drm_device *dev = plane->dev;
-	struct drm_crtc *crtc = plane->state->crtc;
+	struct drm_crtc *crtc = new_state->crtc;
 
 	DRM_DEBUG_KMS("Entered %s.\n", __func__);
 
commit 5d2f41b6b8d9a0646f22ae4145fbf158d96ba63a
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:15:07 2021 -0700

    drm: Use the state pointer directly in planes atomic_check
    
    Based on commit dec9202 (drm: Use the state pointer directly in planes
    atomic_check).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index b70d3e8735bc..f029e91de163 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1861,8 +1861,7 @@ static int openchrome_primary_atomic_check(struct drm_plane *plane,
 		goto exit;
 	}
 
-	new_crtc_state = drm_atomic_get_new_crtc_state(
-						new_plane_state->state,
+	new_crtc_state = drm_atomic_get_new_crtc_state(state,
 						new_plane_state->crtc);
 	ret = drm_atomic_helper_check_plane_state(
 					new_plane_state,
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index 9d8babed0e4f..ffb6c102cd23 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -341,8 +341,7 @@ static int openchrome_cursor_atomic_check(struct drm_plane *plane,
 		goto exit;
 	}
 
-	new_crtc_state = drm_atomic_get_new_crtc_state(
-						new_plane_state->state,
+	new_crtc_state = drm_atomic_get_new_crtc_state(state,
 						new_plane_state->crtc);
 	ret = drm_atomic_helper_check_plane_state(
 					new_plane_state,
commit bfdce7b1fb598a637150612efd035b255004bc02
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:14:52 2021 -0700

    drm/atomic: Pass the full state to planes atomic_check
    
    Based on commit 7c11b99 (drm/atomic: Pass the full state to planes
    atomic_check).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index b1053787b146..b70d3e8735bc 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1830,11 +1830,13 @@ drm_crtc_helper_funcs openchrome_drm_crtc_helper_funcs = {
 };
 
 static int openchrome_primary_atomic_check(struct drm_plane *plane,
-			 struct drm_plane_state *new_plane_state)
+				 struct drm_atomic_state *state)
 {
+	struct drm_plane_state *new_plane_state =
+			drm_atomic_get_new_plane_state(state, plane);
+	struct drm_crtc_state *new_crtc_state;
 	struct drm_device *dev = plane->dev;
 	struct drm_framebuffer *fb = new_plane_state->fb;
-	struct drm_crtc_state *new_crtc_state;
 	struct openchrome_drm_private *dev_private =
 					plane->dev->dev_private;
 	uint32_t frame_buffer_size;
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index d6c162c24d6a..9d8babed0e4f 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -320,10 +320,12 @@ exit:
 }
 
 static int openchrome_cursor_atomic_check(struct drm_plane *plane,
-			 struct drm_plane_state *new_plane_state)
+				 struct drm_atomic_state *state)
 {
-	struct drm_framebuffer *fb = new_plane_state->fb;
+	struct drm_plane_state *new_plane_state =
+			drm_atomic_get_new_plane_state(state, plane);
 	struct drm_crtc_state *new_crtc_state;
+	struct drm_framebuffer *fb = new_plane_state->fb;
 	int ret = 0;
 
 	DRM_DEBUG_KMS("Entered %s.\n", __func__);
commit 9edf15b86e0461844d7487d18b8c52cade5dd159
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:14:47 2021 -0700

    drm: Rename plane atomic_check state names
    
    Based on commit ba5c164 (drm: Rename plane atomic_check state names).
    Renamed crtc_state variable to new_crtc_state to match the new
    new_plane_state variable introduced in the atomic_check functions.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index e309039f8210..b1053787b146 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1830,11 +1830,11 @@ drm_crtc_helper_funcs openchrome_drm_crtc_helper_funcs = {
 };
 
 static int openchrome_primary_atomic_check(struct drm_plane *plane,
-					struct drm_plane_state *state)
+			 struct drm_plane_state *new_plane_state)
 {
 	struct drm_device *dev = plane->dev;
-	struct drm_framebuffer *fb = state->fb;
-	struct drm_crtc_state *crtc_state;
+	struct drm_framebuffer *fb = new_plane_state->fb;
+	struct drm_crtc_state *new_crtc_state;
 	struct openchrome_drm_private *dev_private =
 					plane->dev->dev_private;
 	uint32_t frame_buffer_size;
@@ -1842,7 +1842,7 @@ static int openchrome_primary_atomic_check(struct drm_plane *plane,
 
 	DRM_DEBUG_KMS("Entered %s.\n", __func__);
 
-	if ((!state->crtc) || (!state->visible)) {
+	if ((!new_plane_state->crtc) || (!new_plane_state->visible)) {
 		goto exit;
 	}
 
@@ -1859,12 +1859,15 @@ static int openchrome_primary_atomic_check(struct drm_plane *plane,
 		goto exit;
 	}
 
-	crtc_state = drm_atomic_get_new_crtc_state(state->state,
-							state->crtc);
-	ret = drm_atomic_helper_check_plane_state(state, crtc_state,
-						DRM_PLANE_HELPER_NO_SCALING,
-						DRM_PLANE_HELPER_NO_SCALING,
-						false, true);
+	new_crtc_state = drm_atomic_get_new_crtc_state(
+						new_plane_state->state,
+						new_plane_state->crtc);
+	ret = drm_atomic_helper_check_plane_state(
+					new_plane_state,
+					new_crtc_state,
+					DRM_PLANE_HELPER_NO_SCALING,
+					DRM_PLANE_HELPER_NO_SCALING,
+					false, true);
 exit:
 	DRM_DEBUG_KMS("Exiting %s.\n", __func__);
 	return ret;
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index cb4b289ed89f..d6c162c24d6a 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -320,15 +320,15 @@ exit:
 }
 
 static int openchrome_cursor_atomic_check(struct drm_plane *plane,
-					struct drm_plane_state *state)
+			 struct drm_plane_state *new_plane_state)
 {
-	struct drm_framebuffer *fb = state->fb;
-	struct drm_crtc_state *crtc_state;
+	struct drm_framebuffer *fb = new_plane_state->fb;
+	struct drm_crtc_state *new_crtc_state;
 	int ret = 0;
 
 	DRM_DEBUG_KMS("Entered %s.\n", __func__);
 
-	if ((!state->crtc) || (!state->visible)) {
+	if ((!new_plane_state->crtc) || (!new_plane_state->visible)) {
 		goto exit;
 	}
 
@@ -339,9 +339,12 @@ static int openchrome_cursor_atomic_check(struct drm_plane *plane,
 		goto exit;
 	}
 
-	crtc_state = drm_atomic_get_new_crtc_state(state->state,
-							state->crtc);
-	ret = drm_atomic_helper_check_plane_state(state, crtc_state,
+	new_crtc_state = drm_atomic_get_new_crtc_state(
+						new_plane_state->state,
+						new_plane_state->crtc);
+	ret = drm_atomic_helper_check_plane_state(
+					new_plane_state,
+					new_crtc_state,
 					DRM_PLANE_HELPER_NO_SCALING,
 					DRM_PLANE_HELPER_NO_SCALING,
 					true, true);
commit 9807d18b7232130250b05015a36c3ce798f698ac
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:14:05 2021 -0700

    drm/ttm: move memory accounting into vmwgfx v4
    
    Based on commit f07069d (drm/ttm: move memory accounting
    into vmwgfx v4).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_object.c b/drivers/gpu/drm/openchrome/openchrome_object.c
index 83fd41f711a4..d404a39c7a95 100644
--- a/drivers/gpu/drm/openchrome/openchrome_object.c
+++ b/drivers/gpu/drm/openchrome/openchrome_object.c
@@ -178,7 +178,6 @@ int openchrome_bo_create(struct drm_device *dev,
 {
 	struct openchrome_drm_private *dev_private = dev->dev_private;
 	struct openchrome_bo *bo;
-	size_t acc_size;
 	int ret;
 
 	DRM_DEBUG_KMS("Entered %s.\n", __func__);
@@ -207,15 +206,13 @@ int openchrome_bo_create(struct drm_device *dev,
 	bo->gem.funcs = &openchrome_gem_object_funcs;
 
 	openchrome_ttm_domain_to_placement(bo, ttm_domain);
-	acc_size = ttm_bo_dma_acc_size(&dev_private->bdev, size,
-					sizeof(struct openchrome_bo));
 	ret = ttm_bo_init(&dev_private->bdev,
 				&bo->ttm_bo,
 				size,
 				type,
 				&bo->placement,
 				PAGE_SIZE >> PAGE_SHIFT,
-				false, acc_size,
+				false,
 				NULL, NULL,
 				openchrome_ttm_bo_destroy);
 	if (ret) {
commit 80ebb475faf451ca3748dbdade2a6e440d900fe9
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri May 14 20:13:53 2021 -0700

    drm/ttm: device naming cleanup
    
    Based on commit 8af8a10 (drm/ttm: device naming cleanup).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/openchrome_drv.h b/drivers/gpu/drm/openchrome/openchrome_drv.h
index 3327cf3f3005..4411e6c0282c 100644
--- a/drivers/gpu/drm/openchrome/openchrome_drv.h
+++ b/drivers/gpu/drm/openchrome/openchrome_drv.h
@@ -214,7 +214,7 @@ enum via_engine {
 struct openchrome_drm_private {
 	struct drm_device *dev;
 
-	struct ttm_bo_device		bdev;
+	struct ttm_device		bdev;
 
 	/* Set this flag for ttm_bo_device_init. */
 	bool need_dma32;
@@ -370,7 +370,7 @@ extern int openchrome_driver_num_ioctls;
 
 extern int openchrome_hdmi_audio;
 
-extern struct ttm_bo_driver openchrome_bo_driver;
+extern struct ttm_device_funcs openchrome_bo_driver;
 
 int openchrome_vram_detect(struct openchrome_drm_private *dev_private);
 extern int openchrome_vram_init(
@@ -397,7 +397,7 @@ void openchrome_ttm_bo_destroy(struct ttm_buffer_object *tbo);
 int openchrome_bo_pin(struct openchrome_bo *bo, uint32_t ttm_domain);
 void openchrome_bo_unpin(struct openchrome_bo *bo);
 int openchrome_bo_create(struct drm_device *dev,
-				struct ttm_bo_device *bdev,
+				struct ttm_device *bdev,
 				uint64_t size,
 				enum ttm_bo_type type,
 				uint32_t ttm_domain,
diff --git a/drivers/gpu/drm/openchrome/openchrome_object.c b/drivers/gpu/drm/openchrome/openchrome_object.c
index c79f28d87d00..83fd41f711a4 100644
--- a/drivers/gpu/drm/openchrome/openchrome_object.c
+++ b/drivers/gpu/drm/openchrome/openchrome_object.c
@@ -169,7 +169,7 @@ void openchrome_bo_unpin(struct openchrome_bo *bo)
 }
 
 int openchrome_bo_create(struct drm_device *dev,
-				struct ttm_bo_device *bdev,
+				struct ttm_device *bdev,
 				uint64_t size,
 				enum ttm_bo_type type,
 				uint32_t ttm_domain,
@@ -291,7 +291,7 @@ int openchrome_mm_init(struct openchrome_drm_private *dev_private)
 	/*
 	 * Initialize bdev ttm_bo_device struct.
 	 */
-	ret = ttm_bo_device_init(&dev_private->bdev,
+	ret = ttm_device_init(&dev_private->bdev,
 				&openchrome_bo_driver,
 				dev->dev,
 				dev->anon_inode->i_mapping,
@@ -325,7 +325,7 @@ void openchrome_mm_fini(struct openchrome_drm_private *dev_private)
 
 	ttm_range_man_fini(&dev_private->bdev, TTM_PL_VRAM);
 
-	ttm_bo_device_release(&dev_private->bdev);
+	ttm_device_fini(&dev_private->bdev);
 
 	DRM_DEBUG_KMS("Exiting %s.\n", __func__);
 }
diff --git a/drivers/gpu/drm/openchrome/openchrome_ttm.c b/drivers/gpu/drm/openchrome/openchrome_ttm.c
index fd2ebda4ce65..3f457cc7df6f 100644
--- a/drivers/gpu/drm/openchrome/openchrome_ttm.c
+++ b/drivers/gpu/drm/openchrome/openchrome_ttm.c
@@ -75,7 +75,7 @@ err_ttm_tt_init:
 	return NULL;
 }
 
-static void openchrome_ttm_tt_destroy(struct ttm_bo_device *bdev,
+static void openchrome_ttm_tt_destroy(struct ttm_device *bdev,
 					struct ttm_tt *tt)
 {
 	ttm_tt_destroy_common(bdev, tt);
@@ -152,7 +152,7 @@ static void openchrome_bo_delete_mem_notify(struct ttm_buffer_object *bo)
 	return;
 }
 
-static int openchrome_bo_io_mem_reserve(struct ttm_bo_device *bdev,
+static int openchrome_bo_io_mem_reserve(struct ttm_device *bdev,
 					struct ttm_resource *mem)
 {
 	struct openchrome_drm_private *dev_private = container_of(bdev,
@@ -178,7 +178,7 @@ static int openchrome_bo_io_mem_reserve(struct ttm_bo_device *bdev,
 	return ret;
 }
 
-struct ttm_bo_driver openchrome_bo_driver = {
+struct ttm_device_funcs openchrome_bo_driver = {
 	.ttm_tt_create = openchrome_ttm_tt_create,
 	.ttm_tt_destroy = openchrome_ttm_tt_destroy,
 	.eviction_valuable = ttm_bo_eviction_valuable,


More information about the openchrome-devel mailing list