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

Port patches from u/mr0/master to main branch #115

Merged
merged 11 commits into from
Apr 2, 2025

Conversation

phreer
Copy link
Contributor

@phreer phreer commented Mar 26, 2025

No description provided.

@sysopenci
Copy link

Program name for this pr is not compatable with other dependent prs, for more details please check tracked_on

@sysopenci
Copy link

Improper Commit Message
Valid Commit Message
Improper Jira Status,
jira status not in ['In Progress','Implemented']

HaihongxLi and others added 3 commits March 26, 2025 09:30
Additionally need read VIRTGPU_PARAM_RESOURCE_BLOB.

Tracked-On: OAM-129380
Signed-off-by: lihaihong <[email protected]>
..., otherwise we are supposed to do atomic commit in this frame and the
sleep is just a waste of time.

Tracked-On: OAM-128362
Signed-off-by: Weifeng Liu <[email protected]>
Add hw min/max resolution support check for device
composition.

Test-done:
    Android boot and gfxbench tested

Tracked-On: OAM-128410
Signed-off-by: Jia, Lin A <[email protected]>
@sysopenci
Copy link

Improper Commit Message
Valid Commit Message
Improper Jira Status,
jira status not in ['In Progress','Implemented']

phreer added 3 commits March 27, 2025 01:48
Background: To get best performance we must guarantee that scan-out
buffers used for composition in surfaceflinger reside in GPU local
memory, but importing these buffers into virtio-GPU will migrate the
buffers from local memory to system memory, which will highly impact the
performance.

To avoid migration of these client-composited buffers, allocate a shadow
buffer for each of them and import the shadow buffers into virtio-GPU
for scanning-out. Right before atomic commit, leverage GPU blit engine
to copy content to shadow buffer.

Use shadow buffers only when feature ALLOW_P2P of virtio-GPU is not present
and dGPU exists.

There are several GPU instructions to blit memory:
- XY_FAST_COPY_BLT (BSpec: 47982),
- XY_SRC_COPY_BLT (BSpec: 48002),
- XY_BLOCK_COPY_BLT (BSpec: 3678).
By experiment, XY_FAST_COPY is much faster than the other two instructions.

Add class IntelBlitter to manage blitter resource, this makes the code
more robust and readable.

Open new fd for every blit context to avoid blocking the user space when
copying multiple layers.

Tracked-On: OAM-124505
Signed-off-by: Weifeng Liu <[email protected]>
Tracked-On: OAM-124505
Signed-off-by: lihaihong <[email protected]>
* Save first shadow buffer handle and fd for destroying.
* Make i915_device local to avoid race condition.

Tracked-On: OAM-129252
Signed-off-by: Weifeng Liu <[email protected]>
@sysopenci
Copy link

Improper Commit Message
Valid Commit Message
Improper Jira Status,
jira status not in ['In Progress','Implemented']

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

phreer added 3 commits April 1, 2025 05:06
Add a flag to the HwcLayer which will be set when the layer is allowed to be
shared as local memory objects without migrating to system memory, primarily
used in the case that the layer is to be displayed on dGPU. If this flag is
enabled, we will set the DMA BUF name to "p2p" via DMA_BUF_SET_NAME ioctl. The
name acts as a hint in the KMD for local memory sharing.

This feature cannot be achieved without the help from virtio-GPU KMD: now
virtio-GPU will expose a bit mask (queried by ALLOW_P2P parameter) indicating
whether local memory sharing is allowed for each scan-out.

Change log:
- v2: combine commit "Avoid dereferencing null pointer in headless mode"

Tracked-On: OAM-129252
Signed-off-by: Weifeng Liu <[email protected]>
In current implementation, blitting happens in dGPU (PF) pass-through mode,
which is not what we want.

Tracked-On: OAM-130009
Signed-off-by: Weifeng Liu <[email protected]>
Tracked-On: OAM-130974
Signed-off-by: Weifeng Liu <[email protected]>
phreer added 2 commits April 1, 2025 05:06
No logic is changed in this commit.

Tracked-On: OAM-130974
Signed-off-by: Weifeng Liu <[email protected]>
virtio-GPU on PCI bus with
* vendor id 0x1af4
* device id 0x1110
* subvendor id 0x8086
* subdevice id 0x201
is reserved for usage in Linux in Container (LIC). Skip this device when
creating drm devices.

Tracked-On: OAM-131266
Signed-off-by: Weifeng Liu <[email protected]>
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 Engineering Build for this issue ,Please check the linked Tracked-On issue/Android CI Web for more details.

@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 the Engineering Build Successful Engineering Build Successful label Apr 1, 2025
@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 4e4e8c9 into projectceladon:main Apr 2, 2025
13 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-merge/1114

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