@@ -305,10 +305,11 @@ static struct v4l2_subdev_ops bru_ops = {
* VSP1 Entity Operations
*/
-static void bru_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void bru_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
- struct vsp1_pipeline *pipe = to_vsp1_pipeline(&entity->subdev.entity);
struct vsp1_bru *bru = to_bru(&entity->subdev);
const struct v4l2_mbus_framefmt *format;
struct v4l2_subdev_pad_config *config;
@@ -464,7 +464,7 @@ void vsp1_du_atomic_flush(struct device *dev)
vsp1_entity_route_setup(entity, pipe->dl);
if (entity->ops->configure)
- entity->ops->configure(entity, pipe->dl, NULL);
+ entity->ops->configure(entity, pipe, pipe->dl, NULL);
if (entity->type == VSP1_ENTITY_RPF)
vsp1_rwpf_set_memory(to_rwpf(&entity->subdev),
@@ -21,6 +21,7 @@
struct media_device_request;
struct vsp1_device;
struct vsp1_dl_list;
+struct vsp1_pipeline;
enum vsp1_entity_type {
VSP1_ENTITY_BRU,
@@ -67,8 +68,8 @@ struct vsp1_route {
struct vsp1_entity_operations {
void (*destroy)(struct vsp1_entity *);
void (*set_memory)(struct vsp1_entity *, struct vsp1_dl_list *dl);
- void (*configure)(struct vsp1_entity *, struct vsp1_dl_list *dl,
- struct media_device_request *);
+ void (*configure)(struct vsp1_entity *, struct vsp1_pipeline *,
+ struct vsp1_dl_list *, struct media_device_request *);
};
struct vsp1_entity {
@@ -166,7 +166,9 @@ static struct v4l2_subdev_ops hsit_ops = {
* VSP1 Entity Operations
*/
-static void hsit_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void hsit_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
struct vsp1_hsit *hsit = to_hsit(&entity->subdev);
@@ -184,7 +184,9 @@ static struct v4l2_subdev_ops lif_ops = {
* VSP1 Entity Operations
*/
-static void lif_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void lif_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
const struct v4l2_mbus_framefmt *format;
@@ -221,7 +221,9 @@ static struct v4l2_subdev_ops lut_ops = {
* VSP1 Entity Operations
*/
-static void lut_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void lut_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
struct vsp1_lut *lut = to_lut(&entity->subdev);
@@ -57,10 +57,11 @@ static void rpf_set_memory(struct vsp1_entity *entity, struct vsp1_dl_list *dl)
rpf->mem.addr[2] + rpf->offsets[1]);
}
-static void rpf_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void rpf_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
- struct vsp1_pipeline *pipe = to_vsp1_pipeline(&entity->subdev.entity);
struct vsp1_rwpf *rpf = to_rwpf(&entity->subdev);
struct v4l2_subdev_pad_config *config;
const struct vsp1_format_info *fmtinfo;
@@ -297,7 +297,9 @@ static struct v4l2_subdev_ops sru_ops = {
* VSP1 Entity Operations
*/
-static void sru_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void sru_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
const struct vsp1_sru_param *param;
@@ -283,7 +283,9 @@ static struct v4l2_subdev_ops uds_ops = {
* VSP1 Entity Operations
*/
-static void uds_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void uds_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
struct vsp1_uds *uds = to_uds(&entity->subdev);
@@ -597,7 +597,7 @@ static int vsp1_video_setup_pipeline(struct vsp1_pipeline *pipe)
vsp1_entity_route_setup(entity, pipe->dl);
if (entity->ops->configure)
- entity->ops->configure(entity, pipe->dl, NULL);
+ entity->ops->configure(entity, pipe, pipe->dl, NULL);
}
return 0;
@@ -88,10 +88,11 @@ static void wpf_set_memory(struct vsp1_entity *entity, struct vsp1_dl_list *dl)
vsp1_wpf_write(wpf, dl, VI6_WPF_DSTM_ADDR_C1, wpf->mem.addr[2]);
}
-static void wpf_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl,
+static void wpf_configure(struct vsp1_entity *entity,
+ struct vsp1_pipeline *pipe,
+ struct vsp1_dl_list *dl,
struct media_device_request *req)
{
- struct vsp1_pipeline *pipe = to_vsp1_pipeline(&entity->subdev.entity);
struct vsp1_rwpf *wpf = to_rwpf(&entity->subdev);
struct vsp1_device *vsp1 = wpf->entity.vsp1;
struct v4l2_subdev_pad_config *config;
Pass the pipe explicitly instead of retrieving it through media entities. This prepares for request API support where pipes will be created dynamically and not stored in media entities. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/media/platform/vsp1/vsp1_bru.c | 5 +++-- drivers/media/platform/vsp1/vsp1_drm.c | 2 +- drivers/media/platform/vsp1/vsp1_entity.h | 5 +++-- drivers/media/platform/vsp1/vsp1_hsit.c | 4 +++- drivers/media/platform/vsp1/vsp1_lif.c | 4 +++- drivers/media/platform/vsp1/vsp1_lut.c | 4 +++- drivers/media/platform/vsp1/vsp1_rpf.c | 5 +++-- drivers/media/platform/vsp1/vsp1_sru.c | 4 +++- drivers/media/platform/vsp1/vsp1_uds.c | 4 +++- drivers/media/platform/vsp1/vsp1_video.c | 2 +- drivers/media/platform/vsp1/vsp1_wpf.c | 5 +++-- 11 files changed, 29 insertions(+), 15 deletions(-)