Skip to content

Commit

Permalink
Revert "media: staging: ipu3-imgu: Set fields before media_entity_pad…
Browse files Browse the repository at this point in the history
…s_init()"

This reverts commit b7e6675.

The patch has been applied upstream and is no longer needed.
  • Loading branch information
StollD committed Apr 16, 2024
1 parent 91475ea commit 06142d7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/staging/media/ipu3/ipu3-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,18 +1069,18 @@ static int imgu_v4l2_subdev_register(struct imgu_device *imgu,
struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe];

/* Initialize subdev media entity */
imgu_sd->subdev.entity.ops = &imgu_media_ops;
for (i = 0; i < IMGU_NODE_NUM; i++) {
imgu_sd->subdev_pads[i].flags = imgu_pipe->nodes[i].output ?
MEDIA_PAD_FL_SINK : MEDIA_PAD_FL_SOURCE;
}
r = media_entity_pads_init(&imgu_sd->subdev.entity, IMGU_NODE_NUM,
imgu_sd->subdev_pads);
if (r) {
dev_err(&imgu->pci_dev->dev,
"failed initialize subdev media entity (%d)\n", r);
return r;
}
imgu_sd->subdev.entity.ops = &imgu_media_ops;
for (i = 0; i < IMGU_NODE_NUM; i++) {
imgu_sd->subdev_pads[i].flags = imgu_pipe->nodes[i].output ?
MEDIA_PAD_FL_SINK : MEDIA_PAD_FL_SOURCE;
}

/* Initialize subdev */
v4l2_subdev_init(&imgu_sd->subdev, &imgu_subdev_ops);
Expand Down Expand Up @@ -1177,15 +1177,15 @@ static int imgu_v4l2_node_setup(struct imgu_device *imgu, unsigned int pipe,
}

/* Initialize media entities */
node->vdev_pad.flags = node->output ?
MEDIA_PAD_FL_SOURCE : MEDIA_PAD_FL_SINK;
vdev->entity.ops = NULL;
r = media_entity_pads_init(&vdev->entity, 1, &node->vdev_pad);
if (r) {
dev_err(dev, "failed initialize media entity (%d)\n", r);
mutex_destroy(&node->lock);
return r;
}
node->vdev_pad.flags = node->output ?
MEDIA_PAD_FL_SOURCE : MEDIA_PAD_FL_SINK;
vdev->entity.ops = NULL;

/* Initialize vbq */
vbq->type = node->vdev_fmt.type;
Expand Down

0 comments on commit 06142d7

Please sign in to comment.