]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: vsp1: Add vsp1_dl_list argument to .configure_stream() operation
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 11 Mar 2019 18:13:43 +0000 (20:13 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 18 Mar 2019 15:23:56 +0000 (17:23 +0200)
The WPF needs access to the current display list to configure writeback.
Add a display list pointer to the VSP1 entity .configure_stream()
operation.

Only display pipelines can make use of the display list there as
mem-to-mem pipelines don't have access to a display list at stream
configuration time. This is not an issue as writeback is only used for
display pipelines.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
16 files changed:
drivers/media/platform/vsp1/vsp1_brx.c
drivers/media/platform/vsp1/vsp1_clu.c
drivers/media/platform/vsp1/vsp1_drm.c
drivers/media/platform/vsp1/vsp1_entity.c
drivers/media/platform/vsp1/vsp1_entity.h
drivers/media/platform/vsp1/vsp1_hgo.c
drivers/media/platform/vsp1/vsp1_hgt.c
drivers/media/platform/vsp1/vsp1_hsit.c
drivers/media/platform/vsp1/vsp1_lif.c
drivers/media/platform/vsp1/vsp1_lut.c
drivers/media/platform/vsp1/vsp1_rpf.c
drivers/media/platform/vsp1/vsp1_sru.c
drivers/media/platform/vsp1/vsp1_uds.c
drivers/media/platform/vsp1/vsp1_uif.c
drivers/media/platform/vsp1/vsp1_video.c
drivers/media/platform/vsp1/vsp1_wpf.c

index 58ad248cd7f759a50766283f300b751b260c75b7..2d86c718a5cf92eff7540dbbf6554065e530b08d 100644 (file)
@@ -283,6 +283,7 @@ static const struct v4l2_subdev_ops brx_ops = {
 
 static void brx_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_brx *brx = to_brx(&entity->subdev);
index 942fc14c19d153f717169b49ab7b74d20d838228..a47b23bf5abf45abbd0bbbdeae23ac86fbc3610f 100644 (file)
@@ -171,6 +171,7 @@ static const struct v4l2_subdev_ops clu_ops = {
 
 static void clu_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_clu *clu = to_clu(&entity->subdev);
index e8f83d4b7a39f15e6649bbab68eb7cc1d90bf94b..e28a742a7575c1c222b589167372c8acacd055a2 100644 (file)
@@ -558,7 +558,7 @@ static void vsp1_du_pipeline_configure(struct vsp1_pipeline *pipe)
                }
 
                vsp1_entity_route_setup(entity, pipe, dlb);
-               vsp1_entity_configure_stream(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, dl, dlb);
        }
index a54ab528b0603836845dcc13c943d1dbad9fb8a7..aa9d2286056eb268c23c693a5dfcf3827d110d48 100644 (file)
@@ -71,10 +71,11 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity,
 
 void vsp1_entity_configure_stream(struct vsp1_entity *entity,
                                  struct vsp1_pipeline *pipe,
+                                 struct vsp1_dl_list *dl,
                                  struct vsp1_dl_body *dlb)
 {
        if (entity->ops->configure_stream)
-               entity->ops->configure_stream(entity, pipe, dlb);
+               entity->ops->configure_stream(entity, pipe, dl, dlb);
 }
 
 void vsp1_entity_configure_frame(struct vsp1_entity *entity,
index 97acb7795cf14ac042c492e54e78fae1cbd00a06..a1ceb37bb837a721391a36a6818c0662f0109ae1 100644 (file)
@@ -67,7 +67,9 @@ struct vsp1_route {
  * struct vsp1_entity_operations - Entity operations
  * @destroy:   Destroy the entity.
  * @configure_stream:  Setup the hardware parameters for the stream which do
- *                     not vary between frames (pipeline, formats).
+ *                     not vary between frames (pipeline, formats). Note that
+ *                     the vsp1_dl_list argument is only valid for display
+ *                     pipeline and will be NULL for mem-to-mem pipelines.
  * @configure_frame:   Configure the runtime parameters for each frame.
  * @configure_partition: Configure partition specific parameters.
  * @max_width: Return the max supported width of data that the entity can
@@ -78,7 +80,7 @@ struct vsp1_route {
 struct vsp1_entity_operations {
        void (*destroy)(struct vsp1_entity *);
        void (*configure_stream)(struct vsp1_entity *, struct vsp1_pipeline *,
-                                struct vsp1_dl_body *);
+                                struct vsp1_dl_list *, struct vsp1_dl_body *);
        void (*configure_frame)(struct vsp1_entity *, struct vsp1_pipeline *,
                                struct vsp1_dl_list *, struct vsp1_dl_body *);
        void (*configure_partition)(struct vsp1_entity *,
@@ -155,6 +157,7 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity,
 
 void vsp1_entity_configure_stream(struct vsp1_entity *entity,
                                  struct vsp1_pipeline *pipe,
+                                 struct vsp1_dl_list *dl,
                                  struct vsp1_dl_body *dlb);
 
 void vsp1_entity_configure_frame(struct vsp1_entity *entity,
index 827373c25351dc04431ecec923f20154acc44f58..bf3f981f93a17da93dc6ac39cd2b22acaa0de9e7 100644 (file)
@@ -131,6 +131,7 @@ static const struct v4l2_ctrl_config hgo_num_bins_control = {
 
 static void hgo_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_hgo *hgo = to_hgo(&entity->subdev);
index bb6ce6fdd5f453e4c2775452ded6927727abedfd..aa1c718e04534cd7fe8a66f054a7560406963d1f 100644 (file)
@@ -127,6 +127,7 @@ static const struct v4l2_ctrl_config hgt_hue_areas = {
 
 static void hgt_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_hgt *hgt = to_hgt(&entity->subdev);
index 39ab2e0c7c1823115d9aefb11dab3e2b5a00f7c4..d5ebd9d08c8a4319af6f8674082adb2fc086bbf7 100644 (file)
@@ -129,6 +129,7 @@ static const struct v4l2_subdev_ops hsit_ops = {
 
 static void hsit_configure_stream(struct vsp1_entity *entity,
                                  struct vsp1_pipeline *pipe,
+                                 struct vsp1_dl_list *dl,
                                  struct vsp1_dl_body *dlb)
 {
        struct vsp1_hsit *hsit = to_hsit(&entity->subdev);
index 8b0a26335d70a287d6a31fb262d45c45e9ad8bc8..14ed5d7bd061ecb3ded2cd807530e8919bc8c720 100644 (file)
@@ -84,6 +84,7 @@ static const struct v4l2_subdev_ops lif_ops = {
 
 static void lif_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        const struct v4l2_mbus_framefmt *format;
index 64c48d9459b0c6450c0592735c28a50a96212250..9f88842d70489e40c6f509a45495d03b0b07d053 100644 (file)
@@ -147,6 +147,7 @@ static const struct v4l2_subdev_ops lut_ops = {
 
 static void lut_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_lut *lut = to_lut(&entity->subdev);
index 616afa7e165f54597542719bb2fadd7f228a600f..85587c1b6a37320cac7a974eeaba4611858a794e 100644 (file)
@@ -57,6 +57,7 @@ static const struct v4l2_subdev_ops rpf_ops = {
 
 static void rpf_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_rwpf *rpf = to_rwpf(&entity->subdev);
index b1617cb1f2b9d9923538ae505cdae563aa32e3f4..2b65457ee12fe74f3516d9d7619e9d36e82c4a6e 100644 (file)
@@ -269,6 +269,7 @@ static const struct v4l2_subdev_ops sru_ops = {
 
 static void sru_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        const struct vsp1_sru_param *param;
index 27012af973b24b78897f6766174a1def21812a0b..5fc04c082d1a9e48b899ed3d420f9a5e6bf20d67 100644 (file)
@@ -257,6 +257,7 @@ static const struct v4l2_subdev_ops uds_ops = {
 
 static void uds_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_uds *uds = to_uds(&entity->subdev);
index 4b58d51df231f289f67f22bf408d4366044c7d34..467d1072577be14a50e7b36ba328683944a33b93 100644 (file)
@@ -192,6 +192,7 @@ static const struct v4l2_subdev_ops uif_ops = {
 
 static void uif_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_uif *uif = to_uif(&entity->subdev);
index 9ae20982604a759a3c5d1fff63c2450177d45adc..fd98e483b2f4262f5a2bf0e23fb60bf3aee7d295 100644 (file)
@@ -825,7 +825,8 @@ static int vsp1_video_setup_pipeline(struct vsp1_pipeline *pipe)
 
        list_for_each_entry(entity, &pipe->entities, list_pipe) {
                vsp1_entity_route_setup(entity, pipe, pipe->stream_config);
-               vsp1_entity_configure_stream(entity, pipe, pipe->stream_config);
+               vsp1_entity_configure_stream(entity, pipe, NULL,
+                                            pipe->stream_config);
        }
 
        return 0;
index 18c49e3a7875efbbc7bd852b9c73c08a8a2a5c35..fc5c1b0f66333e8ffc2bdecd4be62da71b9ca1fd 100644 (file)
@@ -234,6 +234,7 @@ static void vsp1_wpf_destroy(struct vsp1_entity *entity)
 
 static void wpf_configure_stream(struct vsp1_entity *entity,
                                 struct vsp1_pipeline *pipe,
+                                struct vsp1_dl_list *dl,
                                 struct vsp1_dl_body *dlb)
 {
        struct vsp1_rwpf *wpf = to_rwpf(&entity->subdev);