Skip to content

Conversation

@jmacnak
Copy link
Member

@jmacnak jmacnak commented Sep 2, 2025

Based off of @z-wen-z 's ag/25579081 and migrated from aosp/3173701

Bug: b/353330529
Test: bazel run cuttlefish/package:cvd -- create --host_substitutions=all
and interact with device at https://localhost:1443/

Based off of wenz@'s ag/25579081 and migrated from aosp/3173701

Bug: b/353330529
Test: bazel run cuttlefish/package:cvd -- create --host_substitutions=all
      and interact with device at https://localhost:1443/

if (dmabuf_plane.fd.ok()) {
buffer_drm_format = dmabuf->format;
buffer_stride_bytes = dmabuf_plane.stride;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here

@valentineburley
Copy link

We've been using this patch in our custom Cuttlefish builds for over a year now, and would very much like to see it merged.

It's been well tested in upstream Mesa CI since last year with our Venus + drm_hwc build, and this year with context-types=venus:cross-domain as well.


bool IsDmabufResource(struct wl_resource* resource) {
return wl_resource_instance_of(resource, &wl_buffer_interface,
&zwp_linux_dmabuf_v1_interface);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forwarded comment: 3rd argument should be buffer_implementation

uint32_t height = 0;
uint32_t format = 0;
uint32_t flags = 0;
DmabufParams* params;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forwarded comment: this should not be a pointer as the params accumulator "DmabufParams" object is destroyed right after the dmabuf is created.

buffer_drm_format = dmabuf->format;
buffer_stride_bytes = dmabuf_plane.stride;
buffer_size = buffer_h * buffer_stride_bytes;
auto mapped = mmap(nullptr, buffer_size, PROT_READ | PROT_WRITE,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forwarded comment: drop the PROT_WRITE, the dmabuf's being sent might be read only

@jmacnak
Copy link
Member Author

jmacnak commented Jan 16, 2026

Hi @valentineburley , I originally just posted this for sharing but it was pointed out that there are some existing issues with the current implementation in this PR. Could you confirm that the dma path was indeed actually being tested even with these issues?

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.

4 participants