Hi Laurent,

On 04/17/2012 02:57 AM, Laurent Pinchart wrote:
> Hi Tomasz,
> 
> Thanks for the patch.
> 
> On Friday 13 April 2012 17:47:53 Tomasz Stanislawski wrote:
>> From: Sumit Semwal <sumit.sem...@ti.com>
>>
>> This patch makes changes for adding dma-contig as a dma_buf user. It
>> provides function implementations for the {attach, detach, map,
>> unmap}_dmabuf() mem_ops of DMABUF memory type.
>>
>> Signed-off-by: Sumit Semwal <sumit.sem...@ti.com>
>> Signed-off-by: Sumit Semwal <sumit.sem...@linaro.org>
>>      [author of the original patch]
>> Signed-off-by: Tomasz Stanislawski <t.stanisl...@samsung.com>
>>      [integration with refactored dma-contig allocator]
> 
> Pending the comment below,
> 
> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
> 
>> +static void vb2_dc_detach_dmabuf(void *mem_priv)
>> +{
>> +    struct vb2_dc_buf *buf = mem_priv;
>> +
>> +    if (WARN_ON(buf->dma_addr))
>> +            vb2_dc_unmap_dmabuf(buf);
> 
> This should never happen, and would be a videobuf2 bug otherwise, right ?
> 

Theoretically it should not happen with latest vb2-core patches.
However there is little sense to crash the kernel if it is possible
to handle this bug. Maybe I should add some comments before the check.

>> +
>> +    /* detach this attachment */
>> +    dma_buf_detach(buf->db_attach->dmabuf, buf->db_attach);
>> +    kfree(buf);
>> +}
> 

Regards,
Tomasz Stanislawski
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to