[lkml]   [2013]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v4 1/3] videobuf2-dma-contig: user can specify GFP flags
> Ok, then I would simply pass the flags from the driver without any
> alternation
> in the allocator itself, so drivers can pass 'GFP_KERNEL' or
> 'GFP_KERNEL | GFP_DMA' depending on their preference. Please also update
> all
> the existing clients of vb2_dma_dc allocator.

I taked a look at drivers that use dma-contig. They use the structure
vb2_alloc_ctx which is just a name, there is not a real vb2_alloc_ctx
structure implementation. "Now" driver must gain access to vb2_dc_conf to set
the correct flags.

I have the following ideas:

1. replace all the names and expose vb2_dc_conf to all drivers (like dma-
sg, it export vb2_dma_sg_desc to all its users)

2. create an helper which configure flags. This maintain the vb2_dc_conf
vb2_set_mem_flags(struct vb2_alloc_ctx *alloc_ctx, gfp_t flags)

3. rename vb2_dc_conf to vb2_alloc_ctx because it is an implementation
vb2_alloc_ctx and (at the moment) it is used only by dma-contig

Federico Vaga

 \ /
  Last update: 2013-01-08 16:42    [W:0.038 / U:3.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site