[media] omap3isp: get entity ID using media_entity_id()
Accessing media_entity ID should now use media_entity_id() macro to obtain the entity ID, as a next patch will remove the .id field from struct media_entity . So, get rid of it, otherwise the omap3isp driver will fail to build. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Родитель
1302d39c4a
Коммит
e0077cfdee
|
@ -975,6 +975,7 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
|
||||||
struct v4l2_subdev *subdev;
|
struct v4l2_subdev *subdev;
|
||||||
int failure = 0;
|
int failure = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
u32 id;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to stop all the modules after CCDC first or they'll
|
* We need to stop all the modules after CCDC first or they'll
|
||||||
|
@ -1027,8 +1028,10 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_info(isp->dev, "Unable to stop %s\n", subdev->name);
|
dev_info(isp->dev, "Unable to stop %s\n", subdev->name);
|
||||||
isp->stop_failure = true;
|
isp->stop_failure = true;
|
||||||
if (subdev == &isp->isp_prev.subdev)
|
if (subdev == &isp->isp_prev.subdev) {
|
||||||
isp->crashed |= 1U << subdev->entity.id;
|
id = media_entity_id(&subdev->entity);
|
||||||
|
isp->crashed |= 1U << id;
|
||||||
|
}
|
||||||
failure = -ETIMEDOUT;
|
failure = -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1608,7 +1608,7 @@ static int ccdc_isr_buffer(struct isp_ccdc_device *ccdc)
|
||||||
/* Wait for the CCDC to become idle. */
|
/* Wait for the CCDC to become idle. */
|
||||||
if (ccdc_sbl_wait_idle(ccdc, 1000)) {
|
if (ccdc_sbl_wait_idle(ccdc, 1000)) {
|
||||||
dev_info(isp->dev, "CCDC won't become idle!\n");
|
dev_info(isp->dev, "CCDC won't become idle!\n");
|
||||||
isp->crashed |= 1U << ccdc->subdev.entity.id;
|
isp->crashed |= 1U << media_entity_id(&ccdc->subdev.entity);
|
||||||
omap3isp_pipeline_cancel_stream(pipe);
|
omap3isp_pipeline_cancel_stream(pipe);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,7 @@ static int isp_video_get_graph_data(struct isp_video *video,
|
||||||
while ((entity = media_entity_graph_walk_next(&graph))) {
|
while ((entity = media_entity_graph_walk_next(&graph))) {
|
||||||
struct isp_video *__video;
|
struct isp_video *__video;
|
||||||
|
|
||||||
pipe->entities |= 1 << entity->id;
|
pipe->entities |= 1 << media_entity_id(entity);
|
||||||
|
|
||||||
if (far_end != NULL)
|
if (far_end != NULL)
|
||||||
continue;
|
continue;
|
||||||
|
@ -893,6 +893,7 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
|
||||||
struct v4l2_ext_control ctrl;
|
struct v4l2_ext_control ctrl;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int ret;
|
int ret;
|
||||||
|
u32 id;
|
||||||
|
|
||||||
/* Memory-to-memory pipelines have no external subdev. */
|
/* Memory-to-memory pipelines have no external subdev. */
|
||||||
if (pipe->input != NULL)
|
if (pipe->input != NULL)
|
||||||
|
@ -900,7 +901,7 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(ents); i++) {
|
for (i = 0; i < ARRAY_SIZE(ents); i++) {
|
||||||
/* Is the entity part of the pipeline? */
|
/* Is the entity part of the pipeline? */
|
||||||
if (!(pipe->entities & (1 << ents[i]->id)))
|
if (!(pipe->entities & (1 << media_entity_id(ents[i]))))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* ISP entities have always sink pad == 0. Find source. */
|
/* ISP entities have always sink pad == 0. Find source. */
|
||||||
|
@ -952,7 +953,8 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
|
||||||
|
|
||||||
pipe->external_rate = ctrl.value64;
|
pipe->external_rate = ctrl.value64;
|
||||||
|
|
||||||
if (pipe->entities & (1 << isp->isp_ccdc.subdev.entity.id)) {
|
id = media_entity_id(&isp->isp_ccdc.subdev.entity);
|
||||||
|
if (pipe->entities & (1 << id)) {
|
||||||
unsigned int rate = UINT_MAX;
|
unsigned int rate = UINT_MAX;
|
||||||
/*
|
/*
|
||||||
* Check that maximum allowed CCDC pixel rate isn't
|
* Check that maximum allowed CCDC pixel rate isn't
|
||||||
|
|
Загрузка…
Ссылка в новой задаче