Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm drm_mm: Match __drm_mm_interv...
details: https://anonhg.NetBSD.org/src/rev/ebbdebff67fd
branches: trunk
changeset: 369781:ebbdebff67fd
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Sep 01 01:54:28 2022 +0000
description:
drm_mm: Match __drm_mm_interval_first semantics.
- Use the right search criterion.
- Return &mm->head_node, not NULL, if not found.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_mm.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 797c1fb133d1 -r ebbdebff67fd sys/external/bsd/drm2/dist/drm/drm_mm.c
--- a/sys/external/bsd/drm2/dist/drm/drm_mm.c Wed Aug 31 14:00:44 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_mm.c Thu Sep 01 01:54:28 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_mm.c,v 1.18 2022/02/14 13:22:30 riastradh Exp $ */
+/* $NetBSD: drm_mm.c,v 1.19 2022/09/01 01:54:28 riastradh Exp $ */
/**************************************************************************
*
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_mm.c,v 1.18 2022/02/14 13:22:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_mm.c,v 1.19 2022/09/01 01:54:28 riastradh Exp $");
#include <linux/export.h>
#include <linux/interval_tree_generic.h>
@@ -170,10 +170,10 @@
#ifdef __NetBSD__
struct drm_mm_node *node;
list_for_each_entry(node, &mm->head_node.node_list, node_list) {
- if (node->start <= start)
+ if (start <= LAST(node) && START(node) <= last)
return node;
}
- return NULL;
+ return &mm->head_node;
#else
return drm_mm_interval_tree_iter_first((struct rb_root_cached *)&mm->interval_tree,
start, last) ?: (struct drm_mm_node *)&mm->head_node;
Home |
Main Index |
Thread Index |
Old Index