Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83dd019d authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: vsp1: Pass pipe pointer to entity configure functions



Pass the pipe explicitly instead of retrieving it through media
entities. This decouples device state stored in the pipeline from the
active state stored in entities, preparing for dynamic pipeline
creation.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent d2219824
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -305,9 +305,10 @@ 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 vsp1_pipeline *pipe = to_vsp1_pipeline(&entity->subdev.entity);
	struct vsp1_bru *bru = to_bru(&entity->subdev);
	struct v4l2_mbus_framefmt *format;
	unsigned int flags;
+1 −1
Original line number Diff line number Diff line
@@ -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);
			entity->ops->configure(entity, pipe, pipe->dl);

		if (entity->type == VSP1_ENTITY_RPF)
			vsp1_rwpf_set_memory(to_rwpf(&entity->subdev),
+3 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

struct vsp1_device;
struct vsp1_dl_list;
struct vsp1_pipeline;

enum vsp1_entity_type {
	VSP1_ENTITY_BRU,
@@ -66,7 +67,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);
	void (*configure)(struct vsp1_entity *, struct vsp1_pipeline *,
			  struct vsp1_dl_list *);
};

struct vsp1_entity {
+3 −1
Original line number Diff line number Diff line
@@ -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 vsp1_hsit *hsit = to_hsit(&entity->subdev);

+3 −1
Original line number Diff line number Diff line
@@ -185,7 +185,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)
{
	const struct v4l2_mbus_framefmt *format;
	struct vsp1_lif *lif = to_lif(&entity->subdev);
Loading