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

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

[media] v4l: vsp1: Make the BRU optional



Not all VSP instances have a BRU on R-Car Gen3, make it optional. Set
the feature unconditionally for now, this will be fixed when adding Gen3
support.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent a96c5fa4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ struct vsp1_uds;
#define VSP1_HAS_LIF		(1 << 0)
#define VSP1_HAS_LUT		(1 << 1)
#define VSP1_HAS_SRU		(1 << 2)
#define VSP1_HAS_BRU		(1 << 3)

struct vsp1_platform_data {
	unsigned int features;
+9 −6
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
	}

	/* Instantiate all the entities. */
	if (vsp1->pdata.features & VSP1_HAS_BRU) {
		vsp1->bru = vsp1_bru_create(vsp1);
		if (IS_ERR(vsp1->bru)) {
			ret = PTR_ERR(vsp1->bru);
@@ -227,6 +228,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
		}

		list_add_tail(&vsp1->bru->entity.list_dev, &vsp1->entities);
	}

	vsp1->hsi = vsp1_hsit_create(vsp1, true);
	if (IS_ERR(vsp1->hsi)) {
@@ -541,6 +543,7 @@ static int vsp1_parse_dt(struct vsp1_device *vsp1)
		return -EINVAL;
	}

	pdata->features |= VSP1_HAS_BRU;
	pdata->num_bru_inputs = 4;

	return 0;