File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,7 @@ static bool InitializeBlitter(BufferInfo &bi) {
272
272
}
273
273
274
274
void HwcLayer::ImportFb () {
275
+ FILE * fBlit ;
275
276
if (!IsLayerUsableAsDevice () || !buffer_handle_updated_) {
276
277
return ;
277
278
}
@@ -301,10 +302,14 @@ void HwcLayer::ImportFb() {
301
302
is_pixel_blend_mode_supported = false ;
302
303
303
304
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" &&
305
308
!allow_p2p_ && (intel_dgpu_fd () >= 0 ) &&
306
309
!virtio_gpu_allow_p2p (kms_fd) && InitializeBlitter (layer_data_.bi .value ());
307
310
layer_data_.bi ->use_shadow_fds = use_shadow_fds;
311
+ if (fBlit )
312
+ fclose (fBlit );
308
313
309
314
if (allow_p2p_) {
310
315
for (int fd: layer_data_.bi ->prime_fds ) {
You can’t perform that action at this time.
0 commit comments