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

drm/virtio: Ensure lmem objects are used for dGPU backing CRTC #98

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

phreer
Copy link

@phreer phreer commented Jan 21, 2025

Use atomic check hook to ensure the framebuffers we are going to set satisfy the requirement for dGPU.

#define I915_AG_DMABUF_ATTACHMENT_CURRENT_VERSION (1)
#define I915_AG_DMABUF_ATTACHMENT_LMEM (1lu << 0)

struct i915_ag_dmabuf_attachment_priv {

Choose a reason for hiding this comment

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

please help add some description for the purpose of this new structure

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. This definition in multiple places is easy to cause issues due to out of sync in different place.
  2. dirty work to make things work , please explore a solution in drm and dma-buf framework level to achieve the goal.

Copy link
Author

Choose a reason for hiding this comment

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

  1. This definition in multiple places is easy to cause issues due to out of sync in different place.

This is the reason why I added the version field to the shared structure. This ensures that any modifications to the structure require an increment of the version number, allowing both components to adhere to the same protocol consistently.

  1. dirty work to make things work , please explore a solution in drm and dma-buf framework level to achieve the goal.

Then modification to the DMA-BUF framework is inevitable. Actually, I've explored to solve this in the framework level. For example, we can add a bool member in the dmabuf attachment to indicate residence of the buffer, or more generally, add a shared_priv field to facilitate sharing metadata between the importer and exporter.

However, I believe this feature is too specific to our drivers to warrant such changes at the framework level. The fields we would introduce, in either approach, would hold significance only for our particular use case, making them an unnecessary generalization and potential overdesign. For this reason, I ultimately decided against exposing our implementation at the framework level.

Copy link
Contributor

@xzhan34 xzhan34 Feb 10, 2025

Choose a reason for hiding this comment

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

I don't think make a framework change is an overdesign even this is a specific for intel platform for a specific use case. for example, if we switch to use xe driver, this solution can't work at all. we need to change this code again to deal with xe driver case.

Copy link

@feijiang1 feijiang1 left a comment

Choose a reason for hiding this comment

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

LGTM

@sysopenci
Copy link

FAILURE: Android CI has completed Engineering Build for this issue.Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci sysopenci added Engineering Build Failed and removed Engineering Build Not Started Engineering Build Not Started labels Feb 24, 2025
@sysopenci
Copy link

SUCCESS: Android CI has completed Engineering Build for this issue.Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci sysopenci added Engineering Build Successful Engineering Build Successful and removed Engineering Build Failed labels Feb 24, 2025
Copy link

@feijiang1 feijiang1 left a comment

Choose a reason for hiding this comment

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

LGTM

@sysopenci
Copy link

Android CI has started MERGE Build for this pr ,Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci sysopenci merged commit 45751b1 into projectceladon:celadon/u/mr0/master Feb 25, 2025
29 checks passed
@sysopenci
Copy link

Android CI has completed MERGE Build for this pr, build is SUCCESS. Please check the linked Tracked-On issue/Android CI Web for more details. For Binaries: /cactus-absp-or-local/celadon_umr0_master-merge/424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants