summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_pipe.h
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>2017-08-04 19:32:40 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-20 16:30:37 +0300
commit25b6beabd0f918c38d4f830c5a60feda2e146e43 (patch)
tree14a2fd8bd7a96301575c271a103d0e676b1b8087 /drivers/media/platform/vsp1/vsp1_pipe.h
parent801c6a17784217dbc36216b6050ffc0f2208c5a2 (diff)
downloadlinux-25b6beabd0f918c38d4f830c5a60feda2e146e43.tar.xz
media: v4l: vsp1: Calculate partition sizes at stream start
Previously the active window and partition sizes for each partition were calculated for each partition every frame. This data is constant and only needs to be calculated once at the start of the stream. Extend the vsp1_pipe object to dynamically store the number of partitions required and pre-calculate the partition sizes into this table. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_pipe.h')
-rw-r--r--drivers/media/platform/vsp1/vsp1_pipe.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_pipe.h b/drivers/media/platform/vsp1/vsp1_pipe.h
index 91a784a13422..0cfd07a187a2 100644
--- a/drivers/media/platform/vsp1/vsp1_pipe.h
+++ b/drivers/media/platform/vsp1/vsp1_pipe.h
@@ -82,7 +82,9 @@ enum vsp1_pipeline_state {
* @dl: display list associated with the pipeline
* @div_size: The maximum allowed partition size for the pipeline
* @partitions: The number of partitions used to process one frame
+ * @partition: The current partition for configuration to process
* @current_partition: The partition number currently being configured
+ * @part_table: The pre-calculated partitions used by the pipeline
*/
struct vsp1_pipeline {
struct media_pipeline pipe;
@@ -117,6 +119,7 @@ struct vsp1_pipeline {
unsigned int partitions;
struct v4l2_rect partition;
unsigned int current_partition;
+ struct v4l2_rect *part_table;
};
void vsp1_pipeline_reset(struct vsp1_pipeline *pipe);