drm/vram-helper: Remove interruptible flag from public interface
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 6 Jan 2020 12:57:43 +0000 (13:57 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 7 Jan 2020 10:53:19 +0000 (11:53 +0100)
The flag 'interruptible', which is passed to various functions,
is always set to be false. Remove it and hard-code the value.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200106125745.13797-7-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_mode.c
drivers/gpu/drm/drm_gem_vram_helper.c
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
drivers/gpu/drm/mgag200/mgag200_cursor.c
drivers/gpu/drm/mgag200/mgag200_drv.c
include/drm/drm_gem_vram_helper.h

index cde1cae073ece76a8493314763bf476bb78b1566..43572eb11ae9d28c17660f008064ec2102bf7269 100644 (file)
@@ -1145,7 +1145,7 @@ static int ast_cursor_init(struct drm_device *dev)
 
        for (i = 0; i < ARRAY_SIZE(ast->cursor.gbo); ++i) {
                gbo = drm_gem_vram_create(dev, &dev->vram_mm->bdev,
-                                         size, 0, false);
+                                         size, 0);
                if (IS_ERR(gbo)) {
                        ret = PTR_ERR(gbo);
                        goto err_drm_gem_vram_put;
index 51ee1f7bc7303a0ea59cf2b40ff1533489ee9714..bc181c0e944060e95c0d3bb4cb208d43a0dc2f84 100644 (file)
@@ -94,8 +94,7 @@ static void drm_gem_vram_placement(struct drm_gem_vram_object *gbo,
 static int drm_gem_vram_init(struct drm_device *dev,
                             struct ttm_bo_device *bdev,
                             struct drm_gem_vram_object *gbo,
-                            size_t size, unsigned long pg_align,
-                            bool interruptible)
+                            size_t size, unsigned long pg_align)
 {
        int ret;
        size_t acc_size;
@@ -112,7 +111,7 @@ static int drm_gem_vram_init(struct drm_device *dev,
        drm_gem_vram_placement(gbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM);
 
        ret = ttm_bo_init(bdev, &gbo->bo, size, ttm_bo_type_device,
-                         &gbo->placement, pg_align, interruptible, acc_size,
+                         &gbo->placement, pg_align, false, acc_size,
                          NULL, NULL, ttm_buffer_object_destroy);
        if (ret)
                goto err_drm_gem_object_release;
@@ -130,7 +129,6 @@ err_drm_gem_object_release:
  * @bdev:              the TTM BO device backing the object
  * @size:              the buffer size in bytes
  * @pg_align:          the buffer's alignment in multiples of the page size
- * @interruptible:     sleep interruptible if waiting for memory
  *
  * Returns:
  * A new instance of &struct drm_gem_vram_object on success, or
@@ -139,8 +137,7 @@ err_drm_gem_object_release:
 struct drm_gem_vram_object *drm_gem_vram_create(struct drm_device *dev,
                                                struct ttm_bo_device *bdev,
                                                size_t size,
-                                               unsigned long pg_align,
-                                               bool interruptible)
+                                               unsigned long pg_align)
 {
        struct drm_gem_vram_object *gbo;
        int ret;
@@ -149,7 +146,7 @@ struct drm_gem_vram_object *drm_gem_vram_create(struct drm_device *dev,
        if (!gbo)
                return ERR_PTR(-ENOMEM);
 
-       ret = drm_gem_vram_init(dev, bdev, gbo, size, pg_align, interruptible);
+       ret = drm_gem_vram_init(dev, bdev, gbo, size, pg_align);
        if (ret < 0)
                goto err_kfree;
 
@@ -486,7 +483,6 @@ EXPORT_SYMBOL(drm_gem_vram_vunmap);
  * @bdev:              the TTM BO device managing the buffer object
  * @pg_align:          the buffer's alignment in multiples of the page size
  * @pitch_align:       the scanline's alignment in powers of 2
- * @interruptible:     sleep interruptible if waiting for memory
  * @args:              the arguments as provided to \
                                &struct drm_driver.dumb_create
  *
@@ -504,7 +500,6 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file,
                                  struct ttm_bo_device *bdev,
                                  unsigned long pg_align,
                                  unsigned long pitch_align,
-                                 bool interruptible,
                                  struct drm_mode_create_dumb *args)
 {
        size_t pitch, size;
@@ -524,7 +519,7 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file,
        if (!size)
                return -EINVAL;
 
-       gbo = drm_gem_vram_create(dev, bdev, size, pg_align, interruptible);
+       gbo = drm_gem_vram_create(dev, bdev, size, pg_align);
        if (IS_ERR(gbo))
                return PTR_ERR(gbo);
 
@@ -620,7 +615,7 @@ int drm_gem_vram_driver_dumb_create(struct drm_file *file,
                return -EINVAL;
 
        return drm_gem_vram_fill_create_dumb(file, dev, &dev->vram_mm->bdev,
-                                            0, 0, false, args);
+                                            0, 0, args);
 }
 EXPORT_SYMBOL(drm_gem_vram_driver_dumb_create);
 
index 0af5d966a480602e6eb7783861a9b817fb40f56b..2f668b71fb4ce2e56afa5fee68c6c6534cb7e2c2 100644 (file)
@@ -51,7 +51,7 @@ int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
                      struct drm_mode_create_dumb *args)
 {
        return drm_gem_vram_fill_create_dumb(file, dev, &dev->vram_mm->bdev,
-                                            0, 16, false, args);
+                                            0, 16, args);
 }
 
 const struct drm_mode_config_funcs hibmc_mode_funcs = {
index 5444cf1573a3d5e531f2b4ef977874cd93e7fa56..dd54fd507e13bd818115b3ab6f69feea6d6753b2 100644 (file)
@@ -209,7 +209,7 @@ int mgag200_cursor_init(struct mga_device *mdev)
 
        for (i = 0; i < ncursors; ++i) {
                gbo = drm_gem_vram_create(dev, &dev->vram_mm->bdev,
-                                         size, 0, false);
+                                         size, 0);
                if (IS_ERR(gbo)) {
                        ret = PTR_ERR(gbo);
                        goto err_drm_gem_vram_put;
index 3473e9e9a20d0adbc243d9075eb8e66fe35b794d..613fdc2b4b1edb2b023fa1ecbaba315de97c3aff 100644 (file)
@@ -121,7 +121,7 @@ int mgag200_driver_dumb_create(struct drm_file *file,
                pg_align = PFN_UP(mdev->mc.vram_size);
 
        return drm_gem_vram_fill_create_dumb(file, dev, &dev->vram_mm->bdev,
-                                            pg_align, 0, false, args);
+                                            pg_align, 0, args);
 }
 
 static struct drm_driver driver = {
index b86d038f8a3dfdeff6b432520c2b9bbb2ae2b7c2..219474c7d584aa252c613f9c0c49969b9b6e33e3 100644 (file)
@@ -95,8 +95,7 @@ static inline struct drm_gem_vram_object *drm_gem_vram_of_gem(
 struct drm_gem_vram_object *drm_gem_vram_create(struct drm_device *dev,
                                                struct ttm_bo_device *bdev,
                                                size_t size,
-                                               unsigned long pg_align,
-                                               bool interruptible);
+                                               unsigned long pg_align);
 void drm_gem_vram_put(struct drm_gem_vram_object *gbo);
 u64 drm_gem_vram_mmap_offset(struct drm_gem_vram_object *gbo);
 s64 drm_gem_vram_offset(struct drm_gem_vram_object *gbo);
@@ -113,7 +112,6 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file,
                                  struct ttm_bo_device *bdev,
                                  unsigned long pg_align,
                                  unsigned long pitch_align,
-                                 bool interruptible,
                                  struct drm_mode_create_dumb *args);
 
 /*