OSDN Git Service

media: add helpers for memory-to-memory media controller
authorEzequiel Garcia <ezequiel@collabora.com>
Mon, 2 Jul 2018 15:36:05 +0000 (11:36 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 4 Jul 2018 12:43:47 +0000 (08:43 -0400)
commitbe2fff656322e82f215730839063c2c2ca73d14b
treed2611d3d65223d07e2839d7d1f308365819085c9
parent4d1e4545a65903a09f5d15d32a3fbb6131a8d11e
media: add helpers for memory-to-memory media controller

A memory-to-memory pipeline device consists in three
entities: two DMA engine and one video processing entities.
The DMA engine entities are linked to a V4L interface.

This commit add a new v4l2_m2m_{un}register_media_controller
API to register this topology.

For instance, a typical mem2mem device topology would
look like this:

Device topology
- entity 1: source (1 pad, 1 link)
            type Node subtype V4L flags 0
pad0: Source
-> "proc":1 [ENABLED,IMMUTABLE]

- entity 3: proc (2 pads, 2 links)
            type Node subtype Unknown flags 0
pad0: Source
-> "sink":0 [ENABLED,IMMUTABLE]
pad1: Sink
<- "source":0 [ENABLED,IMMUTABLE]

- entity 6: sink (1 pad, 1 link)
            type Node subtype V4L flags 0
pad0: Sink
<- "proc":0 [ENABLED,IMMUTABLE]

[hans.verkuil@cisco.com: mark interface links as IMMUTABLE]

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-dev.c
drivers/media/v4l2-core/v4l2-mem2mem.c
include/media/v4l2-mem2mem.h