[Openchrome-devel] drm-openchrome: Branch 'drm-next-4.13' - drivers/gpu/drm
Kevin Brace
kevinbrace at kemper.freedesktop.org
Sat Aug 19 02:53:56 UTC 2017
drivers/gpu/drm/openchrome/ttm_gem.c | 18 +++++++++---------
drivers/gpu/drm/openchrome/via_drv.c | 6 +++---
drivers/gpu/drm/openchrome/via_drv.h | 10 +++++-----
drivers/gpu/drm/openchrome/via_fb.c | 4 ++--
drivers/gpu/drm/openchrome/via_ioc32.c | 6 +++---
5 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit db56218c2104c5aad26f1f1a44b84642e09994c9
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Aug 18 19:53:36 2017 -0700
Adjust ttm_gem_create input parameter list
Renaming and changing the order to make it similar to ttm_bo_init.
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 deab55dcdd45..971fadc1435e 100644
--- a/drivers/gpu/drm/openchrome/ttm_gem.c
+++ b/drivers/gpu/drm/openchrome/ttm_gem.c
@@ -81,22 +81,22 @@ int ttm_mmap(struct file *filp, struct vm_area_struct *vma)
struct drm_gem_object *
ttm_gem_create(struct drm_device *dev,
struct ttm_bo_device *bdev,
- enum ttm_bo_type origin,
+ unsigned long size,
+ enum ttm_bo_type type,
uint32_t domains,
- bool interruptible,
- int byte_align,
- int page_align,
- unsigned long size)
+ uint32_t byte_alignment,
+ uint32_t page_alignment,
+ bool interruptible)
{
struct ttm_buffer_object *bo = NULL;
struct ttm_gem_object *obj;
int ret;
- size = round_up(size, byte_align);
- size = ALIGN(size, page_align);
+ size = round_up(size, byte_alignment);
+ size = ALIGN(size, page_alignment);
- ret = via_bo_create(bdev, &bo, size, origin, domains,
- byte_align, page_align,
+ ret = via_bo_create(bdev, &bo, size, type, domains,
+ byte_alignment, page_alignment,
interruptible, NULL, NULL);
if (ret) {
DRM_ERROR("Failed to create buffer object\n");
diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c
index 2751aa8570f4..58cdd9f7e38c 100644
--- a/drivers/gpu/drm/openchrome/via_drv.c
+++ b/drivers/gpu/drm/openchrome/via_drv.c
@@ -199,9 +199,9 @@ static int via_dumb_create(struct drm_file *filp, struct drm_device *dev,
args->pitch = round_up(args->width * (args->bpp >> 3), 16);
args->size = args->pitch * args->height;
- obj = ttm_gem_create(dev, &dev_priv->bdev, ttm_bo_type_device,
- TTM_PL_FLAG_VRAM, false, 16, PAGE_SIZE,
- args->size);
+ obj = ttm_gem_create(dev, &dev_priv->bdev, args->size,
+ ttm_bo_type_device, TTM_PL_FLAG_VRAM,
+ 16, PAGE_SIZE, false);
if (IS_ERR(obj))
return PTR_ERR(obj);
diff --git a/drivers/gpu/drm/openchrome/via_drv.h b/drivers/gpu/drm/openchrome/via_drv.h
index 210ca1eda835..0ae0be53f822 100644
--- a/drivers/gpu/drm/openchrome/via_drv.h
+++ b/drivers/gpu/drm/openchrome/via_drv.h
@@ -281,12 +281,12 @@ extern void ttm_gem_free_object(struct drm_gem_object *obj);
extern struct drm_gem_object *
ttm_gem_create(struct drm_device *dev,
struct ttm_bo_device *bdev,
- enum ttm_bo_type origin,
+ unsigned long size,
+ enum ttm_bo_type type,
uint32_t domains,
- bool interruptible,
- int byte_align,
- int page_align,
- unsigned long size);
+ uint32_t byte_alignment,
+ uint32_t page_alignment,
+ bool interruptible);
extern struct ttm_buffer_object *ttm_gem_mapping(struct drm_gem_object *obj);
extern struct ttm_tt *
diff --git a/drivers/gpu/drm/openchrome/via_fb.c b/drivers/gpu/drm/openchrome/via_fb.c
index 9afbfea93370..6414bd25b924 100644
--- a/drivers/gpu/drm/openchrome/via_fb.c
+++ b/drivers/gpu/drm/openchrome/via_fb.c
@@ -1074,9 +1074,9 @@ via_fb_probe(struct drm_fb_helper *helper,
size = mode_cmd.pitches[0] * mode_cmd.height;
size = ALIGN(size, PAGE_SIZE);
- gem_obj = ttm_gem_create(helper->dev, &dev_priv->bdev,
+ gem_obj = ttm_gem_create(dev, &dev_priv->bdev, size,
ttm_bo_type_kernel, TTM_PL_FLAG_VRAM,
- false, 1, PAGE_SIZE, size);
+ 1, PAGE_SIZE, false);
if (unlikely(IS_ERR(gem_obj))) {
ret = PTR_ERR(gem_obj);
goto out_err;
diff --git a/drivers/gpu/drm/openchrome/via_ioc32.c b/drivers/gpu/drm/openchrome/via_ioc32.c
index 027f99e17827..d0ffda66c8e9 100644
--- a/drivers/gpu/drm/openchrome/via_ioc32.c
+++ b/drivers/gpu/drm/openchrome/via_ioc32.c
@@ -66,9 +66,9 @@ via_gem_alloc(struct drm_device *dev, void *data,
struct drm_gem_object *obj;
int ret = -ENOMEM;
- obj = ttm_gem_create(dev, &dev_priv->bdev, ttm_bo_type_device,
- args->domains, false, args->alignment,
- PAGE_SIZE, args->size);
+ obj = ttm_gem_create(dev, &dev_priv->bdev, args->size,
+ ttm_bo_type_device, args->domains,
+ args->alignment, PAGE_SIZE, false);
if (obj != NULL) {
ret = drm_gem_handle_create(filp, obj, &args->handle);
/* drop reference from allocate - handle holds it now */
More information about the Openchrome-devel
mailing list