File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -322,12 +322,6 @@ static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
322
322
return 0 ;
323
323
324
324
obj = new_state -> fb -> obj [0 ];
325
- if (obj -> import_attach ) {
326
- ret = virtio_gpu_prepare_imported_obj (plane , new_state , obj );
327
- if (ret )
328
- return ret ;
329
- }
330
-
331
325
if (bo -> dumb || obj -> import_attach ) {
332
326
vgplane_st -> fence = virtio_gpu_fence_alloc (vgdev ,
333
327
vgdev -> fence_drv .context ,
@@ -336,7 +330,21 @@ static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
336
330
return - ENOMEM ;
337
331
}
338
332
333
+ if (obj -> import_attach ) {
334
+ ret = virtio_gpu_prepare_imported_obj (plane , new_state , obj );
335
+ if (ret )
336
+ goto err_fence ;
337
+ }
338
+
339
339
return 0 ;
340
+
341
+ err_fence :
342
+ if (vgplane_st -> fence ) {
343
+ dma_fence_put (& vgplane_st -> fence -> f );
344
+ vgplane_st -> fence = NULL ;
345
+ }
346
+
347
+ return ret ;
340
348
}
341
349
342
350
static void virtio_gpu_cleanup_imported_obj (struct drm_gem_object * obj )
You can’t perform that action at this time.
0 commit comments