The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment
@ 2026-06-08 22:33 Adrián Larumbe
  2026-06-08 22:33 ` [PATCH v2 1/2] drm/gpuvm: Remove dead code Adrián Larumbe
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adrián Larumbe @ 2026-06-08 22:33 UTC (permalink / raw)
  To: Danilo Krummrich, Matthew Brost, Thomas Hellström,
	Alice Ryhl, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter
  Cc: Adrián Larumbe, dri-devel, linux-kernel, kernel

Just some small fixes I made when reading drm_gpuvm.c.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
---
Changes in v2:
- Deleted even more dead code.
- Link to v1: https://patch.msgid.link/20260508135814.3296874-1-adrian.larumbe@collabora.com

To: Danilo Krummrich <dakr@kernel.org>
To: Matthew Brost <matthew.brost@intel.com>
To: Thomas Hellström <thomas.hellstrom@linux.intel.com>
To: Alice Ryhl <aliceryhl@google.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: kernel@collabora.com

---
Adrián Larumbe (2):
      drm/gpuvm: Remove dead code
      drm/gpuvm: Fix comment to reflect remap operation operand status

 drivers/gpu/drm/drm_gpuvm.c | 44 --------------------------------------------
 include/drm/drm_gpuvm.h     |  4 ++--
 2 files changed, 2 insertions(+), 46 deletions(-)
---
base-commit: 6e7eb171ac96fefa32197afa658e7d9da238be89
change-id: 20260608-gpuvm-minor-fixes-6e508ada923a

Best regards,
--  
Adrián Larumbe <adrian.larumbe@collabora.com>


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

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

drm_gpuva_find_{prev|next}() have no consumers.

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

diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c
index 078cbc0235a4..bb2847897527 100644
--- a/drivers/gpu/drm/drm_gpuvm.c
+++ b/drivers/gpu/drm/drm_gpuvm.c
@@ -2225,50 +2225,6 @@ drm_gpuva_find(struct drm_gpuvm *gpuvm,
 }
 EXPORT_SYMBOL_GPL(drm_gpuva_find);
 
-/**
- * drm_gpuva_find_prev() - find the &drm_gpuva before the given address
- * @gpuvm: the &drm_gpuvm to search in
- * @start: the given GPU VA's start address
- *
- * Find the adjacent &drm_gpuva before the GPU VA with given &start 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_prev(struct drm_gpuvm *gpuvm, u64 start)
-{
-	if (!drm_gpuvm_range_valid(gpuvm, start - 1, 1))
-		return NULL;
-
-	return drm_gpuva_it_iter_first(&gpuvm->rb.tree, start - 1, 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..f8fc0296c4b7 100644
--- a/include/drm/drm_gpuvm.h
+++ b/include/drm/drm_gpuvm.h
@@ -159,8 +159,6 @@ struct drm_gpuva *drm_gpuva_find(struct drm_gpuvm *gpuvm,
 				 u64 addr, u64 range);
 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

-- 
2.53.0


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

* [PATCH v2 2/2] drm/gpuvm: Fix comment to reflect remap operation operand status
  2026-06-08 22:33 [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment Adrián Larumbe
  2026-06-08 22:33 ` [PATCH v2 1/2] drm/gpuvm: Remove dead code Adrián Larumbe
@ 2026-06-08 22:33 ` Adrián Larumbe
  2026-07-03 21:36 ` [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment Danilo Krummrich
  2 siblings, 0 replies; 4+ messages in thread
From: Adrián Larumbe @ 2026-06-08 22:33 UTC (permalink / raw)
  To: Danilo Krummrich, Matthew Brost, Thomas Hellström,
	Alice Ryhl, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter
  Cc: Adrián Larumbe, dri-devel, linux-kernel, 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 f8fc0296c4b7..38221d83285b 100644
--- a/include/drm/drm_gpuvm.h
+++ b/include/drm/drm_gpuvm.h
@@ -928,6 +928,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 related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment
  2026-06-08 22:33 [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment Adrián Larumbe
  2026-06-08 22:33 ` [PATCH v2 1/2] drm/gpuvm: Remove dead code Adrián Larumbe
  2026-06-08 22:33 ` [PATCH v2 2/2] drm/gpuvm: Fix comment to reflect remap operation operand status Adrián Larumbe
@ 2026-07-03 21:36 ` Danilo Krummrich
  2 siblings, 0 replies; 4+ messages in thread
From: Danilo Krummrich @ 2026-07-03 21:36 UTC (permalink / raw)
  To: Adrián Larumbe
  Cc: Danilo Krummrich, Matthew Brost, Thomas Hellström,
	Alice Ryhl, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, dri-devel, linux-kernel, kernel

On Mon, 08 Jun 2026 23:33:51 +0100, Adrián Larumbe wrote:
> [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment

Applied, thanks!

  Branch: drm-misc-next
  Tree:   https://gitlab.freedesktop.org/drm/misc/kernel.git

[1/2] drm/gpuvm: Remove dead code
      commit: c4c4434e41e5
[2/2] drm/gpuvm: Fix comment to reflect remap operation operand status
      commit: 49d0307c55c4

The patches will appear in the next linux-next integration (typically within 24
hours on weekdays).

The patches are queued up for the upcoming merge window for the next major
kernel release.

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

end of thread, other threads:[~2026-07-03 21:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08 22:33 [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment Adrián Larumbe
2026-06-08 22:33 ` [PATCH v2 1/2] drm/gpuvm: Remove dead code Adrián Larumbe
2026-06-08 22:33 ` [PATCH v2 2/2] drm/gpuvm: Fix comment to reflect remap operation operand status Adrián Larumbe
2026-07-03 21:36 ` [PATCH v2 0/2] drm/gpuvm: Delete some dead code and fix a comment Danilo Krummrich

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