<div dir="auto">Yeah I don't have an answer to that. I think it's better to pageflip than blit. Can Wayland reallocate the buffer to make it displayable? If not, it may be better to create displayable buffers always.<div dir="auto"><br></div><div dir="auto">Marek</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Oct 4, 2017 12:48 PM, "Daniel Stone" <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Marek,<br>
<br>
On 3 October 2017 at 17:00, Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>> wrote:<br>
> On Mon, Oct 2, 2017 at 8:09 PM, Daniel Stone <<a href="mailto:daniel@fooishbar.org">daniel@fooishbar.org</a>> wrote:<br>
>> Perhaps unsurprisingly, adding __DRI_IMAGE_USE_SCANOUT to<br>
>> src/egl/drivers/dri2/platform_<wbr>wayland.c in the createImage() fallback<br>
>> path (i.e. not createImageWithModifiers) fixes things. That being<br>
>> said, Weston does do the GBM BO import with the scanout flag, which<br>
>> will call the DRIImage's validateUsage() hook with the SCANOUT bit<br>
>> set; for now, it should be enough to just detect that the image is not<br>
>> scanout-compatible in radeonsi's validateUsage() hook, rejecting the<br>
>> import which will make Weston fall back to GLES composition.<br>
>><br>
>> That being said, st/dri's dri2_validate_usage() doesn't really fill me<br>
>> with too much confidence.<br>
><br>
> We don't really validate flags during DMABUF import. The idea is that<br>
> all clients should know the flags since buffer creation, and have no<br>
> reason to pass different flags during the import.<br>
<br>
In that case, I guess the only option is to just make Gallium's dri2<br>
st pass PIPE_USAGE_SCANOUT to every winsys allocation. This pessimises<br>
allocation and disqualifies tiling/etc modes for buffers which can<br>
never be scanout, but if there can be no validation (and thus we can't<br>
reject a compositor which wishes to start using a client buffer for<br>
scanout), then it's the only other option. Either that or just fail<br>
every gbm_bo_import for scanout on Gallium.<br>
<br>
Cheers,<br>
Daniel<br>
</blockquote></div></div>