Skip to contentSkip to conversation

ipu3-cio2: Use MEDIA_ENT_F_VID_IF_BRIDGE as receiver entity function

PATCH In review Sakari Ailus 2 participants 3 messages Dec 12, 2018 – Dec 13, 2018

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 ipu3-cio2: Use MEDIA_ENT_F_VID_IF_BRIDGE as receiver entity function

Address the following warnings by setting the entity's function to an appropriate value.

[    5.043377] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 0 was not initialized!
[    5.043427] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 1 was not initialized!
[    5.043463] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 2 was not initialized!
[    5.043502] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 3 was not initialized!
---
 drivers/media/pci/intel/ipu3/ipu3-cio2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -0
index 447baaebca448..e827e12b9718f 100644
@@ -1597,6 +1597,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
 
 	/* Initialize subdev */
 	v4l2_subdev_init(subdev, &cio2_subdev_ops);
+	subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
 	subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
 	subdev->owner = THIS_MODULE;
 	snprintf(subdev->name, sizeof(subdev->name),
Signature · 1 line
2.11.0
#1 lore raw
Quoted 18 lines · Sakari Ailus

Address the following warnings by setting the entity's function to an appropriate value.

[    5.043377] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 0 was not initialized!
[    5.043427] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 1 was not initialized!
[    5.043463] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 2 was not initialized!
[    5.043502] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 3 was not initialized!
---
  drivers/media/pci/intel/ipu3/ipu3-cio2.c | 1 +
  1 file changed, 1 insertion(+)
drivers/media/pci/intel/ipu3/ipu3-cio2.c +0 -0
index 447baaebca448..e827e12b9718f 100644

drivers/media/pci/intel/ipu3/ipu3-cio2.c static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q) · line 1600

Quoted 4 lines
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -0
@@ -1597,6 +1597,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
 
  	/* Initialize subdev */
  	v4l2_subdev_init(subdev, &cio2_subdev_ops);
+	subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;

I am wondering what is the difference between VID_IF_BRIDGE and PROC_VIDEO_PIXEL_FORMATTER. Some CSI-2 receiver is using PIXEL_FORMATTER now.

Quoted 3 lines
drivers/media/pci/intel/ipu3/ipu3-cio2.c +0 -0
  	subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
  	subdev->owner = THIS_MODULE;
  	snprintf(subdev->name, sizeof(subdev->name),
author maintainer
#2 lore raw

Hi Bingbu,

Quoted 16 lines · Bingbu Cao
Quoted 13 lines · Sakari Ailus

Address the following warnings by setting the entity's function to an appropriate value.

[    5.043377] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 0 was not initialized!
[    5.043427] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 1 was not initialized!
[    5.043463] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 2 was not initialized!
[    5.043502] ipu3-cio2 0000:00:14.3: Entity type for entity ipu3-csi2 3 was not initialized!
---
  drivers/media/pci/intel/ipu3/ipu3-cio2.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 10 lines

drivers/media/pci/intel/ipu3/ipu3-cio2.c static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q) · line 1599

Quoted 8 lines
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -0
index 447baaebca448..e827e12b9718f 100644
@@ -1597,6 +1597,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
  	/* Initialize subdev */
  	v4l2_subdev_init(subdev, &cio2_subdev_ops);
+	subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;

I am wondering what is the difference between VID_IF_BRIDGE and PROC_VIDEO_PIXEL_FORMATTER. Some CSI-2 receiver is using PIXEL_FORMATTER now.

Good question. Based on the documentation neither perfectly fits:

<URL:https://hverkuil.home.xs4all.nl/spec/uapi/mediactl/media-types.html#media-entity-functions>

Ideally it should be possible for it to be both at the same time, but the API currently allows only one.

Quoted 4 lines
Quoted 3 lines
drivers/media/pci/intel/ipu3/ipu3-cio2.c +0 -0
  	subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
  	subdev->owner = THIS_MODULE;
  	snprintf(subdev->name, sizeof(subdev->name),
Signature · 4 lines
Regards,

Sakari Ailus
[email protected]