drm/ttm: Don't evict BOs outside of the requested placement range
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 9 Oct 2014 06:02:59 +0000 (15:02 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Oct 2014 22:34:08 +0000 (18:34 -0400)
commite300180f71037fd9ed1ca967006fd9f3ee466bcd
tree75d6ebc93299bac9e636611d77f59e512f35f9ab
parent9ace2ef7b78e573cedead0f08052b028181e6eaf
drm/ttm: Don't evict BOs outside of the requested placement range

The radeon driver uses placement range restrictions for several reasons,
in particular to make sure BOs in VRAM can be accessed by the CPU, e.g.
during a page fault.

Without this change, TTM could evict other BOs while trying to satisfy
the requested placement, even if the evicted BOs were outside of the
requested placement range. Doing so didn't free up any space in the
requested placement range, so the (potentially high) eviction cost was
incurred for no benefit.

Nominating for stable because radeon driver changes in 3.17 made this
much more noticeable than before.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84662
Cc: stable@vger.kernel.org
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_bo.c