summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/renesas/vsp1/vsp1_drm.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2023-11-19 03:11:51 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2024-06-20 01:36:48 +0300
commit0656babf3c244b7760a6c005485d4b7b9be639e9 (patch)
treed0e4d4fe999a39b9a0b5e316cf79ec4d5943cb91 /drivers/media/platform/renesas/vsp1/vsp1_drm.c
parent51648e9605016b2b9d284e890b36bc27a71678dd (diff)
downloadlinux-stable-0656babf3c244b7760a6c005485d4b7b9be639e9.tar.gz
linux-stable-0656babf3c244b7760a6c005485d4b7b9be639e9.tar.bz2
linux-stable-0656babf3c244b7760a6c005485d4b7b9be639e9.zip
media: renesas: vsp1: Compute partitions for DRM pipelines
The DRM pipelines don't partition frames, as the hardware operates synchronously with the display. The entity operations access configuration data from the entity state in that case, instead of accessing the partition structure. This requires special cases in entity-specific code, increasing the driver complexity. To prepare for simplifying the code, initialize a single partition for the DRM pipelines, similarly to how video pipelines create one partition spanning the full image when partitioning isn't needed. The partition is allocated statically in the vsp1_drm_pipeline structure instead of dynamically as for video pipelines, as DRM pipelines are guaranteed to operate on a single partition. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/media/platform/renesas/vsp1/vsp1_drm.c')
-rw-r--r--drivers/media/platform/renesas/vsp1/vsp1_drm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drm.c b/drivers/media/platform/renesas/vsp1/vsp1_drm.c
index e44359b661b6..11313e26a298 100644
--- a/drivers/media/platform/renesas/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_drm.c
@@ -550,6 +550,9 @@ static void vsp1_du_pipeline_configure(struct vsp1_pipeline *pipe)
struct vsp1_dl_body *dlb;
unsigned int dl_flags = 0;
+ vsp1_pipeline_calculate_partition(pipe, &pipe->part_table[0],
+ drm_pipe->width, 0);
+
if (drm_pipe->force_brx_release)
dl_flags |= VSP1_DL_FRAME_END_INTERNAL;
if (pipe->output->writeback)
@@ -573,7 +576,8 @@ static void vsp1_du_pipeline_configure(struct vsp1_pipeline *pipe)
vsp1_entity_route_setup(entity, pipe, dlb);
vsp1_entity_configure_stream(entity, pipe, dl, dlb);
vsp1_entity_configure_frame(entity, pipe, dl, dlb);
- vsp1_entity_configure_partition(entity, pipe, NULL, dl, dlb);
+ vsp1_entity_configure_partition(entity, pipe,
+ &pipe->part_table[0], dl, dlb);
}
vsp1_dl_list_commit(dl, dl_flags);
@@ -968,6 +972,9 @@ int vsp1_drm_init(struct vsp1_device *vsp1)
vsp1_pipeline_init(pipe);
+ pipe->partitions = 1;
+ pipe->part_table = &drm_pipe->partition;
+
pipe->frame_end = vsp1_du_pipeline_frame_end;
/*