@@ -269,6 +269,7 @@ static const struct v4l2_subdev_pad_ops brx_pad_ops = {
};
static const struct v4l2_subdev_ops brx_ops = {
+ .core = &vsp1_entity_core_ops,
.pad = &brx_pad_ops,
};
@@ -130,6 +130,7 @@ static const struct v4l2_subdev_pad_ops clu_pad_ops = {
};
static const struct v4l2_subdev_ops clu_ops = {
+ .core = &vsp1_entity_core_ops,
.pad = &clu_pad_ops,
};
@@ -12,6 +12,7 @@
#include <media/media-entity.h>
#include <media/v4l2-ctrls.h>
+#include <media/v4l2-event.h>
#include <media/v4l2-subdev.h>
#include "vsp1.h"
@@ -389,6 +390,11 @@ static const struct v4l2_subdev_internal_ops vsp1_entity_internal_ops = {
.init_state = vsp1_entity_init_state,
};
+const struct v4l2_subdev_core_ops vsp1_entity_core_ops = {
+ .subscribe_event = v4l2_ctrl_subdev_subscribe_event,
+ .unsubscribe_event = v4l2_event_subdev_unsubscribe,
+};
+
/* -----------------------------------------------------------------------------
* Media Operations
*/
@@ -629,6 +635,9 @@ int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
subdev->entity.ops = &vsp1->media_ops;
subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
+ if (ops->core == &vsp1_entity_core_ops)
+ subdev->flags |= V4L2_SUBDEV_FL_HAS_EVENTS;
+
snprintf(subdev->name, sizeof(subdev->name), "%s %s",
dev_name(vsp1->dev), name);
@@ -142,6 +142,8 @@ static inline struct vsp1_entity *to_vsp1_entity(struct v4l2_subdev *subdev)
return container_of(subdev, struct vsp1_entity, subdev);
}
+extern const struct v4l2_subdev_core_ops vsp1_entity_core_ops;
+
int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
const char *name, unsigned int num_pads,
const struct v4l2_subdev_ops *ops, u32 function);
@@ -370,6 +370,7 @@ static const struct v4l2_subdev_pad_ops histo_pad_ops = {
};
static const struct v4l2_subdev_ops histo_ops = {
+ .core = &vsp1_entity_core_ops,
.pad = &histo_pad_ops,
};
@@ -106,6 +106,7 @@ static const struct v4l2_subdev_pad_ops lut_pad_ops = {
};
static const struct v4l2_subdev_ops lut_ops = {
+ .core = &vsp1_entity_core_ops,
.pad = &lut_pad_ops,
};
@@ -351,6 +351,7 @@ static const struct v4l2_subdev_pad_ops vsp1_rwpf_pad_ops = {
};
const struct v4l2_subdev_ops vsp1_rwpf_subdev_ops = {
+ .core = &vsp1_entity_core_ops,
.pad = &vsp1_rwpf_pad_ops,
};
@@ -250,6 +250,7 @@ static const struct v4l2_subdev_pad_ops sru_pad_ops = {
};
static const struct v4l2_subdev_ops sru_ops = {
+ .core = &vsp1_entity_core_ops,
.pad = &sru_pad_ops,
};
The V4L2 API requires drivers that expose controls to implement control notification events. This is enforced by v4l2-compliance. Add event handling to the VSP1 entities that create controls to fix the compliance failures. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/media/platform/renesas/vsp1/vsp1_brx.c | 1 + drivers/media/platform/renesas/vsp1/vsp1_clu.c | 1 + drivers/media/platform/renesas/vsp1/vsp1_entity.c | 9 +++++++++ drivers/media/platform/renesas/vsp1/vsp1_entity.h | 2 ++ drivers/media/platform/renesas/vsp1/vsp1_histo.c | 1 + drivers/media/platform/renesas/vsp1/vsp1_lut.c | 1 + drivers/media/platform/renesas/vsp1/vsp1_rwpf.c | 1 + drivers/media/platform/renesas/vsp1/vsp1_sru.c | 1 + 8 files changed, 17 insertions(+)