<div dir="ltr">Should this code be able to handle drm 4.0.0?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-26 17:04 GMT+01:00 Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
<br>
---<br>
src/gallium/drivers/radeon/<wbr>r600_buffer_common.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/gallium/drivers/radeon/<wbr>r600_buffer_common.c b/src/gallium/drivers/radeon/<wbr>r600_buffer_common.c<br>
index c6f4d0d..da6f020 100644<br>
--- a/src/gallium/drivers/radeon/<wbr>r600_buffer_common.c<br>
+++ b/src/gallium/drivers/radeon/<wbr>r600_buffer_common.c<br>
@@ -163,22 +163,26 @@ void r600_init_resource_fields(<wbr>struct r600_common_screen *rscreen,<br>
!rtex->surface.is_linear) {<br>
res->domains = RADEON_DOMAIN_VRAM;<br>
res->flags &= ~RADEON_FLAG_CPU_ACCESS;<br>
res->flags |= RADEON_FLAG_NO_CPU_ACCESS |<br>
RADEON_FLAG_GTT_WC;<br>
}<br>
<br>
/* If VRAM is just stolen system memory, allow both VRAM and<br>
* GTT, whichever has free space. If a buffer is evicted from<br>
* VRAM to GTT, it will stay there.<br>
+ *<br>
+ * DRM 3.6.0 has good BO move throttling, so we can allow VRAM-only<br>
+ * placements even with a low amount of stolen VRAM.<br>
*/<br>
if (!rscreen->info.has_dedicated_<wbr>vram &&<br>
+ (rscreen->info.drm_major < 3 || rscreen->info.drm_minor < 6) &&<br>
res->domains == RADEON_DOMAIN_VRAM)<br>
res->domains = RADEON_DOMAIN_VRAM_GTT;<br>
<br>
if (rscreen->debug_flags & DBG_NO_WC)<br>
res->flags &= ~RADEON_FLAG_GTT_WC;<br>
<br>
/* Set expected VRAM and GART usage for the buffer. */<br>
res->vram_usage = 0;<br>
res->gart_usage = 0;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>