<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 2:10 PM, Keith Packard <span dir="ltr"><<a href="mailto:keithp@keithp.com" target="_blank">keithp@keithp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> writes:<br>
<br>
> +    old_shadow = drmmode->shadow_bo;<br>
><br>
>      if (!drmmode_create_bo(drmmode, &drmmode->front_bo,<br>
>                             width, height, scrn->bitsPerPixel))<br>
> @@ -1218,13 +1219,9 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)<br>
>      }<br>
><br>
>      if (drmmode->shadow_enable) {<br>
> -        uint32_t size = scrn->displayWidth * scrn->virtualY *<br>
> -            ((scrn->bitsPerPixel + 7) >> 3);<br>
> -        new_pixels = calloc(1, size);<br>
> -        if (new_pixels == NULL)<br>
> +        if (!drmmode_create_bo(drmmode, &drmmode->shadow_bo,<br>
> +                               width, height, scrn->bitsPerPixel))<br>
>              goto fail;<br>
> -        free(drmmode->shadow_fb);<br>
> -        drmmode->shadow_fb = new_pixels;<br>
>      }<br>
<br>
</span>I don't see the old shadow_bo getting freed anywhere; did I miss<br>
something?<br></blockquote><div><br></div><div>The real answer is that, as far as I can tell, this code shouldn't be touching the shadow and the shadow shouldn't be in the drmmode structure at all.  Unless I'm competely missing everything, shadows should be per-crtc.  If that's correct, then the modesetting driver's shadow handling is just completely bogus.  I'm reworking things again.<br><br></div><div>This patch series just keeps getting longer...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The rest of this patch looks good and is<br>
<br>
Reviewed-by: Keith Packard <<a href="mailto:keithp@keithp.com">keithp@keithp.com</a>><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
-keith<br>
</font></span></blockquote></div><br></div></div>