Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dmabuf support #91

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

dmabuf support #91

wants to merge 48 commits into from

Conversation

DemiMarie
Copy link

This is sufficient for Chromium to render real-world pages. It requires talex5/ocaml-wayland#46 for both new APIs and new protocols.

This does not work when VirGL is in use, but I believe this is actually a fairly recent Mesa regression, not a bug in wayland-proxy-virtwl. Virtio-GPU native contexts should work fine, though I have not tested them.

@DemiMarie DemiMarie force-pushed the unbox-untag branch 2 times, most recently from 4ef2d66 to a11fa61 Compare August 29, 2024 01:20
@DemiMarie DemiMarie force-pushed the unbox-untag branch 3 times, most recently from 0175db1 to 95a67e3 Compare September 8, 2024 21:06
@DemiMarie DemiMarie force-pushed the unbox-untag branch 3 times, most recently from ca37e17 to 106b4fb Compare September 18, 2024 21:08
Previously a bad LISTEN_FDS might cause a crash.
Vim complained about non-escaped underscores outside of backticks.
If the host supports dmabuf, assume that video memory is supported.
This doesn't actually work yet.  Also, it automatically replaces all
dev_t values in the protocol with the one for the virtio-GPU device.
This is more like what is used elsewhere in the file.
It needs that information to properly allocate buffers.
This serves to protect the host compositor from malicious guests.
This requires a ChromeOS-specific guest kernel patch.
This uses the recent changes to ocaml-wayland to properly disconnect
clients that violate the Wayland protocol.
This adds logging of protocol errors.
Otherwise all calls to zwp_linux_buffer_params_v1.create or
zwp_linux_buffer_params_v1.create_immed would disconnect the
client with a zwp_linux_buffer_params_v1.incomplete error.
Brings a better warning message.
It is almost always wrong.
instead of throwing an exception.

The errors are not very helpful, but fixing this would require either
ensuring that object IDs match or maintaining an object ID map.
This helped track down a commit (now force-pushed over) that completely
broke message ID handling.
Pulls in improvements to message handling, such as enum validation and
proper length validation.
This pulls in fixes for problems discovered with Sommelier in a QEMU/Xen
guest.
Pulls in logging fix.
This encourages validating untrusted input instead of passing it to
the server without any validation.  This is critical for preventing
security vulnerabilities in compositors (which are usually written in
C or C++) from being exploited.
Many compositors get this wrong.  This uses the Linux kernel functions,
which get it right.  Multi-plane formats are currently not allowed, as
they have unclear semantics.
No functional change intended.
Do not fail an assertion.
Previously some of them would trip assertions or otherwise misbehave.
Previously negative and zero values were forbidden and an error caused
an assertion failure.
This validates all parameters to shared memory buffers, whether direct
or indirect mappings are used.
Mesa always makes a sequence of calls to Zwp_linux_buffer_params_v1.add,
followed by a single call to Zwp_linux_buffer_params_v1.create_immed.
To avoid confusing servers, ensure that the proxy always follows this
pattern, no matter what clients do.
Also reformat the C code.
No functional change intended.
Also fix up Emacs file-local variables.
Hopefully this works
This unbreaks the opam build, which doesn't run "make".
It turns out that konsole sends parameters that get rejected.
Previously the old (smaller) value was used.
This is required by the spec.
The actual work is done in C, which can make system calls better than
OCaml can.
Disconnect the client with a Wl_display.bad_implementation error
instead.
Most importantly, this commit adds missing files needed so that the repo
can actually be built.  Also, it adds validation of shared memory
formats so clients do not get disconnected because the compositor told
them they could use a format, but the proxy can't handle the format.
Avoids a linear search over the format table and spamming the logs
during build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant