@@ -427,7 +427,15 @@ void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
}
/*
- * Propagate the partition calculations through the pipeline
+ * Identify if the partition algorithm is in use or not.
+ */
+bool vsp1_pipeline_partitioned(struct vsp1_pipeline *pipe)
+{
+ return pipe->partitions > 1;
+}
+
+/*
+ * Propagate the partition calculations through the pipeline.
*
* Work backwards through the pipe, allowing each entity to update the partition
* parameters based on its configuration, and the entity connected to its
@@ -164,6 +164,7 @@ void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
struct vsp1_dl_body *dlb,
unsigned int alpha);
+bool vsp1_pipeline_partitioned(struct vsp1_pipeline *pipe);
void vsp1_pipeline_propagate_partition(struct vsp1_pipeline *pipe,
struct vsp1_partition *partition,
unsigned int index,
@@ -269,7 +269,7 @@ static void rpf_configure_partition(struct vsp1_entity *entity,
* matching the expected partition window. Only 'left' and
* 'width' need to be adjusted.
*/
- if (pipe->partitions > 1) {
+ if (vsp1_pipeline_partitioned(pipe)) {
crop.width = pipe->partition->rpf.width;
crop.left += pipe->partition->rpf.left;
}
@@ -201,7 +201,7 @@ static void vsp1_video_calculate_partition(struct vsp1_pipeline *pipe,
RWPF_PAD_SINK);
/* A single partition simply processes the output size in full. */
- if (pipe->partitions <= 1) {
+ if (!vsp1_pipeline_partitioned(pipe)) {
window.left = 0;
window.width = format->width;
@@ -376,7 +376,7 @@ static void wpf_configure_partition(struct vsp1_entity *entity,
* Cropping. The partition algorithm can split the image into
* multiple slices.
*/
- if (pipe->partitions > 1)
+ if (vsp1_pipeline_partitioned(pipe))
width = pipe->partition->wpf.width;
vsp1_wpf_write(wpf, dlb, VI6_WPF_HSZCLIP, VI6_WPF_SZCLIP_EN |