diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-17 10:00:42 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-17 10:00:42 +1100 |
commit | ec144a81ade915b5b38adedf10e84690813ed768 (patch) | |
tree | c94b53c971ab2c39e27433267318b3c7bc86ff1b /drivers/gpu/drm/drm_mm.c | |
parent | b919ee827e048826786fd7e889a2b04f63382fe6 (diff) | |
parent | 88626272549b94310975932a9970d11a9b362a16 (diff) | |
download | blackbird-obmc-linux-ec144a81ade915b5b38adedf10e84690813ed768.tar.gz blackbird-obmc-linux-ec144a81ade915b5b38adedf10e84690813ed768.zip |
Merge commit 'origin/master' into next
Diffstat (limited to 'drivers/gpu/drm/drm_mm.c')
-rw-r--r-- | drivers/gpu/drm/drm_mm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index cdec32977129..2ac074c8f5d2 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -405,7 +405,8 @@ struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm, wasted += alignment - tmp; } - if (entry->size >= size + wasted) { + if (entry->size >= size + wasted && + (entry->start + wasted + size) <= end) { if (!best_match) return entry; if (entry->size < best_size) { |