<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 23, 2017 at 10:21 PM, Ben Widawsky <span dir="ltr"><<a href="mailto:ben@bwidawsk.net" target="_blank">ben@bwidawsk.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch shouldn't actually do anything because the libdrm function<br>
should already do this alignment. However, it preps us for a future<br>
patch where we add in the CCS AUX size, and in the process it serves as<br>
a good place to find bisectable issues if libdrm or kernel does<br>
something incorrectly.<br>
<br>
Signed-off-by: Ben Widawsky <<a href="mailto:ben@bwidawsk.net">ben@bwidawsk.net</a>><br>
Acked-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/<wbr>intel_screen.c | 5 ++++-<br>
1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
index 451c5ccf4e..8ec33ce5df 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
@@ -606,14 +606,17 @@ create_image_with_modifier(<wbr>struct intel_screen *screen,<br>
{<br>
uint32_t requested_tiling = 0, tiling = I915_TILING_X;<br>
unsigned long pitch;<br>
+ unsigned tiled_height = 0;<br>
<br>
switch (modifier) {<br>
case I915_FORMAT_MOD_Y_TILED:<br>
requested_tiling = tiling = I915_TILING_Y;<br>
+ tiled_height = ALIGN(height, 32);<br>
break;<br>
case I915_FORMAT_MOD_X_TILED:<br>
assert(tiling == I915_TILING_X);<br>
requested_tiling = tiling = I915_TILING_X;<br>
+ tiled_height = height;<br></blockquote><div><br></div><div>Align to 8?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
break;<br>
case DRM_FORMAT_MOD_LINEAR: </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
requested_tiling = tiling = I915_TILING_NONE;<br></blockquote><div><br></div><div>tiled_height == 0 here. I don't think that was intended.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
@@ -626,7 +629,7 @@ create_image_with_modifier(<wbr>struct intel_screen *screen,<br>
}<br>
<br>
image->bo = drm_intel_bo_alloc_tiled(<wbr>screen->bufmgr, "image+mod",<br>
- width, height, cpp, &tiling,<br>
+ width, tiled_height, cpp, &tiling,<br>
&pitch, 0);<br>
if (image->bo == NULL)<br>
return false;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.0<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></div>