g2d_put_buffer(g2d_dev, layer->buffer_type,
layer->buffer, layer->num_buffers, dir);
+ if (layer->fence)
+ dma_fence_remove_callback(layer->fence, &layer->fence_cb);
dma_fence_put(layer->fence);
layer->buffer_type = G2D_BUFTYPE_NONE;
g2d_put_buffer(g2d_dev, layer->buffer_type, layer->buffer,
layer->num_buffers, DMA_TO_DEVICE);
err_buffer:
- dma_fence_put(layer->fence); /* fence_put() checkes NULL */
+ if (layer->fence)
+ dma_fence_remove_callback(layer->fence, &layer->fence_cb);
+ dma_fence_put(layer->fence); /* dma_fence_put() checkes NULL */
return ret;
}
g2d_put_buffer(g2d_dev, target->buffer_type, target->buffer,
target->num_buffers, DMA_FROM_DEVICE);
err_buffer:
- dma_fence_put(target->fence); /* fence_put() checkes NULL */
+ if (target->fence)
+ dma_fence_remove_callback(target->fence, &target->fence_cb);
+ dma_fence_put(target->fence); /* dma_fence_put() checkes NULL */
return ret;
}