[Openchrome-devel] drm-openchrome: 6 commits - drivers/gpu/drm
Kevin Brace
kevinbrace at kemper.freedesktop.org
Sat Jan 21 01:39:05 UTC 2017
drivers/gpu/drm/via/via_crtc.c | 10 ++++----
drivers/gpu/drm/via/via_drv.c | 6 ++--
drivers/gpu/drm/via/via_drv.h | 9 ++-----
drivers/gpu/drm/via/via_fb.c | 4 +--
drivers/gpu/drm/via/via_fence.c | 2 -
drivers/gpu/drm/via/via_h1_cmdbuf.c | 2 -
drivers/gpu/drm/via/via_ttm.c | 44 ++++++++++++++++++------------------
7 files changed, 37 insertions(+), 40 deletions(-)
New commits:
commit 5850d71abf6a437887a1ca6ee9cf8a0ab41dc3f0
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 20 19:38:00 2017 -0600
Version bumped to 3.0.17
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index ce9cf95..f98ef6d 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -30,11 +30,11 @@
#define DRIVER_AUTHOR "The OpenChrome Project"
#define DRIVER_NAME "via"
#define DRIVER_DESC "OpenChrome DRM for VIA Technologies Chrome IGP"
-#define DRIVER_DATE "20170119"
+#define DRIVER_DATE "20170120"
#define DRIVER_MAJOR 3
#define DRIVER_MINOR 0
-#define DRIVER_PATCHLEVEL 16
+#define DRIVER_PATCHLEVEL 17
#include <linux/module.h>
commit e9a81e1a9065eb63adba87fc34c7dbb9eb6cfe59
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 20 19:36:23 2017 -0600
Making via_ttm_global_release a static function
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 989d556..ce9cf95 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -238,9 +238,6 @@ extern int ttm_allocate_kernel_buffer(struct ttm_bo_device *bdev, unsigned long
uint32_t alignment, uint32_t domain,
struct ttm_bo_kmap_obj *kmap);
-extern void via_ttm_global_release(struct drm_global_reference *global_ref,
- struct ttm_bo_global_ref *global_bo,
- struct ttm_bo_device *bdev);
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,
diff --git a/drivers/gpu/drm/via/via_ttm.c b/drivers/gpu/drm/via/via_ttm.c
index 532ed82..a4c82ed 100644
--- a/drivers/gpu/drm/via/via_ttm.c
+++ b/drivers/gpu/drm/via/via_ttm.c
@@ -79,7 +79,7 @@ via_ttm_global_init(struct via_device *dev_priv)
return rc;
}
-void
+static void
via_ttm_global_release(struct drm_global_reference *global_ref,
struct ttm_bo_global_ref *global_bo,
struct ttm_bo_device *bdev)
commit 1f02e869b01d1d097c83abb95bc40981b35c8abe
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 20 19:28:33 2017 -0600
Moving via_ttm_global_release around
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/via/via_ttm.c b/drivers/gpu/drm/via/via_ttm.c
index 07cde19..532ed82 100644
--- a/drivers/gpu/drm/via/via_ttm.c
+++ b/drivers/gpu/drm/via/via_ttm.c
@@ -41,23 +41,6 @@ via_ttm_mem_global_release(struct drm_global_reference *ref)
ttm_mem_global_release(ref->object);
}
-void
-via_ttm_global_release(struct drm_global_reference *global_ref,
- struct ttm_bo_global_ref *global_bo,
- struct ttm_bo_device *bdev)
-{
- DRM_DEBUG("Entered via_ttm_global_release.\n");
-
- if (global_ref->release == NULL)
- return;
-
- drm_global_item_unref(&global_bo->ref);
- drm_global_item_unref(global_ref);
- global_ref->release = NULL;
-
- DRM_DEBUG("Exiting via_ttm_global_release.\n");
-}
-
static int
via_ttm_global_init(struct via_device *dev_priv)
{
@@ -96,6 +79,23 @@ via_ttm_global_init(struct via_device *dev_priv)
return rc;
}
+void
+via_ttm_global_release(struct drm_global_reference *global_ref,
+ struct ttm_bo_global_ref *global_bo,
+ struct ttm_bo_device *bdev)
+{
+ DRM_DEBUG("Entered via_ttm_global_release.\n");
+
+ if (global_ref->release == NULL)
+ return;
+
+ drm_global_item_unref(&global_bo->ref);
+ drm_global_item_unref(global_ref);
+ global_ref->release = NULL;
+
+ DRM_DEBUG("Exiting via_ttm_global_release.\n");
+}
+
static void
ttm_buffer_object_destroy(struct ttm_buffer_object *bo)
{
commit 840e74fbaa79158d5acdc03b7ee654e065d70d1c
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 20 19:25:14 2017 -0600
Changing via_ttm_global_mem_release to via_ttm_mem_global_release
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/via/via_ttm.c b/drivers/gpu/drm/via/via_ttm.c
index 251f1ab..07cde19 100644
--- a/drivers/gpu/drm/via/via_ttm.c
+++ b/drivers/gpu/drm/via/via_ttm.c
@@ -36,7 +36,7 @@ via_ttm_mem_global_init(struct drm_global_reference *ref)
}
static void
-via_ttm_global_mem_release(struct drm_global_reference *ref)
+via_ttm_mem_global_release(struct drm_global_reference *ref)
{
ttm_mem_global_release(ref->object);
}
@@ -69,7 +69,7 @@ via_ttm_global_init(struct via_device *dev_priv)
global_ref->global_type = DRM_GLOBAL_TTM_MEM;
global_ref->size = sizeof(struct ttm_mem_global);
global_ref->init = &via_ttm_mem_global_init;
- global_ref->release = &via_ttm_global_mem_release;
+ global_ref->release = &via_ttm_mem_global_release;
rc = drm_global_item_ref(global_ref);
if (unlikely(rc != 0)) {
commit 3cd9aba2e729c3ac17573e7a0daf5c257c115826
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 20 19:23:55 2017 -0600
Changing via_ttm_global_mem_init to via_ttm_mem_global_init
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/via/via_ttm.c b/drivers/gpu/drm/via/via_ttm.c
index 7c95af3..251f1ab 100644
--- a/drivers/gpu/drm/via/via_ttm.c
+++ b/drivers/gpu/drm/via/via_ttm.c
@@ -30,7 +30,7 @@
#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)
static int
-via_ttm_global_mem_init(struct drm_global_reference *ref)
+via_ttm_mem_global_init(struct drm_global_reference *ref)
{
return ttm_mem_global_init(ref->object);
}
@@ -68,7 +68,7 @@ via_ttm_global_init(struct via_device *dev_priv)
global_ref = &dev_priv->mem_global_ref;
global_ref->global_type = DRM_GLOBAL_TTM_MEM;
global_ref->size = sizeof(struct ttm_mem_global);
- global_ref->init = &via_ttm_global_mem_init;
+ global_ref->init = &via_ttm_mem_global_init;
global_ref->release = &via_ttm_global_mem_release;
rc = drm_global_item_ref(global_ref);
commit f012e9df923a80d65f6cacc0043c683d8fc7ecf0
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 20 19:16:17 2017 -0600
Changed ttm_bo_unpin to via_bo_unpin
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/via/via_crtc.c b/drivers/gpu/drm/via/via_crtc.c
index 756d2c6..ef0a729 100644
--- a/drivers/gpu/drm/via/via_crtc.c
+++ b/drivers/gpu/drm/via/via_crtc.c
@@ -447,7 +447,7 @@ via_crtc_destroy(struct drm_crtc *crtc)
struct via_crtc *iga = container_of(crtc, struct via_crtc, base);
if (iga->cursor_kmap.bo) {
- ttm_bo_unpin(iga->cursor_kmap.bo, &iga->cursor_kmap);
+ via_bo_unpin(iga->cursor_kmap.bo, &iga->cursor_kmap);
ttm_bo_unref(&iga->cursor_kmap.bo);
}
drm_crtc_cleanup(crtc);
@@ -1261,7 +1261,7 @@ via_iga1_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
ENTER_ATOMIC_MODE_SET);
if (unlikely(ret)) {
DRM_DEBUG("failed to set new framebuffer\n");
- ttm_bo_unpin(bo, NULL);
+ via_bo_unpin(bo, NULL);
return ret;
}
@@ -1270,7 +1270,7 @@ via_iga1_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
obj = fb->helper_private;
bo = ttm_gem_mapping(obj);
- ret = ttm_bo_unpin(bo, NULL);
+ ret = via_bo_unpin(bo, NULL);
if (unlikely(ret))
DRM_ERROR("framebuffer still locked\n");
}
@@ -1574,7 +1574,7 @@ via_iga2_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
ENTER_ATOMIC_MODE_SET);
if (unlikely(ret)) {
DRM_DEBUG("failed to set new framebuffer\n");
- ttm_bo_unpin(bo, NULL);
+ via_bo_unpin(bo, NULL);
return ret;
}
@@ -1583,7 +1583,7 @@ via_iga2_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
obj = fb->helper_private;
bo = ttm_gem_mapping(obj);
- ret = ttm_bo_unpin(bo, NULL);
+ ret = via_bo_unpin(bo, NULL);
if (unlikely(ret))
DRM_ERROR("framebuffer still locked\n");
}
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
index 74be92e..eb9c21a 100644
--- a/drivers/gpu/drm/via/via_drv.c
+++ b/drivers/gpu/drm/via/via_drv.c
@@ -280,7 +280,7 @@ static int via_driver_unload(struct drm_device *dev)
bo = dev_priv->vq.bo;
if (bo) {
- ttm_bo_unpin(bo, &dev_priv->vq);
+ via_bo_unpin(bo, &dev_priv->vq);
ttm_bo_unref(&bo);
}
@@ -289,13 +289,13 @@ static int via_driver_unload(struct drm_device *dev)
/* enable gtt write */
if (pci_is_pcie(dev->pdev))
svga_wseq_mask(VGABASE, 0x6C, 0, BIT(7));
- ttm_bo_unpin(bo, &dev_priv->gart);
+ via_bo_unpin(bo, &dev_priv->gart);
ttm_bo_unref(&bo);
}
bo = dev_priv->mmio.bo;
if (bo) {
- ttm_bo_unpin(bo, &dev_priv->mmio);
+ via_bo_unpin(bo, &dev_priv->mmio);
ttm_bo_unref(&bo);
}
diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 7017acc..989d556 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -253,7 +253,7 @@ extern int via_bo_create(struct ttm_bo_device *bdev, unsigned long size,
struct reservation_object *resv,
struct ttm_buffer_object **p_bo);
extern int via_bo_pin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj *kmap);
-extern int ttm_bo_unpin(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_mmap(struct file *filp, struct vm_area_struct *vma);
diff --git a/drivers/gpu/drm/via/via_fb.c b/drivers/gpu/drm/via/via_fb.c
index 0681330..ae93b8b 100644
--- a/drivers/gpu/drm/via/via_fb.c
+++ b/drivers/gpu/drm/via/via_fb.c
@@ -1064,7 +1064,7 @@ via_fb_probe(struct drm_fb_helper *helper,
out_err:
if (ret < 0) {
if (kmap->bo) {
- ttm_bo_unpin(kmap->bo, kmap);
+ via_bo_unpin(kmap->bo, kmap);
ttm_bo_unref(&kmap->bo);
}
@@ -1249,7 +1249,7 @@ via_framebuffer_fini(struct drm_device *dev)
ttmfb = container_of(helper, struct ttm_fb_helper, base);
if (ttmfb->kmap.bo) {
- ttm_bo_unpin(ttmfb->kmap.bo, &ttmfb->kmap);
+ via_bo_unpin(ttmfb->kmap.bo, &ttmfb->kmap);
ttm_bo_unref(&ttmfb->kmap.bo);
}
diff --git a/drivers/gpu/drm/via/via_fence.c b/drivers/gpu/drm/via/via_fence.c
index af8258f..379e3ce 100644
--- a/drivers/gpu/drm/via/via_fence.c
+++ b/drivers/gpu/drm/via/via_fence.c
@@ -271,7 +271,7 @@ via_fence_pool_fini(struct via_fence_pool *pool)
sync_bo = pool->fence_sync.bo;
if (sync_bo) {
- ttm_bo_unpin(sync_bo, &pool->fence_sync);
+ via_bo_unpin(sync_bo, &pool->fence_sync);
ttm_bo_unref(&sync_bo);
}
diff --git a/drivers/gpu/drm/via/via_h1_cmdbuf.c b/drivers/gpu/drm/via/via_h1_cmdbuf.c
index 43cd4b9..fbd211b 100644
--- a/drivers/gpu/drm/via/via_h1_cmdbuf.c
+++ b/drivers/gpu/drm/via/via_h1_cmdbuf.c
@@ -134,7 +134,7 @@ int via_dma_cleanup(struct drm_device *dev)
via_cmdbuf_reset(dev_priv);
- ttm_bo_unpin(bo, &dev_priv->dmabuf);
+ via_bo_unpin(bo, &dev_priv->dmabuf);
ttm_bo_unref(&bo);
dev_priv->dmabuf.virtual = NULL;
}
diff --git a/drivers/gpu/drm/via/via_ttm.c b/drivers/gpu/drm/via/via_ttm.c
index e3184cb..7c95af3 100644
--- a/drivers/gpu/drm/via/via_ttm.c
+++ b/drivers/gpu/drm/via/via_ttm.c
@@ -710,7 +710,7 @@ via_bo_pin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj *kmap)
}
int
-ttm_bo_unpin(struct ttm_buffer_object *bo, struct ttm_bo_kmap_obj *kmap)
+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_placement placement;
More information about the Openchrome-devel
mailing list