Skip to contentSkip to conversation

vicodec: Drop unneeded symbol dependency

PATCH In review Ezequiel Garcia 2 participants 5 messages Sep 10, 2018 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 vicodec: Drop unneeded symbol dependency

The vicodec doesn't use the Subdev API, so drop the dependency.

---
 drivers/media/platform/vicodec/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/vicodec/Kconfig +1 -1
index 2503bcb1529f..ad13329e3461 100644
@@ -1,6 +1,6 @@
 config VIDEO_VICODEC
 	tristate "Virtual Codec Driver"
-	depends on VIDEO_DEV && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on VIDEO_DEV && VIDEO_V4L2
 	select VIDEOBUF2_VMALLOC
 	select V4L2_MEM2MEM_DEV
 	default n
Signature · 1 line
2.19.0.rc2
#1 lore raw

PATCH 2/2 vicodec: Drop unused job_abort()

The vicodec does not use the aborting field. In fact, this driver can't really cancel any work, since it performs all the work in device_run().

---
 drivers/media/platform/vicodec/vicodec-core.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/media/platform/vicodec/vicodec-core.c +0 -11
index bbc48fcaa563..8d455c42163e 100644
@@ -112,8 +112,6 @@ struct vicodec_ctx {
 
 	struct v4l2_ctrl_handler hdl;
 
-	/* Abort requested by m2m */
-	int			aborting;
 	struct vb2_v4l2_buffer *last_src_buf;
 	struct vb2_v4l2_buffer *last_dst_buf;
 
@@ -376,14 +374,6 @@ static int job_ready(void *priv)
 	return 1;
 }
 
-static void job_abort(void *priv)
-{
-	struct vicodec_ctx *ctx = priv;
-
-	/* Will cancel the transaction in the next interrupt handler */
-	ctx->aborting = 1;
-}
-
 /*
  * video ioctls
  */
@@ -1268,7 +1258,6 @@ static const struct video_device vicodec_videodev = {
 
 static const struct v4l2_m2m_ops m2m_ops = {
 	.device_run	= device_run,
-	.job_abort	= job_abort,
 	.job_ready	= job_ready,
 };
 
Signature · 1 line
2.19.0.rc2
#2 lore raw
In reply to Ezequiel Garcia
Quoted 12 lines · Ezequiel Garcia

The vicodec doesn't use the Subdev API, so drop the dependency.

---
 drivers/media/platform/vicodec/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/vicodec/Kconfig +0 -0
index 2503bcb1529f..ad13329e3461 100644

drivers/media/platform/vicodec/Kconfig line 3

Quoted 3 lines
drivers/media/platform/vicodec/Kconfig +0 -1
@@ -1,6 +1,6 @@
 config VIDEO_VICODEC
 	tristate "Virtual Codec Driver"
-	depends on VIDEO_DEV && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API

But it definitely needs the MEDIA_CONTROLLER. That's what it should depend on.

Regards,

Hans

Quoted 5 lines
drivers/media/platform/vicodec/Kconfig +1 -0
+	depends on VIDEO_DEV && VIDEO_V4L2
 	select VIDEOBUF2_VMALLOC
 	select V4L2_MEM2MEM_DEV
 	default n
#3 lore raw
Quoted 8 lines · Hans Verkuil
Quoted 7 lines · Ezequiel Garcia

The vicodec doesn't use the Subdev API, so drop the dependency.

---
 drivers/media/platform/vicodec/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines

drivers/media/platform/vicodec/Kconfig line 3

Quoted 8 lines
drivers/media/platform/vicodec/Kconfig +0 -1
index 2503bcb1529f..ad13329e3461 100644
@@ -1,6 +1,6 @@
 config VIDEO_VICODEC
 	tristate "Virtual Codec Driver"
-	depends on VIDEO_DEV && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API

But it definitely needs the MEDIA_CONTROLLER. That's what it should depend on.

Does it really? The code have proper ifdefs.

#4 lore raw
Quoted 21 lines · Ezequiel Garcia
Quoted 8 lines · Hans Verkuil
Quoted 7 lines · Ezequiel Garcia

The vicodec doesn't use the Subdev API, so drop the dependency.

---
 drivers/media/platform/vicodec/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines

drivers/media/platform/vicodec/Kconfig line 3

Quoted 8 lines
drivers/media/platform/vicodec/Kconfig +0 -1
index 2503bcb1529f..ad13329e3461 100644
@@ -1,6 +1,6 @@
 config VIDEO_VICODEC
 	tristate "Virtual Codec Driver"
-	depends on VIDEO_DEV && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API

But it definitely needs the MEDIA_CONTROLLER. That's what it should depend on.

Quoted 2 lines

Does it really? The code have proper ifdefs.

You are right, it is not needed now, but will be when stateless codec support is added to vicodec in the future.

Regards,

Hans