<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 8:30 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</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"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">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>Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">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></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></div></div></div></div></blockquote><div><br></div><div>Correction, we have two completely different concepts of "shadow fb" going on here. One is the shadow from miext/shadow that seems to cover the entire screen pixmap. The other shadow buffers, the ones used for rotation, should be per-crtc. These two concepts of shadow buffers are, as far as I can tell, completely seperate.<br><br></div><div>Given that I can't seem to figure out what miext/shadow does, I'm kind of at a loss. My best guess is that it effectively causes X to be double-buffered by rendering in the primary pixmap and blitting to the shadow for actual scan-out. That said, I'm not really sure. How should this interact with per-crtc rotation shadow buffers? I have no idea.<br><br>Also, the xf86-video-intel driver doesn't use it at all, so my go-to example isn't helping. A little help here?<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>This patch series just keeps getting longer...<br></div><span class=""><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" target="_blank">keithp@keithp.com</a>><br>
<span><font color="#888888"><br>
--<br>
-keith<br>
</font></span></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>