Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion hwc2_device/HwcLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ static bool InitializeBlitter(BufferInfo &bi) {
}

void HwcLayer::ImportFb() {
FILE * fBlit;
if (!IsLayerUsableAsDevice() || !buffer_handle_updated_) {
return;
}
Expand Down Expand Up @@ -301,10 +302,14 @@ void HwcLayer::ImportFb() {
is_pixel_blend_mode_supported = false;

int kms_fd = parent_->GetPipe().device->GetFd();
bool use_shadow_fds = parent_->GetPipe().device->GetName() == "virtio_gpu" &&

fBlit = fopen("/vendor/etc/dgpu-blit.cfg", "r");
bool use_shadow_fds = fBlit && parent_->GetPipe().device->GetName() == "virtio_gpu" &&
!allow_p2p_ && (intel_dgpu_fd() >= 0) &&
!virtio_gpu_allow_p2p(kms_fd) && InitializeBlitter(layer_data_.bi.value());
layer_data_.bi->use_shadow_fds = use_shadow_fds;
if (fBlit)
fclose(fBlit);

if (allow_p2p_) {
for (int fd: layer_data_.bi->prime_fds) {
Expand Down