Skip to content

Commit

Permalink
drm/mm: fix logic for selection of best fit block
Browse files Browse the repository at this point in the history
This is from bug 25728.

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

Acked-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Bob Gleitsmann authored and Dave Airlie committed Dec 23, 2009
1 parent 7a73ba7 commit e2108eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e2108eb

Please sign in to comment.