Skip to content

Commit 96b7a78

Browse files
author
ZhuChenyanX
committed
Add cfg file for control blit
Tracked-On: OAM-132135 Signed-off-by: ZhuChenyanX <[email protected]>
1 parent ee61189 commit 96b7a78

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hwc2_device/HwcLayer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ static bool InitializeBlitter(BufferInfo &bi) {
272272
}
273273

274274
void HwcLayer::ImportFb() {
275+
FILE * fBlit;
275276
if (!IsLayerUsableAsDevice() || !buffer_handle_updated_) {
276277
return;
277278
}
@@ -301,10 +302,14 @@ void HwcLayer::ImportFb() {
301302
is_pixel_blend_mode_supported = false;
302303

303304
int kms_fd = parent_->GetPipe().device->GetFd();
304-
bool use_shadow_fds = parent_->GetPipe().device->GetName() == "virtio_gpu" &&
305+
306+
fBlit = fopen("/vendor/etc/dgpu-blit.cfg", "r");
307+
bool use_shadow_fds = fBlit && parent_->GetPipe().device->GetName() == "virtio_gpu" &&
305308
!allow_p2p_ && (intel_dgpu_fd() >= 0) &&
306309
!virtio_gpu_allow_p2p(kms_fd) && InitializeBlitter(layer_data_.bi.value());
307310
layer_data_.bi->use_shadow_fds = use_shadow_fds;
311+
if (fBlit)
312+
fclose(fBlit);
308313

309314
if (allow_p2p_) {
310315
for (int fd: layer_data_.bi->prime_fds) {

0 commit comments

Comments
 (0)