<div dir="ltr"><div><div><div>Hi Russel,<br><br></div>I was able to identify and circumvent the root cause of the MMU faults. We had 4 MMU faults, it seems.<br></div>Each one for each of these conditions:<br>Nov  3 10:26:26 picolo xf86_armada[1271]: 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 10:26:26 picolo xf86_armada[1271]: 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 10:26:29 picolo xf86_armada[1271]: 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 10:26:32 picolo xf86_armada[1271]: B: clip[x1=0,y1=0], vSrc[w=1024,h=27], drawable[x=0,y=0], src_offset[x=0,y=0}<br><br></div>The modified etnaviv_render.c - etnaviv_acquire_src(...), that is able to circumvent the MMU faults and generate the above log is this one (changes in bold):<br>static struct etnaviv_pixmap *etnaviv_acquire_src(ScreenPtr pScreen,<br>    PicturePtr pict, const BoxRec *clip, PixmapPtr *ppPixTemp,<br>    xPoint *src_topleft, Bool force_vtemp)<br>{<br>    struct etnaviv *etnaviv = etnaviv_get_screen_priv(pScreen);<br>    struct etnaviv_pixmap *vSrc, *vTemp;<br>    struct etnaviv_blend_op copy_op;<br>    DrawablePtr drawable;<br>    uint32_t colour;<br>    xPoint src_offset;<br>    int tx, ty;<br><br>    if (etnaviv_pict_solid_argb(pict, &colour)) {<br>        vTemp = etnaviv_get_scratch_argb(pScreen, ppPixTemp,<br>                         clip->x2, clip->y2);<br>        if (!vTemp)<br>            return NULL;<br><br>        if (!etnaviv_fill_single(etnaviv, vTemp, clip, colour))<br>            return NULL;<br><br>        src_topleft->x = 0;<br>        src_topleft->y = 0;<br>        return vTemp;<br>    }<br><br>    drawable = pict->pDrawable;<br>    vSrc = etnaviv_drawable_offset(drawable, &src_offset);<br>    if (!vSrc)<br>        goto fallback;<br><br>    if (vSrc->width < clip->x2 || vSrc->height < clip->y2)<br>        goto fallback;<br><br>    etnaviv_set_format(vSrc, pict);<br>    if (!etnaviv_src_format_valid(etnaviv, vSrc->pict_format))<br>        goto fallback;<br><br>    if (!transform_is_integer_translation(pict->transform, &tx, &ty))<br>        goto fallback;<br><br>    if (picture_needs_repeat(pict, src_topleft->x + tx, src_topleft->y + ty,<br>                 clip->x2, clip->y2))<br>        goto fallback;<br><br><br><br>    src_topleft->x += drawable->x + src_offset.x + tx;<br>    src_topleft->y += drawable->y + src_offset.y + ty;<br>    if (force_vtemp) {<br>        goto copy_to_vtemp;<br>    }<br><br><b>    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>        goto fallback;<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>        goto fallback;<br>    }<br></b><br>    return vSrc;<br>   ...<br><div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 3, 2017 at 9:12 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Russell,<br><br></div>Great news! The issue we were getting with copyNtoN(...) is just a side effect of etnaviv_render.c - etnaviv_acquire_src().<br></div>The root cause of the MMU falts is etnaviv_render.c - etnaviv_acquire_src().<br><br></div>I have enabled copyNtoN(...), but made etnaviv_acquire_src(...) always go to fallback and now I am able to log into Ubuntu MATE without any MMU faults.</div><div>I will include debug logs and get back with them.<br></div><div><br> static struct etnaviv_pixmap *etnaviv_acquire_src(ScreenPtr pScreen,<br>        PicturePtr pict, const BoxRec *clip, PixmapPtr *ppPixTemp,<br>        xPoint *src_topleft, Bool force_vtemp)<br>{<br>        struct etnaviv *etnaviv = etnaviv_get_screen_priv(<wbr>pScreen);<br>        struct etnaviv_pixmap *vSrc, *vTemp;<br>        struct etnaviv_blend_op copy_op;<br>        DrawablePtr drawable;<br>        uint32_t colour;<br>        xPoint src_offset;<br>        int tx, ty;<br><br>        goto fallback;<br></div>        ...<br><div class="gmail_extra"><br></div><div class="gmail_extra">Luis<br></div><div><div class="h5"><div class="gmail_extra"><br></div></div></div></div></blockquote></div></div></div>