Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2108eb1 authored by Bob Gleitsmann's avatar Bob Gleitsmann Committed by Dave Airlie
Browse files

drm/mm: fix logic for selection of best fit block



This is from bug 25728.

[airlied: I'm just forwarding the patch for review, Thomas, ickle?]

Acked-by: default avatarJerome Glisse <jglisse@redhat.com>
Acked-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 7a73ba74
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -358,7 +358,7 @@ struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm,
		if (entry->size >= size + wasted) {
			if (!best_match)
				return entry;
			if (size < best_size) {
			if (entry->size < best_size) {
				best = entry;
				best_size = entry->size;
			}
@@ -408,7 +408,7 @@ struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm,
		if (entry->size >= size + wasted) {
			if (!best_match)
				return entry;
			if (size < best_size) {
			if (entry->size < best_size) {
				best = entry;
				best_size = entry->size;
			}