• Sergey Senozhatsky's avatar
    media: videobuf2: handle V4L2_FLAG_MEMORY_NON_CONSISTENT flag · 1e0b2318
    Sergey Senozhatsky authored
    This patch lets user-space to request a non-consistent memory
    allocation during CREATE_BUFS and REQBUFS ioctl calls.
    
    = CREATE_BUFS
    
      struct v4l2_create_buffers has seven 4-byte reserved areas,
      so reserved[0] is renamed to ->flags. The struct, thus, now
      has six reserved 4-byte regions.
    
    = CREATE_BUFS32
    
      struct v4l2_create_buffers32 has seven 4-byte reserved areas,
      so reserved[0] is renamed to ->flags. The struct, thus, now
      has six reserved 4-byte regions.
    
    = REQBUFS
    
     We use one bit of a ->reserved[1] member of struct v4l2_requestbuffers,
     which is now renamed to ->flags. Unlike v4l2_create_buffers, struct
     v4l2_requestbuffers does not have enough reserved room. Therefore for
     backward compatibility  ->reserved and ->flags were put into anonymous
     union.
    Signed-off-by: default avatarSergey Senozhatsky <senozhatsky@chromium.org>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    1e0b2318
v4l2-compat-ioctl32.c 50.3 KB