mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/gpuvm: Remove dead code
@ 2026-05-08 13:58 Adrián Larumbe
  2026-05-08 13:58 ` [PATCH 2/2] drm/gpuvm: Fix comment to reflect remap operation operand status Adrián Larumbe
  0 siblings, 1 reply; 2+ messages in thread
From: Adrián Larumbe @ 2026-05-08 13:58 UTC (permalink / raw)
  To: Danilo Krummrich, Matthew Brost, Thomas Hellström,
	Alice Ryhl, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter
  Cc: kernel, Adrián Larumbe, dri-devel, linux-kernel

drm_gpuva_find_next() has no consumers.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
---
 drivers/gpu/drm/drm_gpuvm.c | 22 ----------------------
 include/drm/drm_gpuvm.h     |  1 -
 2 files changed, 23 deletions(-)

diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c
index f56719e9f435..f4eb23e2e8d3 100644
--- a/drivers/gpu/drm/drm_gpuvm.c
+++ b/drivers/gpu/drm/drm_gpuvm.c
@@ -2248,28 +2248,6 @@ drm_gpuva_find_prev(struct drm_gpuvm *gpuvm, u64 start)
 }
 EXPORT_SYMBOL_GPL(drm_gpuva_find_prev);
 
-/**
- * drm_gpuva_find_next() - find the &drm_gpuva after the given address
- * @gpuvm: the &drm_gpuvm to search in
- * @end: the given GPU VA's end address
- *
- * Find the adjacent &drm_gpuva after the GPU VA with given &end address.
- *
- * Note that if there is any free space between the GPU VA mappings no mapping
- * is returned.
- *
- * Returns: a pointer to the found &drm_gpuva or NULL if none was found
- */
-struct drm_gpuva *
-drm_gpuva_find_next(struct drm_gpuvm *gpuvm, u64 end)
-{
-	if (!drm_gpuvm_range_valid(gpuvm, end, 1))
-		return NULL;
-
-	return drm_gpuva_it_iter_first(&gpuvm->rb.tree, end, end + 1);
-}
-EXPORT_SYMBOL_GPL(drm_gpuva_find_next);
-
 /**
  * drm_gpuvm_interval_empty() - indicate whether a given interval of the VA space
  * is empty
diff --git a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h
index 655bd9104ffb..625958fce7fd 100644
--- a/include/drm/drm_gpuvm.h
+++ b/include/drm/drm_gpuvm.h
@@ -160,7 +160,6 @@ struct drm_gpuva *drm_gpuva_find(struct drm_gpuvm *gpuvm,
 struct drm_gpuva *drm_gpuva_find_first(struct drm_gpuvm *gpuvm,
 				       u64 addr, u64 range);
 struct drm_gpuva *drm_gpuva_find_prev(struct drm_gpuvm *gpuvm, u64 start);
-struct drm_gpuva *drm_gpuva_find_next(struct drm_gpuvm *gpuvm, u64 end);
 
 /**
  * drm_gpuva_invalidate() - sets whether the backing GEM of this &drm_gpuva is

base-commit: c2738d88b624a977e42a1734fad4b15993ac354a
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] drm/gpuvm: Fix comment to reflect remap operation operand status
  2026-05-08 13:58 [PATCH 1/2] drm/gpuvm: Remove dead code Adrián Larumbe
@ 2026-05-08 13:58 ` Adrián Larumbe
  0 siblings, 0 replies; 2+ messages in thread
From: Adrián Larumbe @ 2026-05-08 13:58 UTC (permalink / raw)
  To: Danilo Krummrich, Matthew Brost, Thomas Hellström,
	Alice Ryhl, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter
  Cc: kernel, Adrián Larumbe, dri-devel, linux-kernel

When a new mapping intersects with an existing GPU VA, but either
end lies before or beyond the existing VA's edges, then the prev
and next mapping operations part of a remap will reflect this
condition by being set to NULL.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
---
 include/drm/drm_gpuvm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h
index 625958fce7fd..4836ef9cc25f 100644
--- a/include/drm/drm_gpuvm.h
+++ b/include/drm/drm_gpuvm.h
@@ -929,6 +929,8 @@ struct drm_gpuva_op_unmap {
  * If either a new mapping's start address is aligned with the start address
  * of the old mapping or the new mapping's end address is aligned with the
  * end address of the old mapping, either @prev or @next is NULL.
+ * This will also be the case when the requested mapping begins before the
+ * old mapping's start address or stretches beyond its end address.
  *
  * Note, the reason for a dedicated remap operation, rather than arbitrary
  * unmap and map operations, is to give drivers the chance of extracting driver
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-08 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-08 13:58 [PATCH 1/2] drm/gpuvm: Remove dead code Adrián Larumbe
2026-05-08 13:58 ` [PATCH 2/2] drm/gpuvm: Fix comment to reflect remap operation operand status Adrián Larumbe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®