-
Notifications
You must be signed in to change notification settings - Fork 12
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
DemiMarie
wants to merge
48
commits into
talex5:master
Choose a base branch
from
DemiMarie:unbox-untag
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
dmabuf support #91
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4ef2d66
to
a11fa61
Compare
0175db1
to
95a67e3
Compare
ca37e17
to
106b4fb
Compare
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.
ce56c0b
to
55b2181
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.