Commit Graph

15 Commits

Author SHA1 Message Date
Kieran Bingham fc6e514a72 [media] v4l: vsp1: Support multiple partitions per frame
Adapt vsp1_video_pipeline_run() such that it can iterate each partition
required for constructing this frame's display list chain in the event
that multiple display lists are required to process in hardware.

The first display list is held as the head list object, whilst any
following parition display lists are linked to the head by means of
vsp1_dl_list_add_chain().

Linking the chained display list headers to process using the auto start
mechanism of the hardware is performed during the vsp1_dl_list_commit().

Signed-off-by: Kieran Bingham <kieran+renesas@bingham.xyz>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 15:01:30 -03:00
Kieran Bingham df32c92451 [media] v4l: vsp1: Determine partition requirements for scaled images
The partition algorithm needs to determine the capabilities of each
entity in the pipeline to identify the correct maximum partition width.

Extend the vsp1 entity operations to provide a max_width operation and
use this call to calculate the number of partitions that will be
processed by the algorithm.

Gen 2 hardware does not require multiple partitioning, and as such
will always return a single partition.

Signed-off-by: Kieran Bingham <kieran+renesas@bingham.xyz>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 15:00:03 -03:00
Laurent Pinchart 07a23c6117 [media] v4l: vsp1: Simplify alpha propagation
We don't need to walk the pipeline when propagating the alpha value as
all the information needed for propagation is already available from the
pipeline structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-28 12:29:33 -03:00
Laurent Pinchart e98c59dd71 [media] v4l: vsp1: pipe: Fix typo in comment
The vsp1_pipeline wq field is a wait queue, not a work queue. Fix the
comment accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-28 12:00:07 -03:00
Laurent Pinchart 0c1a41b508 [media] v4l: vsp1: Move frame sequence number from video node to pipeline
The frame sequence number is global to the pipeline, there's no need to
store copies in each video node.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-17 08:15:10 -03:00
Laurent Pinchart a0cdac5610 [media] v4l: vsp1: Allocate pipelines on demand
Instead of embedding pipelines in the vsp1_video objects allocate them
on demand when they are needed. This fixes the streamon race condition
where pipelines objects from different video nodes could be used for the
same pipeline.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13 19:03:21 -03:00
Laurent Pinchart ff7e97c94d [media] v4l: vsp1: Store pipeline pointer in rwpf
This prepares for dynamic pipeline allocation by providing a field that
can be used to store the pipeline pointer atomically under driver
control.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13 19:01:07 -03:00
Laurent Pinchart 5e8dbbf372 [media] v4l: vsp1: Pass display list explicitly to configure functions
Modules write register values to the active display list pointed to by
the pipeline. In order to support preparing display lists ahead of time,
pass them explicitly to all configuration functions.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13 18:58:36 -03:00
Laurent Pinchart c2dd2513ea [media] v4l: vsp1: Split display list manager from display list
This clarifies the API and prepares display list support for being used
to implement the request API.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-13 17:34:44 -03:00
Takashi Saito 1517b03923 [media] v4l: vsp1: Add display list support
Display lists contain lists of registers and associated values to be
applied atomically by the hardware. They lower the pressure on interrupt
processing delays when reprogramming the device as settings can be
prepared well in advance and queued to the hardware without waiting for
the end of the current frame.

Display list support is currently limited to the DRM pipeline.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19 09:40:47 -02:00
Laurent Pinchart 96bfa6a5fd [media] v4l: vsp1: Make pipeline inputs array index by RPF index
The pipeline inputs array stores pointers to all RPFs contained in the
pipeline. It's currently indexed contiguously by adding RPFs in the
order they are found during graph walk. This can't easily support
dynamic addition and removal of RPFs while streaming, which will be
required for combined VSP+DU support.

Make the array indexed by RPF index instead and skip NULL elements when
iterating over RPFs.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19 09:22:38 -02:00
Laurent Pinchart c618b185fd [media] v4l: vsp1: Move format info to vsp1_pipe.c
Format information and the related helper function are not specific to
the V4L2 API, move them from vsp1_video.c to vsp1_pipe.c.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19 09:18:12 -02:00
Laurent Pinchart ba3a5c6dc3 [media] v4l: vsp1: Document the vsp1_pipeline structure
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19 09:10:09 -02:00
Laurent Pinchart f294c2f70e [media] v4l: vsp1: Extract pipeline initialization code into a function
The code will be reused outside of vsp1_video.c.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19 09:07:07 -02:00
Laurent Pinchart dba4a18073 [media] v4l: vsp1: Split pipeline management code from vsp1_video.c
The code will be used to control the vsp1 driver from the DU driver
without using video nodes.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19 09:04:52 -02:00