On 28/03/17 12:50 PM, zhoucm1 wrote: > On 2017å¹´03æ??28æ?¥ 10:40, Michel Dänzer wrote: >> On 27/03/17 04:53 PM, Zhou, David(ChunMing) wrote: >>> For APU special case, can we prevent eviction happening between VRAM >>> <----> GTT? >> We can, if we can close the performance gap between VRAM and GTT. We >> measured around 30% gap a while ago, though right now I'm only measuring >> ~5%, but the test system has slower RAM now (still dual channel though). > My impression VRAM and GTT have no much difference for APU case, if I'm > wrong, pls correct me. The Mesa patch below makes radeonsi use mostly GTT instead of mostly VRAM, and slows down Unigine Valley by about 5% on my desktop Kaveri. You can try it for yourself. diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index da6f0206d7..47661cab76 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -175,9 +175,11 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen, * placements even with a low amount of stolen VRAM. */ if (!rscreen->info.has_dedicated_vram && - (rscreen->info.drm_major < 3 || rscreen->info.drm_minor < 6) && - res->domains == RADEON_DOMAIN_VRAM) - res->domains = RADEON_DOMAIN_VRAM_GTT; + res->domains == RADEON_DOMAIN_VRAM && + !(res->b.b.bind & PIPE_BIND_SCANOUT)) { + res->domains = RADEON_DOMAIN_GTT; + res->flags |= RADEON_FLAG_GTT_WC; + } if (rscreen->debug_flags & DBG_NO_WC) res->flags &= ~RADEON_FLAG_GTT_WC; -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer