All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/mm: remove unused rb_hole_size()
@ 2020-06-15 14:54 ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-06-15 14:54 UTC (permalink / raw)
  To: chris, intel-gfx, nirmoy.das, dri-devel

Just some code cleanup.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/drm_mm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 82d2888eb7fe..425fcd3590e8 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -305,11 +305,6 @@ static inline struct drm_mm_node *rb_hole_addr_to_node(struct rb_node *rb)
 	return rb_entry_safe(rb, struct drm_mm_node, rb_hole_addr);
 }
 
-static inline u64 rb_hole_size(struct rb_node *rb)
-{
-	return rb_entry(rb, struct drm_mm_node, rb_hole_size)->hole_size;
-}
-
 static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
 {
 	struct rb_node *rb = mm->holes_size.rb_root.rb_node;
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Intel-gfx] [PATCH 1/3] drm/mm: remove unused rb_hole_size()
@ 2020-06-15 14:54 ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-06-15 14:54 UTC (permalink / raw)
  To: chris, intel-gfx, nirmoy.das, dri-devel

Just some code cleanup.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/drm_mm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 82d2888eb7fe..425fcd3590e8 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -305,11 +305,6 @@ static inline struct drm_mm_node *rb_hole_addr_to_node(struct rb_node *rb)
 	return rb_entry_safe(rb, struct drm_mm_node, rb_hole_addr);
 }
 
-static inline u64 rb_hole_size(struct rb_node *rb)
-{
-	return rb_entry(rb, struct drm_mm_node, rb_hole_size)->hole_size;
-}
-
 static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
 {
 	struct rb_node *rb = mm->holes_size.rb_root.rb_node;
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 2/3] drm/mm: optimize find_hole() as well
  2020-06-15 14:54 ` [Intel-gfx] " Christian König
@ 2020-06-15 14:54   ` Christian König
  -1 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-06-15 14:54 UTC (permalink / raw)
  To: chris, intel-gfx, nirmoy.das, dri-devel

Abort early if there isn't enough space to allocate from a subtree.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/drm_mm.c                | 11 +++++++----
 drivers/gpu/drm/selftests/test-drm_mm.c | 11 -----------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 425fcd3590e8..177a5df0fe95 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -325,7 +325,7 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
 	return best;
 }
 
-static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
+static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
 {
 	struct rb_node *rb = mm->holes_addr.rb_node;
 	struct drm_mm_node *node = NULL;
@@ -333,6 +333,9 @@ static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
 	while (rb) {
 		u64 hole_start;
 
+		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
+			break;
+
 		node = rb_hole_addr_to_node(rb);
 		hole_start = __drm_mm_hole_node_start(node);
 
@@ -358,10 +361,10 @@ first_hole(struct drm_mm *mm,
 		return best_hole(mm, size);
 
 	case DRM_MM_INSERT_LOW:
-		return find_hole(mm, start);
+		return find_hole_addr(mm, start, size);
 
 	case DRM_MM_INSERT_HIGH:
-		return find_hole(mm, end);
+		return find_hole_addr(mm, end, size);
 
 	case DRM_MM_INSERT_EVICT:
 		return list_first_entry_or_null(&mm->hole_stack,
@@ -497,7 +500,7 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
 		return -ENOSPC;
 
 	/* Find the relevant hole to add our node to */
-	hole = find_hole(mm, node->start);
+	hole = find_hole_addr(mm, node->start, 0);
 	if (!hole)
 		return -ENOSPC;
 
diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
index ca5f35def905..b879aedfc00d 100644
--- a/drivers/gpu/drm/selftests/test-drm_mm.c
+++ b/drivers/gpu/drm/selftests/test-drm_mm.c
@@ -1981,16 +1981,6 @@ static int __igt_once(unsigned int mode)
 	}
 
 	memset(&node, 0, sizeof(node));
-	err = drm_mm_insert_node_generic(&mm, &node,
-					 2, 0, 0,
-					 mode | DRM_MM_INSERT_ONCE);
-	if (!err) {
-		pr_err("Unexpectedly inserted the node into the wrong hole: node.start=%llx\n",
-		       node.start);
-		err = -EINVAL;
-		goto err_node;
-	}
-
 	err = drm_mm_insert_node_generic(&mm, &node, 2, 0, 0, mode);
 	if (err) {
 		pr_err("Could not insert the node into the available hole!\n");
@@ -1998,7 +1988,6 @@ static int __igt_once(unsigned int mode)
 		goto err_hi;
 	}
 
-err_node:
 	drm_mm_remove_node(&node);
 err_hi:
 	drm_mm_remove_node(&rsvd_hi);
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Intel-gfx] [PATCH 2/3] drm/mm: optimize find_hole() as well
@ 2020-06-15 14:54   ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-06-15 14:54 UTC (permalink / raw)
  To: chris, intel-gfx, nirmoy.das, dri-devel

Abort early if there isn't enough space to allocate from a subtree.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/drm_mm.c                | 11 +++++++----
 drivers/gpu/drm/selftests/test-drm_mm.c | 11 -----------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 425fcd3590e8..177a5df0fe95 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -325,7 +325,7 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
 	return best;
 }
 
-static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
+static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
 {
 	struct rb_node *rb = mm->holes_addr.rb_node;
 	struct drm_mm_node *node = NULL;
@@ -333,6 +333,9 @@ static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
 	while (rb) {
 		u64 hole_start;
 
+		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
+			break;
+
 		node = rb_hole_addr_to_node(rb);
 		hole_start = __drm_mm_hole_node_start(node);
 
@@ -358,10 +361,10 @@ first_hole(struct drm_mm *mm,
 		return best_hole(mm, size);
 
 	case DRM_MM_INSERT_LOW:
-		return find_hole(mm, start);
+		return find_hole_addr(mm, start, size);
 
 	case DRM_MM_INSERT_HIGH:
-		return find_hole(mm, end);
+		return find_hole_addr(mm, end, size);
 
 	case DRM_MM_INSERT_EVICT:
 		return list_first_entry_or_null(&mm->hole_stack,
@@ -497,7 +500,7 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
 		return -ENOSPC;
 
 	/* Find the relevant hole to add our node to */
-	hole = find_hole(mm, node->start);
+	hole = find_hole_addr(mm, node->start, 0);
 	if (!hole)
 		return -ENOSPC;
 
diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
index ca5f35def905..b879aedfc00d 100644
--- a/drivers/gpu/drm/selftests/test-drm_mm.c
+++ b/drivers/gpu/drm/selftests/test-drm_mm.c
@@ -1981,16 +1981,6 @@ static int __igt_once(unsigned int mode)
 	}
 
 	memset(&node, 0, sizeof(node));
-	err = drm_mm_insert_node_generic(&mm, &node,
-					 2, 0, 0,
-					 mode | DRM_MM_INSERT_ONCE);
-	if (!err) {
-		pr_err("Unexpectedly inserted the node into the wrong hole: node.start=%llx\n",
-		       node.start);
-		err = -EINVAL;
-		goto err_node;
-	}
-
 	err = drm_mm_insert_node_generic(&mm, &node, 2, 0, 0, mode);
 	if (err) {
 		pr_err("Could not insert the node into the available hole!\n");
@@ -1998,7 +1988,6 @@ static int __igt_once(unsigned int mode)
 		goto err_hi;
 	}
 
-err_node:
 	drm_mm_remove_node(&node);
 err_hi:
 	drm_mm_remove_node(&rsvd_hi);
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 3/3] drm/mm: cleanup and improve next_hole_*_addr()
  2020-06-15 14:54 ` [Intel-gfx] " Christian König
@ 2020-06-15 14:54   ` Christian König
  -1 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-06-15 14:54 UTC (permalink / raw)
  To: chris, intel-gfx, nirmoy.das, dri-devel

Skipping just one branch of the tree is not the most
effective approach.

Instead use a macro to define the traversal functions and
sort out both branch sides.

This improves the performance of the unit tests by
a factor of more than 4.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/drm_mm.c | 106 +++++++++++++--------------------------
 1 file changed, 34 insertions(+), 72 deletions(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 177a5df0fe95..a4a04d246135 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -325,6 +325,11 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
 	return best;
 }
 
+static bool usable_hole_addr(struct rb_node *rb, u64 size)
+{
+	return rb && rb_hole_addr_to_node(rb)->subtree_max_hole >= size;
+}
+
 static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
 {
 	struct rb_node *rb = mm->holes_addr.rb_node;
@@ -333,7 +338,7 @@ static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
 	while (rb) {
 		u64 hole_start;
 
-		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
+		if (!usable_hole_addr(rb, size))
 			break;
 
 		node = rb_hole_addr_to_node(rb);
@@ -374,82 +379,39 @@ first_hole(struct drm_mm *mm,
 }
 
 /**
- * next_hole_high_addr - returns next hole for a DRM_MM_INSERT_HIGH mode request
- * @entry: previously selected drm_mm_node
- * @size: size of the a hole needed for the request
- *
- * This function will verify whether left subtree of @entry has hole big enough
- * to fit the requtested size. If so, it will return previous node of @entry or
- * else it will return parent node of @entry
+ * DECLARE_NEXT_HOLE_ADDR - macro to declare next hole functions
+ * @name: name of function to declare
+ * @first: first rb member to traverse (either rb_left or rb_right).
+ * @last: last rb member to traverse (either rb_right or rb_left).
  *
- * It will also skip the complete left subtree if subtree_max_hole of that
- * subtree is same as the subtree_max_hole of the @entry.
- *
- * Returns:
- * previous node of @entry if left subtree of @entry can serve the request or
- * else return parent of @entry
+ * This macro declares a function to return the next hole of the addr rb tree.
+ * While traversing the tree we take the searched size into account and only
+ * visit branches with potential big enough holes.
  */
-static struct drm_mm_node *
-next_hole_high_addr(struct drm_mm_node *entry, u64 size)
-{
-	struct rb_node *rb_node, *left_rb_node, *parent_rb_node;
-	struct drm_mm_node *left_node;
-
-	if (!entry)
-		return NULL;
 
-	rb_node = &entry->rb_hole_addr;
-	if (rb_node->rb_left) {
-		left_rb_node = rb_node->rb_left;
-		parent_rb_node = rb_parent(rb_node);
-		left_node = rb_entry(left_rb_node,
-				     struct drm_mm_node, rb_hole_addr);
-		if (left_node->subtree_max_hole < size &&
-		    parent_rb_node && parent_rb_node->rb_left != rb_node)
-			return rb_hole_addr_to_node(parent_rb_node);
-	}
-
-	return rb_hole_addr_to_node(rb_prev(rb_node));
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }
 
-/**
- * next_hole_low_addr - returns next hole for a DRM_MM_INSERT_LOW mode request
- * @entry: previously selected drm_mm_node
- * @size: size of the a hole needed for the request
- *
- * This function will verify whether right subtree of @entry has hole big enough
- * to fit the requtested size. If so, it will return next node of @entry or
- * else it will return parent node of @entry
- *
- * It will also skip the complete right subtree if subtree_max_hole of that
- * subtree is same as the subtree_max_hole of the @entry.
- *
- * Returns:
- * next node of @entry if right subtree of @entry can serve the request or
- * else return parent of @entry
- */
-static struct drm_mm_node *
-next_hole_low_addr(struct drm_mm_node *entry, u64 size)
-{
-	struct rb_node *rb_node, *right_rb_node, *parent_rb_node;
-	struct drm_mm_node *right_node;
-
-	if (!entry)
-		return NULL;
-
-	rb_node = &entry->rb_hole_addr;
-	if (rb_node->rb_right) {
-		right_rb_node = rb_node->rb_right;
-		parent_rb_node = rb_parent(rb_node);
-		right_node = rb_entry(right_rb_node,
-				      struct drm_mm_node, rb_hole_addr);
-		if (right_node->subtree_max_hole < size &&
-		    parent_rb_node && parent_rb_node->rb_right != rb_node)
-			return rb_hole_addr_to_node(parent_rb_node);
-	}
-
-	return rb_hole_addr_to_node(rb_next(rb_node));
-}
+DECLARE_NEXT_HOLE_ADDR(next_hole_high_addr, rb_left, rb_right)
+DECLARE_NEXT_HOLE_ADDR(next_hole_low_addr, rb_right, rb_left)
 
 static struct drm_mm_node *
 next_hole(struct drm_mm *mm,
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Intel-gfx] [PATCH 3/3] drm/mm: cleanup and improve next_hole_*_addr()
@ 2020-06-15 14:54   ` Christian König
  0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2020-06-15 14:54 UTC (permalink / raw)
  To: chris, intel-gfx, nirmoy.das, dri-devel

Skipping just one branch of the tree is not the most
effective approach.

Instead use a macro to define the traversal functions and
sort out both branch sides.

This improves the performance of the unit tests by
a factor of more than 4.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/drm_mm.c | 106 +++++++++++++--------------------------
 1 file changed, 34 insertions(+), 72 deletions(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 177a5df0fe95..a4a04d246135 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -325,6 +325,11 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
 	return best;
 }
 
+static bool usable_hole_addr(struct rb_node *rb, u64 size)
+{
+	return rb && rb_hole_addr_to_node(rb)->subtree_max_hole >= size;
+}
+
 static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
 {
 	struct rb_node *rb = mm->holes_addr.rb_node;
@@ -333,7 +338,7 @@ static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
 	while (rb) {
 		u64 hole_start;
 
-		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
+		if (!usable_hole_addr(rb, size))
 			break;
 
 		node = rb_hole_addr_to_node(rb);
@@ -374,82 +379,39 @@ first_hole(struct drm_mm *mm,
 }
 
 /**
- * next_hole_high_addr - returns next hole for a DRM_MM_INSERT_HIGH mode request
- * @entry: previously selected drm_mm_node
- * @size: size of the a hole needed for the request
- *
- * This function will verify whether left subtree of @entry has hole big enough
- * to fit the requtested size. If so, it will return previous node of @entry or
- * else it will return parent node of @entry
+ * DECLARE_NEXT_HOLE_ADDR - macro to declare next hole functions
+ * @name: name of function to declare
+ * @first: first rb member to traverse (either rb_left or rb_right).
+ * @last: last rb member to traverse (either rb_right or rb_left).
  *
- * It will also skip the complete left subtree if subtree_max_hole of that
- * subtree is same as the subtree_max_hole of the @entry.
- *
- * Returns:
- * previous node of @entry if left subtree of @entry can serve the request or
- * else return parent of @entry
+ * This macro declares a function to return the next hole of the addr rb tree.
+ * While traversing the tree we take the searched size into account and only
+ * visit branches with potential big enough holes.
  */
-static struct drm_mm_node *
-next_hole_high_addr(struct drm_mm_node *entry, u64 size)
-{
-	struct rb_node *rb_node, *left_rb_node, *parent_rb_node;
-	struct drm_mm_node *left_node;
-
-	if (!entry)
-		return NULL;
 
-	rb_node = &entry->rb_hole_addr;
-	if (rb_node->rb_left) {
-		left_rb_node = rb_node->rb_left;
-		parent_rb_node = rb_parent(rb_node);
-		left_node = rb_entry(left_rb_node,
-				     struct drm_mm_node, rb_hole_addr);
-		if (left_node->subtree_max_hole < size &&
-		    parent_rb_node && parent_rb_node->rb_left != rb_node)
-			return rb_hole_addr_to_node(parent_rb_node);
-	}
-
-	return rb_hole_addr_to_node(rb_prev(rb_node));
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }
 
-/**
- * next_hole_low_addr - returns next hole for a DRM_MM_INSERT_LOW mode request
- * @entry: previously selected drm_mm_node
- * @size: size of the a hole needed for the request
- *
- * This function will verify whether right subtree of @entry has hole big enough
- * to fit the requtested size. If so, it will return next node of @entry or
- * else it will return parent node of @entry
- *
- * It will also skip the complete right subtree if subtree_max_hole of that
- * subtree is same as the subtree_max_hole of the @entry.
- *
- * Returns:
- * next node of @entry if right subtree of @entry can serve the request or
- * else return parent of @entry
- */
-static struct drm_mm_node *
-next_hole_low_addr(struct drm_mm_node *entry, u64 size)
-{
-	struct rb_node *rb_node, *right_rb_node, *parent_rb_node;
-	struct drm_mm_node *right_node;
-
-	if (!entry)
-		return NULL;
-
-	rb_node = &entry->rb_hole_addr;
-	if (rb_node->rb_right) {
-		right_rb_node = rb_node->rb_right;
-		parent_rb_node = rb_parent(rb_node);
-		right_node = rb_entry(right_rb_node,
-				      struct drm_mm_node, rb_hole_addr);
-		if (right_node->subtree_max_hole < size &&
-		    parent_rb_node && parent_rb_node->rb_right != rb_node)
-			return rb_hole_addr_to_node(parent_rb_node);
-	}
-
-	return rb_hole_addr_to_node(rb_next(rb_node));
-}
+DECLARE_NEXT_HOLE_ADDR(next_hole_high_addr, rb_left, rb_right)
+DECLARE_NEXT_HOLE_ADDR(next_hole_low_addr, rb_right, rb_left)
 
 static struct drm_mm_node *
 next_hole(struct drm_mm *mm,
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/mm: remove unused rb_hole_size()
  2020-06-15 14:54 ` [Intel-gfx] " Christian König
                   ` (2 preceding siblings ...)
  (?)
@ 2020-06-15 15:20 ` Patchwork
  -1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2020-06-15 15:20 UTC (permalink / raw)
  To: Christian König; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/3] drm/mm: remove unused rb_hole_size()
URL   : https://patchwork.freedesktop.org/series/78376/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
4790c8cb3116 drm/mm: remove unused rb_hole_size()
-:28: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author '"Christian König" <ckoenig.leichtzumerken@gmail.com>'

total: 0 errors, 1 warnings, 0 checks, 11 lines checked
53df83ceed85 drm/mm: optimize find_hole() as well
-:86: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author '"Christian König" <ckoenig.leichtzumerken@gmail.com>'

total: 0 errors, 1 warnings, 0 checks, 60 lines checked
ef8803bbb4c3 drm/mm: cleanup and improve next_hole_*_addr()
-:92: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#92: FILE: drivers/gpu/drm/drm_mm.c:392:
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }

-:92: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'first' - possible side-effects?
#92: FILE: drivers/gpu/drm/drm_mm.c:392:
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }

-:92: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'first' may be better as '(first)' to avoid precedence issues
#92: FILE: drivers/gpu/drm/drm_mm.c:392:
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }

-:92: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'last' - possible side-effects?
#92: FILE: drivers/gpu/drm/drm_mm.c:392:
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }

-:92: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'last' may be better as '(last)' to avoid precedence issues
#92: FILE: drivers/gpu/drm/drm_mm.c:392:
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }

-:92: WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#92: FILE: drivers/gpu/drm/drm_mm.c:392:
+#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
+static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
+{									\
+	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
+									\
+	if (!entry || RB_EMPTY_NODE(node))				\
+		return NULL;						\
+									\
+	if (usable_hole_addr(node->first, size)) {			\
+		node = node->first;					\
+		while (usable_hole_addr(node->last, size))		\
+			node = node->last;				\
+		return rb_hole_addr_to_node(node);			\
+	}								\
+									\
+	while ((parent = rb_parent(node)) && node == parent->first)	\
+		node = parent;						\
+									\
+	return rb_hole_addr_to_node(parent);				\
 }

-:155: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author '"Christian König" <ckoenig.leichtzumerken@gmail.com>'

total: 0 errors, 2 warnings, 5 checks, 129 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/mm: remove unused rb_hole_size()
  2020-06-15 14:54 ` [Intel-gfx] " Christian König
                   ` (3 preceding siblings ...)
  (?)
@ 2020-06-15 15:41 ` Patchwork
  -1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2020-06-15 15:41 UTC (permalink / raw)
  To: Christian König; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/3] drm/mm: remove unused rb_hole_size()
URL   : https://patchwork.freedesktop.org/series/78376/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8627 -> Patchwork_17951
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/index.html

Known issues
------------

  Here are the changes found in Patchwork_17951 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - fi-apl-guc:         [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-apl-guc/igt@i915_module_load@reload.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-apl-guc/igt@i915_module_load@reload.html

  * igt@i915_pm_backlight@basic-brightness:
    - fi-whl-u:           [PASS][3] -> [DMESG-WARN][4] ([i915#95])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-whl-u/igt@i915_pm_backlight@basic-brightness.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-whl-u/igt@i915_pm_backlight@basic-brightness.html

  * igt@i915_selftest@live@active:
    - fi-skl-lmem:        [PASS][5] -> [DMESG-FAIL][6] ([i915#666])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-skl-lmem/igt@i915_selftest@live@active.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-skl-lmem/igt@i915_selftest@live@active.html

  * igt@kms_busy@basic@flip:
    - fi-kbl-x1275:       [PASS][7] -> [DMESG-WARN][8] ([i915#62] / [i915#92] / [i915#95])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-kbl-x1275/igt@kms_busy@basic@flip.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-kbl-x1275/igt@kms_busy@basic@flip.html
    - fi-tgl-y:           [PASS][9] -> [DMESG-WARN][10] ([i915#1982])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-y/igt@kms_busy@basic@flip.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-tgl-y/igt@kms_busy@basic@flip.html

  * igt@prime_vgem@basic-fence-flip:
    - fi-tgl-y:           [PASS][11] -> [DMESG-WARN][12] ([i915#402]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-y/igt@prime_vgem@basic-fence-flip.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-tgl-y/igt@prime_vgem@basic-fence-flip.html

  
#### Possible fixes ####

  * igt@gem_flink_basic@flink-lifetime:
    - fi-tgl-y:           [DMESG-WARN][13] ([i915#402]) -> [PASS][14] +2 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-y/igt@gem_flink_basic@flink-lifetime.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-tgl-y/igt@gem_flink_basic@flink-lifetime.html

  * igt@i915_module_load@reload:
    - {fi-tgl-dsi}:       [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-dsi/igt@i915_module_load@reload.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-tgl-dsi/igt@i915_module_load@reload.html

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-byt-j1900:       [DMESG-WARN][17] ([i915#1982]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-byt-j1900/igt@i915_pm_rpm@basic-pci-d3-state.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-byt-j1900/igt@i915_pm_rpm@basic-pci-d3-state.html
    - fi-tgl-y:           [DMESG-WARN][19] ([i915#1982]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-y/igt@i915_pm_rpm@basic-pci-d3-state.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-tgl-y/igt@i915_pm_rpm@basic-pci-d3-state.html
    - fi-bsw-kefka:       [DMESG-WARN][21] ([i915#1982]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-bsw-kefka/igt@i915_pm_rpm@basic-pci-d3-state.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-bsw-kefka/igt@i915_pm_rpm@basic-pci-d3-state.html

  * igt@i915_pm_rpm@module-reload:
    - fi-glk-dsi:         [DMESG-WARN][23] ([i915#1982]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-glk-dsi/igt@i915_pm_rpm@module-reload.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-glk-dsi/igt@i915_pm_rpm@module-reload.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
    - fi-icl-u2:          [DMESG-WARN][25] ([i915#1982]) -> [PASS][26] +3 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-icl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-icl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
    - fi-tgl-u2:          [DMESG-WARN][27] ([i915#402]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-u2/igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-tgl-u2/igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence.html

  
#### Warnings ####

  * igt@i915_pm_rpm@module-reload:
    - fi-kbl-x1275:       [DMESG-FAIL][29] ([i915#62]) -> [SKIP][30] ([fdo#109271])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html

  * igt@kms_force_connector_basic@force-edid:
    - fi-kbl-x1275:       [DMESG-WARN][31] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][32] ([i915#62] / [i915#92]) +3 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-kbl-x1275/igt@kms_force_connector_basic@force-edid.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-kbl-x1275/igt@kms_force_connector_basic@force-edid.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - fi-kbl-x1275:       [DMESG-WARN][33] ([i915#62] / [i915#92]) -> [DMESG-WARN][34] ([i915#62] / [i915#92] / [i915#95]) +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-kbl-x1275/igt@kms_force_connector_basic@prune-stale-modes.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/fi-kbl-x1275/igt@kms_force_connector_basic@prune-stale-modes.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#1569]: https://gitlab.freedesktop.org/drm/intel/issues/1569
  [i915#192]: https://gitlab.freedesktop.org/drm/intel/issues/192
  [i915#193]: https://gitlab.freedesktop.org/drm/intel/issues/193
  [i915#194]: https://gitlab.freedesktop.org/drm/intel/issues/194
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2029]: https://gitlab.freedesktop.org/drm/intel/issues/2029
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
  [i915#666]: https://gitlab.freedesktop.org/drm/intel/issues/666
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (50 -> 44)
------------------------------

  Additional (1): fi-gdg-551 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * Linux: CI_DRM_8627 -> Patchwork_17951

  CI-20190529: 20190529
  CI_DRM_8627: 593c112156feb0f6159814f2276a32c90f243823 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5710: f524eee47930601ad7b4cba9d40c26d68dc7d250 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_17951: ef8803bbb4c34b9aa3afeba137902113894fc5b8 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

ef8803bbb4c3 drm/mm: cleanup and improve next_hole_*_addr()
53df83ceed85 drm/mm: optimize find_hole() as well
4790c8cb3116 drm/mm: remove unused rb_hole_size()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/3] drm/mm: remove unused rb_hole_size()
  2020-06-15 14:54 ` [Intel-gfx] " Christian König
@ 2020-06-15 16:36   ` Nirmoy
  -1 siblings, 0 replies; 15+ messages in thread
From: Nirmoy @ 2020-06-15 16:36 UTC (permalink / raw)
  To: Christian König, chris, intel-gfx, nirmoy.das, dri-devel

Reviewed-by: Nirmoy Das <nirmoy.das@amd.com>

On 6/15/20 4:54 PM, Christian König wrote:
> Just some code cleanup.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/drm_mm.c | 5 -----
>   1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 82d2888eb7fe..425fcd3590e8 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -305,11 +305,6 @@ static inline struct drm_mm_node *rb_hole_addr_to_node(struct rb_node *rb)
>   	return rb_entry_safe(rb, struct drm_mm_node, rb_hole_addr);
>   }
>   
> -static inline u64 rb_hole_size(struct rb_node *rb)
> -{
> -	return rb_entry(rb, struct drm_mm_node, rb_hole_size)->hole_size;
> -}
> -
>   static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
>   {
>   	struct rb_node *rb = mm->holes_size.rb_root.rb_node;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [Intel-gfx] [PATCH 1/3] drm/mm: remove unused rb_hole_size()
@ 2020-06-15 16:36   ` Nirmoy
  0 siblings, 0 replies; 15+ messages in thread
From: Nirmoy @ 2020-06-15 16:36 UTC (permalink / raw)
  To: Christian König, chris, intel-gfx, nirmoy.das, dri-devel

Reviewed-by: Nirmoy Das <nirmoy.das@amd.com>

On 6/15/20 4:54 PM, Christian König wrote:
> Just some code cleanup.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/drm_mm.c | 5 -----
>   1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 82d2888eb7fe..425fcd3590e8 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -305,11 +305,6 @@ static inline struct drm_mm_node *rb_hole_addr_to_node(struct rb_node *rb)
>   	return rb_entry_safe(rb, struct drm_mm_node, rb_hole_addr);
>   }
>   
> -static inline u64 rb_hole_size(struct rb_node *rb)
> -{
> -	return rb_entry(rb, struct drm_mm_node, rb_hole_size)->hole_size;
> -}
> -
>   static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
>   {
>   	struct rb_node *rb = mm->holes_size.rb_root.rb_node;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 3/3] drm/mm: cleanup and improve next_hole_*_addr()
  2020-06-15 14:54   ` [Intel-gfx] " Christian König
@ 2020-06-15 16:38     ` Nirmoy
  -1 siblings, 0 replies; 15+ messages in thread
From: Nirmoy @ 2020-06-15 16:38 UTC (permalink / raw)
  To: Christian König, chris, intel-gfx, nirmoy.das, dri-devel

Reviewed-by: Nirmoy Das <nirmoy.das@amd.com>

On 6/15/20 4:54 PM, Christian König wrote:
> Skipping just one branch of the tree is not the most
> effective approach.
>
> Instead use a macro to define the traversal functions and
> sort out both branch sides.
>
> This improves the performance of the unit tests by
> a factor of more than 4.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/drm_mm.c | 106 +++++++++++++--------------------------
>   1 file changed, 34 insertions(+), 72 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 177a5df0fe95..a4a04d246135 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -325,6 +325,11 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
>   	return best;
>   }
>   
> +static bool usable_hole_addr(struct rb_node *rb, u64 size)
> +{
> +	return rb && rb_hole_addr_to_node(rb)->subtree_max_hole >= size;
> +}
> +
>   static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
>   {
>   	struct rb_node *rb = mm->holes_addr.rb_node;
> @@ -333,7 +338,7 @@ static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
>   	while (rb) {
>   		u64 hole_start;
>   
> -		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
> +		if (!usable_hole_addr(rb, size))
>   			break;
>   
>   		node = rb_hole_addr_to_node(rb);
> @@ -374,82 +379,39 @@ first_hole(struct drm_mm *mm,
>   }
>   
>   /**
> - * next_hole_high_addr - returns next hole for a DRM_MM_INSERT_HIGH mode request
> - * @entry: previously selected drm_mm_node
> - * @size: size of the a hole needed for the request
> - *
> - * This function will verify whether left subtree of @entry has hole big enough
> - * to fit the requtested size. If so, it will return previous node of @entry or
> - * else it will return parent node of @entry
> + * DECLARE_NEXT_HOLE_ADDR - macro to declare next hole functions
> + * @name: name of function to declare
> + * @first: first rb member to traverse (either rb_left or rb_right).
> + * @last: last rb member to traverse (either rb_right or rb_left).
>    *
> - * It will also skip the complete left subtree if subtree_max_hole of that
> - * subtree is same as the subtree_max_hole of the @entry.
> - *
> - * Returns:
> - * previous node of @entry if left subtree of @entry can serve the request or
> - * else return parent of @entry
> + * This macro declares a function to return the next hole of the addr rb tree.
> + * While traversing the tree we take the searched size into account and only
> + * visit branches with potential big enough holes.
>    */
> -static struct drm_mm_node *
> -next_hole_high_addr(struct drm_mm_node *entry, u64 size)
> -{
> -	struct rb_node *rb_node, *left_rb_node, *parent_rb_node;
> -	struct drm_mm_node *left_node;
> -
> -	if (!entry)
> -		return NULL;
>   
> -	rb_node = &entry->rb_hole_addr;
> -	if (rb_node->rb_left) {
> -		left_rb_node = rb_node->rb_left;
> -		parent_rb_node = rb_parent(rb_node);
> -		left_node = rb_entry(left_rb_node,
> -				     struct drm_mm_node, rb_hole_addr);
> -		if (left_node->subtree_max_hole < size &&
> -		    parent_rb_node && parent_rb_node->rb_left != rb_node)
> -			return rb_hole_addr_to_node(parent_rb_node);
> -	}
> -
> -	return rb_hole_addr_to_node(rb_prev(rb_node));
> +#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
> +static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
> +{									\
> +	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
> +									\
> +	if (!entry || RB_EMPTY_NODE(node))				\
> +		return NULL;						\
> +									\
> +	if (usable_hole_addr(node->first, size)) {			\
> +		node = node->first;					\
> +		while (usable_hole_addr(node->last, size))		\
> +			node = node->last;				\
> +		return rb_hole_addr_to_node(node);			\
> +	}								\
> +									\
> +	while ((parent = rb_parent(node)) && node == parent->first)	\
> +		node = parent;						\
> +									\
> +	return rb_hole_addr_to_node(parent);				\
>   }
>   
> -/**
> - * next_hole_low_addr - returns next hole for a DRM_MM_INSERT_LOW mode request
> - * @entry: previously selected drm_mm_node
> - * @size: size of the a hole needed for the request
> - *
> - * This function will verify whether right subtree of @entry has hole big enough
> - * to fit the requtested size. If so, it will return next node of @entry or
> - * else it will return parent node of @entry
> - *
> - * It will also skip the complete right subtree if subtree_max_hole of that
> - * subtree is same as the subtree_max_hole of the @entry.
> - *
> - * Returns:
> - * next node of @entry if right subtree of @entry can serve the request or
> - * else return parent of @entry
> - */
> -static struct drm_mm_node *
> -next_hole_low_addr(struct drm_mm_node *entry, u64 size)
> -{
> -	struct rb_node *rb_node, *right_rb_node, *parent_rb_node;
> -	struct drm_mm_node *right_node;
> -
> -	if (!entry)
> -		return NULL;
> -
> -	rb_node = &entry->rb_hole_addr;
> -	if (rb_node->rb_right) {
> -		right_rb_node = rb_node->rb_right;
> -		parent_rb_node = rb_parent(rb_node);
> -		right_node = rb_entry(right_rb_node,
> -				      struct drm_mm_node, rb_hole_addr);
> -		if (right_node->subtree_max_hole < size &&
> -		    parent_rb_node && parent_rb_node->rb_right != rb_node)
> -			return rb_hole_addr_to_node(parent_rb_node);
> -	}
> -
> -	return rb_hole_addr_to_node(rb_next(rb_node));
> -}
> +DECLARE_NEXT_HOLE_ADDR(next_hole_high_addr, rb_left, rb_right)
> +DECLARE_NEXT_HOLE_ADDR(next_hole_low_addr, rb_right, rb_left)
>   
>   static struct drm_mm_node *
>   next_hole(struct drm_mm *mm,
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [Intel-gfx] [PATCH 3/3] drm/mm: cleanup and improve next_hole_*_addr()
@ 2020-06-15 16:38     ` Nirmoy
  0 siblings, 0 replies; 15+ messages in thread
From: Nirmoy @ 2020-06-15 16:38 UTC (permalink / raw)
  To: Christian König, chris, intel-gfx, nirmoy.das, dri-devel

Reviewed-by: Nirmoy Das <nirmoy.das@amd.com>

On 6/15/20 4:54 PM, Christian König wrote:
> Skipping just one branch of the tree is not the most
> effective approach.
>
> Instead use a macro to define the traversal functions and
> sort out both branch sides.
>
> This improves the performance of the unit tests by
> a factor of more than 4.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/drm_mm.c | 106 +++++++++++++--------------------------
>   1 file changed, 34 insertions(+), 72 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 177a5df0fe95..a4a04d246135 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -325,6 +325,11 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
>   	return best;
>   }
>   
> +static bool usable_hole_addr(struct rb_node *rb, u64 size)
> +{
> +	return rb && rb_hole_addr_to_node(rb)->subtree_max_hole >= size;
> +}
> +
>   static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
>   {
>   	struct rb_node *rb = mm->holes_addr.rb_node;
> @@ -333,7 +338,7 @@ static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
>   	while (rb) {
>   		u64 hole_start;
>   
> -		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
> +		if (!usable_hole_addr(rb, size))
>   			break;
>   
>   		node = rb_hole_addr_to_node(rb);
> @@ -374,82 +379,39 @@ first_hole(struct drm_mm *mm,
>   }
>   
>   /**
> - * next_hole_high_addr - returns next hole for a DRM_MM_INSERT_HIGH mode request
> - * @entry: previously selected drm_mm_node
> - * @size: size of the a hole needed for the request
> - *
> - * This function will verify whether left subtree of @entry has hole big enough
> - * to fit the requtested size. If so, it will return previous node of @entry or
> - * else it will return parent node of @entry
> + * DECLARE_NEXT_HOLE_ADDR - macro to declare next hole functions
> + * @name: name of function to declare
> + * @first: first rb member to traverse (either rb_left or rb_right).
> + * @last: last rb member to traverse (either rb_right or rb_left).
>    *
> - * It will also skip the complete left subtree if subtree_max_hole of that
> - * subtree is same as the subtree_max_hole of the @entry.
> - *
> - * Returns:
> - * previous node of @entry if left subtree of @entry can serve the request or
> - * else return parent of @entry
> + * This macro declares a function to return the next hole of the addr rb tree.
> + * While traversing the tree we take the searched size into account and only
> + * visit branches with potential big enough holes.
>    */
> -static struct drm_mm_node *
> -next_hole_high_addr(struct drm_mm_node *entry, u64 size)
> -{
> -	struct rb_node *rb_node, *left_rb_node, *parent_rb_node;
> -	struct drm_mm_node *left_node;
> -
> -	if (!entry)
> -		return NULL;
>   
> -	rb_node = &entry->rb_hole_addr;
> -	if (rb_node->rb_left) {
> -		left_rb_node = rb_node->rb_left;
> -		parent_rb_node = rb_parent(rb_node);
> -		left_node = rb_entry(left_rb_node,
> -				     struct drm_mm_node, rb_hole_addr);
> -		if (left_node->subtree_max_hole < size &&
> -		    parent_rb_node && parent_rb_node->rb_left != rb_node)
> -			return rb_hole_addr_to_node(parent_rb_node);
> -	}
> -
> -	return rb_hole_addr_to_node(rb_prev(rb_node));
> +#define DECLARE_NEXT_HOLE_ADDR(name, first, last)			\
> +static struct drm_mm_node *name(struct drm_mm_node *entry, u64 size)	\
> +{									\
> +	struct rb_node *parent, *node = &entry->rb_hole_addr;		\
> +									\
> +	if (!entry || RB_EMPTY_NODE(node))				\
> +		return NULL;						\
> +									\
> +	if (usable_hole_addr(node->first, size)) {			\
> +		node = node->first;					\
> +		while (usable_hole_addr(node->last, size))		\
> +			node = node->last;				\
> +		return rb_hole_addr_to_node(node);			\
> +	}								\
> +									\
> +	while ((parent = rb_parent(node)) && node == parent->first)	\
> +		node = parent;						\
> +									\
> +	return rb_hole_addr_to_node(parent);				\
>   }
>   
> -/**
> - * next_hole_low_addr - returns next hole for a DRM_MM_INSERT_LOW mode request
> - * @entry: previously selected drm_mm_node
> - * @size: size of the a hole needed for the request
> - *
> - * This function will verify whether right subtree of @entry has hole big enough
> - * to fit the requtested size. If so, it will return next node of @entry or
> - * else it will return parent node of @entry
> - *
> - * It will also skip the complete right subtree if subtree_max_hole of that
> - * subtree is same as the subtree_max_hole of the @entry.
> - *
> - * Returns:
> - * next node of @entry if right subtree of @entry can serve the request or
> - * else return parent of @entry
> - */
> -static struct drm_mm_node *
> -next_hole_low_addr(struct drm_mm_node *entry, u64 size)
> -{
> -	struct rb_node *rb_node, *right_rb_node, *parent_rb_node;
> -	struct drm_mm_node *right_node;
> -
> -	if (!entry)
> -		return NULL;
> -
> -	rb_node = &entry->rb_hole_addr;
> -	if (rb_node->rb_right) {
> -		right_rb_node = rb_node->rb_right;
> -		parent_rb_node = rb_parent(rb_node);
> -		right_node = rb_entry(right_rb_node,
> -				      struct drm_mm_node, rb_hole_addr);
> -		if (right_node->subtree_max_hole < size &&
> -		    parent_rb_node && parent_rb_node->rb_right != rb_node)
> -			return rb_hole_addr_to_node(parent_rb_node);
> -	}
> -
> -	return rb_hole_addr_to_node(rb_next(rb_node));
> -}
> +DECLARE_NEXT_HOLE_ADDR(next_hole_high_addr, rb_left, rb_right)
> +DECLARE_NEXT_HOLE_ADDR(next_hole_low_addr, rb_right, rb_left)
>   
>   static struct drm_mm_node *
>   next_hole(struct drm_mm *mm,
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 2/3] drm/mm: optimize find_hole() as well
  2020-06-15 14:54   ` [Intel-gfx] " Christian König
@ 2020-06-15 16:54     ` Nirmoy
  -1 siblings, 0 replies; 15+ messages in thread
From: Nirmoy @ 2020-06-15 16:54 UTC (permalink / raw)
  To: Christian König, chris, intel-gfx, nirmoy.das, dri-devel

Acked-by: Nirmoy Das <nirmoy.das@amd.com>

On 6/15/20 4:54 PM, Christian König wrote:
> Abort early if there isn't enough space to allocate from a subtree.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/drm_mm.c                | 11 +++++++----
>   drivers/gpu/drm/selftests/test-drm_mm.c | 11 -----------
>   2 files changed, 7 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 425fcd3590e8..177a5df0fe95 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -325,7 +325,7 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
>   	return best;
>   }
>   
> -static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
> +static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
>   {
>   	struct rb_node *rb = mm->holes_addr.rb_node;
>   	struct drm_mm_node *node = NULL;
> @@ -333,6 +333,9 @@ static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
>   	while (rb) {
>   		u64 hole_start;
>   
> +		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
> +			break;
> +
>   		node = rb_hole_addr_to_node(rb);
>   		hole_start = __drm_mm_hole_node_start(node);
>   
> @@ -358,10 +361,10 @@ first_hole(struct drm_mm *mm,
>   		return best_hole(mm, size);
>   
>   	case DRM_MM_INSERT_LOW:
> -		return find_hole(mm, start);
> +		return find_hole_addr(mm, start, size);
>   
>   	case DRM_MM_INSERT_HIGH:
> -		return find_hole(mm, end);
> +		return find_hole_addr(mm, end, size);
>   
>   	case DRM_MM_INSERT_EVICT:
>   		return list_first_entry_or_null(&mm->hole_stack,
> @@ -497,7 +500,7 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
>   		return -ENOSPC;
>   
>   	/* Find the relevant hole to add our node to */
> -	hole = find_hole(mm, node->start);
> +	hole = find_hole_addr(mm, node->start, 0);
>   	if (!hole)
>   		return -ENOSPC;
>   
> diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
> index ca5f35def905..b879aedfc00d 100644
> --- a/drivers/gpu/drm/selftests/test-drm_mm.c
> +++ b/drivers/gpu/drm/selftests/test-drm_mm.c
> @@ -1981,16 +1981,6 @@ static int __igt_once(unsigned int mode)
>   	}
>   
>   	memset(&node, 0, sizeof(node));
> -	err = drm_mm_insert_node_generic(&mm, &node,
> -					 2, 0, 0,
> -					 mode | DRM_MM_INSERT_ONCE);
> -	if (!err) {
> -		pr_err("Unexpectedly inserted the node into the wrong hole: node.start=%llx\n",
> -		       node.start);
> -		err = -EINVAL;
> -		goto err_node;
> -	}
> -
>   	err = drm_mm_insert_node_generic(&mm, &node, 2, 0, 0, mode);
>   	if (err) {
>   		pr_err("Could not insert the node into the available hole!\n");
> @@ -1998,7 +1988,6 @@ static int __igt_once(unsigned int mode)
>   		goto err_hi;
>   	}
>   
> -err_node:
>   	drm_mm_remove_node(&node);
>   err_hi:
>   	drm_mm_remove_node(&rsvd_hi);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [Intel-gfx] [PATCH 2/3] drm/mm: optimize find_hole() as well
@ 2020-06-15 16:54     ` Nirmoy
  0 siblings, 0 replies; 15+ messages in thread
From: Nirmoy @ 2020-06-15 16:54 UTC (permalink / raw)
  To: Christian König, chris, intel-gfx, nirmoy.das, dri-devel

Acked-by: Nirmoy Das <nirmoy.das@amd.com>

On 6/15/20 4:54 PM, Christian König wrote:
> Abort early if there isn't enough space to allocate from a subtree.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/drm_mm.c                | 11 +++++++----
>   drivers/gpu/drm/selftests/test-drm_mm.c | 11 -----------
>   2 files changed, 7 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 425fcd3590e8..177a5df0fe95 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -325,7 +325,7 @@ static struct drm_mm_node *best_hole(struct drm_mm *mm, u64 size)
>   	return best;
>   }
>   
> -static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
> +static struct drm_mm_node *find_hole_addr(struct drm_mm *mm, u64 addr, u64 size)
>   {
>   	struct rb_node *rb = mm->holes_addr.rb_node;
>   	struct drm_mm_node *node = NULL;
> @@ -333,6 +333,9 @@ static struct drm_mm_node *find_hole(struct drm_mm *mm, u64 addr)
>   	while (rb) {
>   		u64 hole_start;
>   
> +		if (rb_hole_addr_to_node(rb)->subtree_max_hole < size)
> +			break;
> +
>   		node = rb_hole_addr_to_node(rb);
>   		hole_start = __drm_mm_hole_node_start(node);
>   
> @@ -358,10 +361,10 @@ first_hole(struct drm_mm *mm,
>   		return best_hole(mm, size);
>   
>   	case DRM_MM_INSERT_LOW:
> -		return find_hole(mm, start);
> +		return find_hole_addr(mm, start, size);
>   
>   	case DRM_MM_INSERT_HIGH:
> -		return find_hole(mm, end);
> +		return find_hole_addr(mm, end, size);
>   
>   	case DRM_MM_INSERT_EVICT:
>   		return list_first_entry_or_null(&mm->hole_stack,
> @@ -497,7 +500,7 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
>   		return -ENOSPC;
>   
>   	/* Find the relevant hole to add our node to */
> -	hole = find_hole(mm, node->start);
> +	hole = find_hole_addr(mm, node->start, 0);
>   	if (!hole)
>   		return -ENOSPC;
>   
> diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
> index ca5f35def905..b879aedfc00d 100644
> --- a/drivers/gpu/drm/selftests/test-drm_mm.c
> +++ b/drivers/gpu/drm/selftests/test-drm_mm.c
> @@ -1981,16 +1981,6 @@ static int __igt_once(unsigned int mode)
>   	}
>   
>   	memset(&node, 0, sizeof(node));
> -	err = drm_mm_insert_node_generic(&mm, &node,
> -					 2, 0, 0,
> -					 mode | DRM_MM_INSERT_ONCE);
> -	if (!err) {
> -		pr_err("Unexpectedly inserted the node into the wrong hole: node.start=%llx\n",
> -		       node.start);
> -		err = -EINVAL;
> -		goto err_node;
> -	}
> -
>   	err = drm_mm_insert_node_generic(&mm, &node, 2, 0, 0, mode);
>   	if (err) {
>   		pr_err("Could not insert the node into the available hole!\n");
> @@ -1998,7 +1988,6 @@ static int __igt_once(unsigned int mode)
>   		goto err_hi;
>   	}
>   
> -err_node:
>   	drm_mm_remove_node(&node);
>   err_hi:
>   	drm_mm_remove_node(&rsvd_hi);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/3] drm/mm: remove unused rb_hole_size()
  2020-06-15 14:54 ` [Intel-gfx] " Christian König
                   ` (5 preceding siblings ...)
  (?)
@ 2020-06-15 17:30 ` Patchwork
  -1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2020-06-15 17:30 UTC (permalink / raw)
  To: Christian König; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/3] drm/mm: remove unused rb_hole_size()
URL   : https://patchwork.freedesktop.org/series/78376/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8627_full -> Patchwork_17951_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_17951_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - shard-tglb:         [PASS][1] -> [DMESG-WARN][2] ([i915#402]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb1/igt@i915_module_load@reload.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb5/igt@i915_module_load@reload.html

  * igt@i915_pm_rpm@system-suspend-modeset:
    - shard-kbl:          [PASS][3] -> [DMESG-WARN][4] ([i915#165])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl1/igt@i915_pm_rpm@system-suspend-modeset.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-kbl2/igt@i915_pm_rpm@system-suspend-modeset.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
    - shard-kbl:          [PASS][5] -> [DMESG-WARN][6] ([i915#180]) +5 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl1/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-kbl2/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-ytiled:
    - shard-apl:          [PASS][7] -> [DMESG-WARN][8] ([i915#95]) +18 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-apl3/igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-ytiled.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-apl1/igt@kms_draw_crc@draw-method-xrgb2101010-mmap-wc-ytiled.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt:
    - shard-iclb:         [PASS][9] -> [DMESG-WARN][10] ([i915#1982])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt.html

  * igt@kms_frontbuffer_tracking@psr-rgb101010-draw-pwrite:
    - shard-tglb:         [PASS][11] -> [DMESG-WARN][12] ([i915#1982]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb5/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-pwrite.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb7/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-pwrite.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [PASS][13] -> [FAIL][14] ([fdo#108145] / [i915#265]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
    - shard-skl:          [PASS][15] -> [DMESG-WARN][16] ([i915#1982]) +10 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl3/igt@kms_plane_multiple@atomic-pipe-a-tiling-yf.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-skl9/igt@kms_plane_multiple@atomic-pipe-a-tiling-yf.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#109441]) +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-iclb1/igt@kms_psr@psr2_cursor_render.html

  * igt@perf_pmu@semaphore-busy@rcs0:
    - shard-kbl:          [PASS][19] -> [FAIL][20] ([i915#1820])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl3/igt@perf_pmu@semaphore-busy@rcs0.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-kbl7/igt@perf_pmu@semaphore-busy@rcs0.html

  
#### Possible fixes ####

  * igt@gem_exec_balancer@sliced:
    - shard-tglb:         [TIMEOUT][21] ([i915#1936]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb6/igt@gem_exec_balancer@sliced.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb8/igt@gem_exec_balancer@sliced.html

  * igt@gem_exec_schedule@implicit-read-write@rcs0:
    - shard-snb:          [INCOMPLETE][23] ([i915#82]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-snb2/igt@gem_exec_schedule@implicit-read-write@rcs0.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-snb6/igt@gem_exec_schedule@implicit-read-write@rcs0.html

  * {igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing@edp-1-pipe-a}:
    - shard-tglb:         [DMESG-WARN][25] ([i915#1982]) -> [PASS][26] +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb1/igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing@edp-1-pipe-a.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb5/igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing@edp-1-pipe-a.html

  * igt@kms_big_fb@linear-64bpp-rotate-180:
    - shard-apl:          [DMESG-WARN][27] ([i915#1982]) -> [PASS][28] +1 similar issue
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-apl4/igt@kms_big_fb@linear-64bpp-rotate-180.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-apl7/igt@kms_big_fb@linear-64bpp-rotate-180.html
    - shard-glk:          [DMESG-FAIL][29] ([i915#118] / [i915#95]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-glk8/igt@kms_big_fb@linear-64bpp-rotate-180.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-glk6/igt@kms_big_fb@linear-64bpp-rotate-180.html

  * igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic:
    - shard-apl:          [DMESG-WARN][31] ([i915#95]) -> [PASS][32] +16 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-apl7/igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-apl3/igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic.html

  * igt@kms_flip@2x-wf_vblank-ts-check@ab-hdmi-a1-hdmi-a2:
    - shard-glk:          [DMESG-WARN][33] ([i915#1982]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-glk1/igt@kms_flip@2x-wf_vblank-ts-check@ab-hdmi-a1-hdmi-a2.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-glk8/igt@kms_flip@2x-wf_vblank-ts-check@ab-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend@a-edp1:
    - shard-skl:          [DMESG-WARN][35] ([i915#1982]) -> [PASS][36] +10 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl10/igt@kms_flip@flip-vs-suspend@a-edp1.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-skl4/igt@kms_flip@flip-vs-suspend@a-edp1.html

  * igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1:
    - shard-skl:          [FAIL][37] ([i915#1928]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl8/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-skl8/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [FAIL][39] ([i915#173]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb1/igt@kms_psr@no_drrs.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-iclb7/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_primary_mmap_gtt:
    - shard-iclb:         [SKIP][41] ([fdo#109441]) -> [PASS][42] +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb7/igt@kms_psr@psr2_primary_mmap_gtt.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-tglb:         [TIMEOUT][43] -> [PASS][44] +1 similar issue
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb6/igt@kms_psr@psr2_sprite_mmap_cpu.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb8/igt@kms_psr@psr2_sprite_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [FAIL][45] ([i915#31]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl4/igt@kms_setmode@basic.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-kbl3/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-kbl:          [DMESG-WARN][47] ([i915#180]) -> [PASS][48] +3 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-kbl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@perf@blocking-parameterized:
    - shard-iclb:         [FAIL][49] ([i915#1542]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb4/igt@perf@blocking-parameterized.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-iclb4/igt@perf@blocking-parameterized.html

  * igt@syncobj_wait@multi-wait-for-submit-unsubmitted-submitted:
    - shard-snb:          [TIMEOUT][51] ([i915#1958]) -> [PASS][52] +3 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-snb6/igt@syncobj_wait@multi-wait-for-submit-unsubmitted-submitted.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-snb5/igt@syncobj_wait@multi-wait-for-submit-unsubmitted-submitted.html

  
#### Warnings ####

  * igt@gem_exec_balancer@invalid-bonds:
    - shard-snb:          [TIMEOUT][53] ([i915#1958]) -> [SKIP][54] ([fdo#109271]) +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-snb6/igt@gem_exec_balancer@invalid-bonds.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-snb5/igt@gem_exec_balancer@invalid-bonds.html

  * igt@gem_exec_reloc@basic-concurrent16:
    - shard-snb:          [TIMEOUT][55] ([i915#1958]) -> [FAIL][56] ([i915#1930])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-snb6/igt@gem_exec_reloc@basic-concurrent16.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-snb5/igt@gem_exec_reloc@basic-concurrent16.html

  * igt@i915_pm_dc@dc6-dpms:
    - shard-tglb:         [FAIL][57] ([i915#454]) -> [SKIP][58] ([i915#468])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb3/igt@i915_pm_dc@dc6-dpms.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb2/igt@i915_pm_dc@dc6-dpms.html

  * igt@i915_pm_rc6_residency@media-rc6-accuracy:
    - shard-tglb:         [SKIP][59] ([fdo#111719]) -> [SKIP][60] ([fdo#109289] / [fdo#111719])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb1/igt@i915_pm_rc6_residency@media-rc6-accuracy.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb6/igt@i915_pm_rc6_residency@media-rc6-accuracy.html

  * igt@kms_content_protection@atomic:
    - shard-kbl:          [TIMEOUT][61] ([i915#1319] / [i915#1958]) -> [TIMEOUT][62] ([i915#1319])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl4/igt@kms_content_protection@atomic.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-kbl3/igt@kms_content_protection@atomic.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite:
    - shard-tglb:         [TIMEOUT][63] -> [SKIP][64] ([fdo#111825])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb6/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-tglb8/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite.html

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          [FAIL][65] ([fdo#108145] / [i915#265]) -> [DMESG-WARN][66] ([i915#1982])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl7/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/shard-skl1/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#111719]: https://bugs.freedesktop.org/show_bug.cgi?id=111719
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
  [i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
  [i915#173]: https://gitlab.freedesktop.org/drm/intel/issues/173
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1820]: https://gitlab.freedesktop.org/drm/intel/issues/1820
  [i915#1928]: https://gitlab.freedesktop.org/drm/intel/issues/1928
  [i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
  [i915#1936]: https://gitlab.freedesktop.org/drm/intel/issues/1936
  [i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
  [i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (11 -> 11)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_8627 -> Patchwork_17951

  CI-20190529: 20190529
  CI_DRM_8627: 593c112156feb0f6159814f2276a32c90f243823 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5710: f524eee47930601ad7b4cba9d40c26d68dc7d250 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_17951: ef8803bbb4c34b9aa3afeba137902113894fc5b8 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17951/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2020-06-15 17:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 14:54 [PATCH 1/3] drm/mm: remove unused rb_hole_size() Christian König
2020-06-15 14:54 ` [Intel-gfx] " Christian König
2020-06-15 14:54 ` [PATCH 2/3] drm/mm: optimize find_hole() as well Christian König
2020-06-15 14:54   ` [Intel-gfx] " Christian König
2020-06-15 16:54   ` Nirmoy
2020-06-15 16:54     ` [Intel-gfx] " Nirmoy
2020-06-15 14:54 ` [PATCH 3/3] drm/mm: cleanup and improve next_hole_*_addr() Christian König
2020-06-15 14:54   ` [Intel-gfx] " Christian König
2020-06-15 16:38   ` Nirmoy
2020-06-15 16:38     ` [Intel-gfx] " Nirmoy
2020-06-15 15:20 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/mm: remove unused rb_hole_size() Patchwork
2020-06-15 15:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-06-15 16:36 ` [PATCH 1/3] " Nirmoy
2020-06-15 16:36   ` [Intel-gfx] " Nirmoy
2020-06-15 17:30 ` [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/3] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.