Commit be0270ec authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] Postpone the addition of MEDIA_IOC_G_TOPOLOGY

There are a few discussions left with regards to this ioctl:

1) the name of the new structs will contain _v2_ on it?
2) what's the best alternative to avoid compat32 issues?

Due to that, let's postpone the addition of this new ioctl to
the next Kernel version, to give people more time to discuss it.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent ce084d48
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
<refsect1> <refsect1>
<title>Description</title> <title>Description</title>
<para><emphasis role="bold">NOTE:</emphasis> This new ioctl is programmed to be added on Kernel 4.6. Its definition/arguments may change until its final version.</para>
<para>The typical usage of this ioctl is to call it twice. <para>The typical usage of this ioctl is to call it twice.
On the first call, the structure defined at &media-v2-topology; should On the first call, the structure defined at &media-v2-topology; should
be zeroed. At return, if no errors happen, this ioctl will return the be zeroed. At return, if no errors happen, this ioctl will return the
......
...@@ -234,6 +234,7 @@ static long media_device_setup_link(struct media_device *mdev, ...@@ -234,6 +234,7 @@ static long media_device_setup_link(struct media_device *mdev,
return ret; return ret;
} }
#if 0 /* Let's postpone it to Kernel 4.6 */
static long __media_device_get_topology(struct media_device *mdev, static long __media_device_get_topology(struct media_device *mdev,
struct media_v2_topology *topo) struct media_v2_topology *topo)
{ {
...@@ -389,6 +390,7 @@ static long media_device_get_topology(struct media_device *mdev, ...@@ -389,6 +390,7 @@ static long media_device_get_topology(struct media_device *mdev,
return 0; return 0;
} }
#endif
static long media_device_ioctl(struct file *filp, unsigned int cmd, static long media_device_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg) unsigned long arg)
...@@ -422,13 +424,14 @@ static long media_device_ioctl(struct file *filp, unsigned int cmd, ...@@ -422,13 +424,14 @@ static long media_device_ioctl(struct file *filp, unsigned int cmd,
mutex_unlock(&dev->graph_mutex); mutex_unlock(&dev->graph_mutex);
break; break;
#if 0 /* Let's postpone it to Kernel 4.6 */
case MEDIA_IOC_G_TOPOLOGY: case MEDIA_IOC_G_TOPOLOGY:
mutex_lock(&dev->graph_mutex); mutex_lock(&dev->graph_mutex);
ret = media_device_get_topology(dev, ret = media_device_get_topology(dev,
(struct media_v2_topology __user *)arg); (struct media_v2_topology __user *)arg);
mutex_unlock(&dev->graph_mutex); mutex_unlock(&dev->graph_mutex);
break; break;
#endif
default: default:
ret = -ENOIOCTLCMD; ret = -ENOIOCTLCMD;
} }
...@@ -477,7 +480,9 @@ static long media_device_compat_ioctl(struct file *filp, unsigned int cmd, ...@@ -477,7 +480,9 @@ static long media_device_compat_ioctl(struct file *filp, unsigned int cmd,
case MEDIA_IOC_DEVICE_INFO: case MEDIA_IOC_DEVICE_INFO:
case MEDIA_IOC_ENUM_ENTITIES: case MEDIA_IOC_ENUM_ENTITIES:
case MEDIA_IOC_SETUP_LINK: case MEDIA_IOC_SETUP_LINK:
#if 0 /* Let's postpone it to Kernel 4.6 */
case MEDIA_IOC_G_TOPOLOGY: case MEDIA_IOC_G_TOPOLOGY:
#endif
return media_device_ioctl(filp, cmd, arg); return media_device_ioctl(filp, cmd, arg);
case MEDIA_IOC_ENUM_LINKS32: case MEDIA_IOC_ENUM_LINKS32:
......
...@@ -286,7 +286,7 @@ struct media_links_enum { ...@@ -286,7 +286,7 @@ struct media_links_enum {
* later, before the adding this API upstream. * later, before the adding this API upstream.
*/ */
#if 0 /* Let's postpone it to Kernel 4.6 */
struct media_v2_entity { struct media_v2_entity {
__u32 id; __u32 id;
char name[64]; /* FIXME: move to a property? (RFC says so) */ char name[64]; /* FIXME: move to a property? (RFC says so) */
...@@ -351,6 +351,7 @@ static inline void __user *media_get_uptr(__u64 arg) ...@@ -351,6 +351,7 @@ static inline void __user *media_get_uptr(__u64 arg)
{ {
return (void __user *)(uintptr_t)arg; return (void __user *)(uintptr_t)arg;
} }
#endif
/* ioctls */ /* ioctls */
...@@ -358,6 +359,9 @@ static inline void __user *media_get_uptr(__u64 arg) ...@@ -358,6 +359,9 @@ static inline void __user *media_get_uptr(__u64 arg)
#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)
#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
#if 0 /* Let's postpone it to Kernel 4.6 */
#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)
#endif
#endif /* __LINUX_MEDIA_H */ #endif /* __LINUX_MEDIA_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment