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) {
272272}
273273
274274void 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 ) {
You can’t perform that action at this time.
0 commit comments