[PATCH weston v2 0/68] Atomic modesetting, planes, extended drm_fb
Daniel Stone
daniel at fooishbar.org
Fri Dec 9 19:58:01 UTC 2016
Hi all,
This is v2 of the atomic patchset, which incorporates quite a few
fixups on the original code, and extends it far enough to flip
sprites_are_broken off for atomic. \o/
Compared to earlier versions, drm_output_state is introduced much
earlier, and everything hangs off this. This made a lot of things much
more clean than they used to be. Most of the patches before this are
relatively untouched, but for bugfixes.
The pixel-format helpers patch is new, after I got frustrated at
having to write yet another table of formats with validation. I'm
fully intending to convert gl-renderer over to using this for its SHM
upload path, but on the other hand I didn't want to tie that together
with this series; it's big enough as it is. (Similarly, for
multi-output you'll need the 'Assign new views to the primary plane'
patch I sent out earlier, separately.)
On top of the code from v1, which is primarily concerned with how we
apply state, v2 attacks how we _generate_ the state in the first
place. The major difference is the whittling down of the
prepare_*_view() functions into common helpers, and then cleaving
assign_planes() in two. Doing the latter allows us to actually
reasonably do atomic TEST_ONLY.
First we try to construct a view made entirely out of planes and
nothing else; if this succeeds, we just use that and we don't need to
render anything. Failing that, we try to incrementally build a state,
trying one view at a time on one plane at a time, and seeing if that
changes anything. Doing this is what lets us flip sprites_are_broken,
because we can not only generate an optimal configuration, but make
sure it'll actually work when we do it.
Included in with this is a set of patches which let us import more
exotic buffers: primarily multi-planar, and with buffers. The earlier
work means that this is now generalised, and we can use them for
scanout, overlay, or anything really.
After this, a set of optimisation patches to ignore views which aren't
on other outputs and occluded views. This prevents us from triggering
spurious repaints on multi-head systems.
At the end of this, on my multihead setup, I was able to set up one
fullscreen (but scaled, due to HiDPI) and one non-fullscreen view
above it. With nothing else on screen, these were promoted to planes
(scanout and overlay, respectively), and no rendering was done. When
something was moved on top of them, they moved back to GPU composition
where necessary.
Any review or testing would be appreciated; I have no idea when 1.13
is supposed to be (in 11 days ...?), so I assume it won't land for
then, but I'd like to get this in as early as possible for the 1.14
cycle, so we can iron out as many of the bugs as possible.
Many thanks to Fabien DESSENNE for testing and fixes, Tomohito Esaki
for the dmabuf-without-GBM patch, Derek Foreman and others for things
like cursor clipping (already fixed, but the reports were nice). And
of course, I somehow forgot to mention in my original mail - to Pekka
Paalanen, Louis-Francis Ratté-Boulianne and Derek Foreman, who worked
on much earlier iterations of atomic support.
Cheers,
Daniel
More information about the wayland-devel
mailing list