Skip to contentSkip to conversation

drm/nouveau: stop using persistent_swap_storage

PATCH In review Christian König 2 participants 4 messages Sep 17, 2020 – Sep 24, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/nouveau: stop using persistent_swap_storage

According to Ben this is most likely just a leftover.

---
 drivers/gpu/drm/nouveau/nouveau_gem.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +0 -1
index 89adadf4706b..5945c663381d 100644
@@ -209,7 +209,6 @@ nouveau_gem_new(struct nouveau_cli *cli, u64 size, int align, uint32_t domain,
 	if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA)
 		nvbo->valid_domains &= domain;
 
-	nvbo->bo.persistent_swap_storage = nvbo->bo.base.filp;
 	*pnvbo = nvbo;
 	return 0;
 }
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 drm/ttm: remove persistent_swap_storage

Not used any more. Cleanup the code as well while at it.

---
 drivers/gpu/drm/ttm/ttm_bo.c |  2 +-
 drivers/gpu/drm/ttm/ttm_tt.c | 61 ++++++++++++++++--------------------
 include/drm/ttm/ttm_bo_api.h |  4 ---
 include/drm/ttm/ttm_tt.h     |  3 +-
 4 files changed, 29 insertions(+), 41 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +1 -1
index 92d60585deb1..1441bc86ac1c 100644
@@ -1588,7 +1588,7 @@ int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx)
 	if (bo->bdev->driver->swap_notify)
 		bo->bdev->driver->swap_notify(bo);
 
-	ret = ttm_tt_swapout(bo->bdev, bo->ttm, bo->persistent_swap_storage);
+	ret = ttm_tt_swapout(bo->bdev, bo->ttm);
 out:
 
 	/**
drivers/gpu/drm/ttm/ttm_tt.c +27 -34

121 lines not on this page · raw message

include/drm/ttm/ttm_bo_api.h +0 -4
index 89ad6f213fc0..6f9ff8a436a5 100644
@@ -90,9 +90,6 @@ struct ttm_tt;
  * @kref: Reference count of this buffer object. When this refcount reaches
  * zero, the object is destroyed or put on the delayed delete list.
  * @mem: structure describing current placement.
- * @persistent_swap_storage: Usually the swap storage is deleted for buffers
- * pinned in physical memory. If this behaviour is not desired, this member
- * holds a pointer to a persistent shmem object.
  * @ttm: TTM structure holding system pages.
  * @evicted: Whether the object was evicted without user-space knowing.
  * @deleted: True if the object is only a zombie and already deleted.
@@ -139,7 +136,6 @@ struct ttm_buffer_object {
 	 */
 
 	struct ttm_resource mem;
-	struct file *persistent_swap_storage;
 	struct ttm_tt *ttm;
 	bool ttm_bound;
 	bool evicted;
include/drm/ttm/ttm_tt.h +1 -2
index c777b72063db..cd3cbeb7ce90 100644
@@ -36,7 +36,6 @@ struct ttm_operation_ctx;
 
 #define TTM_PAGE_FLAG_WRITE           (1 << 3)
 #define TTM_PAGE_FLAG_SWAPPED         (1 << 4)
-#define TTM_PAGE_FLAG_PERSISTENT_SWAP (1 << 5)
 #define TTM_PAGE_FLAG_ZERO_ALLOC      (1 << 6)
 #define TTM_PAGE_FLAG_DMA32           (1 << 7)
 #define TTM_PAGE_FLAG_SG              (1 << 8)
@@ -178,7 +177,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm);
  * and cache flushes and potential page splitting / combining.
  */
 int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement);
-int ttm_tt_swapout(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct file *persistent_swap_storage);
+int ttm_tt_swapout(struct ttm_bo_device *bdev, struct ttm_tt *ttm);
 
 /**
  * ttm_tt_populate - allocate pages for a ttm
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
In reply to Christian König

Ping? Ben, Dave any comment on this?

Am 17.09.20 um 16:29 schrieb Christian König:

Quoted 12 lines

According to Ben this is most likely just a leftover.

---
  drivers/gpu/drm/nouveau/nouveau_gem.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +0 -0
index 89adadf4706b..5945c663381d 100644

drivers/gpu/drm/nouveau/nouveau_gem.c nouveau_gem_new(struct nouveau_cli *cli, u64 size, int align, uint32_t domain, · line 214

Quoted 7 lines
drivers/gpu/drm/nouveau/nouveau_gem.c +0 -1
@@ -209,7 +209,6 @@ nouveau_gem_new(struct nouveau_cli *cli, u64 size, int align, uint32_t domain,
  	if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA)
  		nvbo->valid_domains &= domain;
 
-	nvbo->bo.persistent_swap_storage = nvbo->bo.base.filp;
  	*pnvbo = nvbo;
  	return 0;
  }

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

maintainer Reviewed-by
#3 lore raw

For both patches.

Quoted 19 lines · Christian König

Ping? Ben, Dave any comment on this?

Am 17.09.20 um 16:29 schrieb Christian König:

Quoted 15 lines

According to Ben this is most likely just a leftover.

---
  drivers/gpu/drm/nouveau/nouveau_gem.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +0 -0
index 89adadf4706b..5945c663381d 100644
@@ -209,7 +209,6 @@ nouveau_gem_new(struct nouveau_cli *cli, u64 size, int align, uint32_t domain,
      if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA)
              nvbo->valid_domains &= domain;
 
Quoted 9 lines

drivers/gpu/drm/nouveau/nouveau_gem.c nouveau_gem_new(struct nouveau_cli *cli, u64 size, int align, uint32_t domain, · line 214

Quoted 4 lines
drivers/gpu/drm/nouveau/nouveau_gem.c +0 -1
-     nvbo->bo.persistent_swap_storage = nvbo->bo.base.filp;
      *pnvbo = nvbo;
      return 0;
  }

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel