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

Atomic KMS: enable bypass #3595

Open
wants to merge 9 commits into
base: initial-atomic-kms-platform
Choose a base branch
from

Conversation

tarek-y-ismail
Copy link
Contributor

Apologies for the general suckiness of the code, will improve that once it actually works.

@tarek-y-ismail tarek-y-ismail self-assigned this Sep 11, 2024

for (std::size_t i = 0; i < std::min(4zu, plane_descriptors.size()); i++)
{
bo_handles[i] = plane_descriptors[i].dma_buf;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is where the problem lies; drmModeAddFB2 expects GEM handles, and you're giving it dmabuf file descriptors.

Here is the necessary DRM API for converting the two, along with an ominous warning about the sharp edges of that API.

Since I think we share the underlying FD with the RenderingPlatform (and so with EGL etc), I think we'll need to do the “everything goes through gbm” route. That means going through gbm_bo_import (with type = GBM_BO_IMPORT_FD_MODIFIER and flags = GBM_BO_USE_SCANOUT) and then pulling all the GEM handles out with gbm_bo_get_handle_for_plane (and then handling the lifetime of the gbm_bo, keeping a track of it, and destroying it when necessary)

@RAOF RAOF force-pushed the initial-atomic-kms-platform branch from d172bfa to 6e64d62 Compare September 12, 2024 07:48
@tarek-y-ismail tarek-y-ismail force-pushed the atomic-kms-enable-bypass branch 3 times, most recently from eeec45a to 3bd9e74 Compare September 13, 2024 06:55
@tarek-y-ismail tarek-y-ismail marked this pull request as ready for review September 13, 2024 12:09
@tarek-y-ismail tarek-y-ismail requested a review from a team as a code owner September 13, 2024 12:09
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.

3 participants