<div dir="ltr"><div>So this is what I get with picture desc on the candidate corner cases:<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: Pict: 0x20e45a8: 32 (1024x768+0+0) R fmt XRGB8888<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: Pict: 0x20f4370: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: Pict: 0x1dfba58: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: Pict: 0x20e45a8: 32 (1024x768+0+0) R fmt XRGB8888<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: Pict: 0x20f4370: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:04 picolo xf86_armada[786]: A: Pict: 0x1dfba58: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:08 picolo xf86_armada[786]: B: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:08 picolo xf86_armada[786]: B: Pict: 0x1dfba58: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:08 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:08 picolo xf86_armada[786]: A: Pict: 0x20e45a8: 32 (1024x768+0+0) R fmt XRGB8888<br>Nov 3 11:57:08 picolo xf86_armada[786]: A: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:08 picolo xf86_armada[786]: A: Pict: 0x20f4370: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: Pict: 0x20e45a8: 32 (1024x768+0+0) R fmt XRGB8888<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: Pict: 0x20f4370: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: Pict: 0x20e45a8: 32 (1024x768+0+0) R fmt XRGB8888<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:11 picolo xf86_armada[786]: B: Pict: 0x20f4370: 32 (1024x768+0+0) fmt XRGB8888<br>Nov 3 11:57:13 picolo xf86_armada[786]: B: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:13 picolo xf86_armada[786]: B: Pict: 0x20e45a8: 32 (1024x768+0+0) R fmt XRGB8888<br>Nov 3 11:57:13 picolo xf86_armada[786]: B: clip[x1=0,y1=0], vSrc[w=1024,h=768], drawable[x=0,y=0], src_offset[x=0,y=0}<br>Nov 3 11:57:13 picolo xf86_armada[786]: B: Pict: 0x20f4370: 32 (1024x768+0+0) fmt XRGB8888<br><br></div>The debug code is now:<br> if (clip->x2 == 1024 && clip->y2 == 24) {<br> syslog(LOG_ERR, "A: clip[x1=%d,y1=%d], vSrc[w=%d,h=%d], drawable[x=%d,y=%d], src_offset[x=%d,y=%d}\n", <br> clip->x1, clip->y1, vSrc->width, vSrc->height, drawable->x, drawable->y, src_offset.x, src_offset.y);<br> if (vSrc->height == 768) {<br> char src_buf[80];<br><br> syslog(LOG_ERR,<br> "A: Pict: %s\n",<br> picture_desc(pict, src_buf, sizeof(src_buf)));<br><br> goto fallback;<br> }<br> }<br><br> if (clip->x2 == 1024 && clip->y2 == 27) {<br> syslog(LOG_ERR, "B: clip[x1=%d,y1=%d], vSrc[w=%d,h=%d], drawable[x=%d,y=%d], src_offset[x=%d,y=%d}\n", <br> clip->x1, clip->y1, vSrc->width, vSrc->height, drawable->x, drawable->y, src_offset.x, src_offset.y);<br> if (vSrc->height == 768) {<br> char src_buf[80];<br><br> syslog(LOG_ERR,<br> "B: Pict: %s\n",<br> picture_desc(pict, src_buf, sizeof(src_buf)));<br> goto fallback;<br> }<br> }<br><br> return vSrc;<br><br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 3, 2017 at 11:43 AM, Luís Mendes <span dir="ltr"><<a href="mailto:luis.p.mendes@gmail.com" target="_blank">luis.p.mendes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Sorry for misspelling your name, Russell, wasn't on purpose.<br><br></div>Regarding what you said, the above code is correct, it is not the copy_to_vtemp branch that is causing the MMU faults or screen corruption, but rather when the code of etnaviv_aquire_src(...) runs to the end, returning vSrc.<br></div>For some reason the kernel dump wasn't capturing the correct failure source. Possibly the MMU faults occur a bit after when another operation is being started, I don't know.<br></div>I just can say for sure that the above code does circumvent all the MMU faults I am getting with Ubuntu MATE at 1024x768.<br><br></div>I will try to add the picture_desc() helper for us to get more details regarding the source of the MMU fault condition, will get back soon.<br><br></div>I've refined the code circumvent to this one:<span class="gmail-"><br><span class="gmail-m_8737982179069643065gmail-im"> if (clip->x2 == 1024 && clip->y2 == 24) {<br> syslog(LOG_ERR, "A: clip[x1=%d,y1=%d], vSrc[w=%d,h=%d], drawable[x=%d,y=%d], src_offset[x=%d,y=%d}\n", <br>
clip->x1, clip->y1, vSrc->width, vSrc->height,
drawable->x, drawable->y, src_offset.x, src_offset.y);<br></span></span><span class="gmail-"> if (vSrc->height == 768) {</span><span class="gmail-"><span class="gmail-m_8737982179069643065gmail-im"><br> goto fallback;<br> }<br> }<br><br> if (clip->x2 == 1024 && clip->y2 == 27) {<br> syslog(LOG_ERR, "B: clip[x1=%d,y1=%d], vSrc[w=%d,h=%d], drawable[x=%d,y=%d], src_offset[x=%d,y=%d}\n", <br>
clip->x1, clip->y1, vSrc->width, vSrc->height,
drawable->x, drawable->y, src_offset.x, src_offset.y);<br></span></span><span class="gmail-"> if (vSrc->height == 768) {<br> goto fallback;<br> }<br> }<div><div><div><div><br></div></div></div></div></span><div><div class="gmail-h5"><div class="gmail_extra"><br></div></div></div></div></blockquote></div></div></div></div></div></div>