diff options
-rw-r--r-- | Documentation/DocBook/media/v4l/media-ioc-g-topology.xml | 3 | ||||
-rw-r--r-- | drivers/media/media-device.c | 7 | ||||
-rw-r--r-- | include/uapi/linux/media.h | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/media-ioc-g-topology.xml b/Documentation/DocBook/media/v4l/media-ioc-g-topology.xml index e0d49fa329f0..63152ab9efba 100644 --- a/Documentation/DocBook/media/v4l/media-ioc-g-topology.xml +++ b/Documentation/DocBook/media/v4l/media-ioc-g-topology.xml | |||
@@ -48,6 +48,9 @@ | |||
48 | 48 | ||
49 | <refsect1> | 49 | <refsect1> |
50 | <title>Description</title> | 50 | <title>Description</title> |
51 | |||
52 | <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> | ||
53 | |||
51 | <para>The typical usage of this ioctl is to call it twice. | 54 | <para>The typical usage of this ioctl is to call it twice. |
52 | On the first call, the structure defined at &media-v2-topology; should | 55 | On the first call, the structure defined at &media-v2-topology; should |
53 | be zeroed. At return, if no errors happen, this ioctl will return the | 56 | be zeroed. At return, if no errors happen, this ioctl will return the |
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 4d1c13de494b..7dae0ac0f3ae 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c | |||
@@ -234,6 +234,7 @@ static long media_device_setup_link(struct media_device *mdev, | |||
234 | return ret; | 234 | return ret; |
235 | } | 235 | } |
236 | 236 | ||
237 | #if 0 /* Let's postpone it to Kernel 4.6 */ | ||
237 | static long __media_device_get_topology(struct media_device *mdev, | 238 | static long __media_device_get_topology(struct media_device *mdev, |
238 | struct media_v2_topology *topo) | 239 | struct media_v2_topology *topo) |
239 | { | 240 | { |
@@ -389,6 +390,7 @@ static long media_device_get_topology(struct media_device *mdev, | |||
389 | 390 | ||
390 | return 0; | 391 | return 0; |
391 | } | 392 | } |
393 | #endif | ||
392 | 394 | ||
393 | static long media_device_ioctl(struct file *filp, unsigned int cmd, | 395 | static long media_device_ioctl(struct file *filp, unsigned int cmd, |
394 | unsigned long arg) | 396 | unsigned long arg) |
@@ -422,13 +424,14 @@ static long media_device_ioctl(struct file *filp, unsigned int cmd, | |||
422 | mutex_unlock(&dev->graph_mutex); | 424 | mutex_unlock(&dev->graph_mutex); |
423 | break; | 425 | break; |
424 | 426 | ||
427 | #if 0 /* Let's postpone it to Kernel 4.6 */ | ||
425 | case MEDIA_IOC_G_TOPOLOGY: | 428 | case MEDIA_IOC_G_TOPOLOGY: |
426 | mutex_lock(&dev->graph_mutex); | 429 | mutex_lock(&dev->graph_mutex); |
427 | ret = media_device_get_topology(dev, | 430 | ret = media_device_get_topology(dev, |
428 | (struct media_v2_topology __user *)arg); | 431 | (struct media_v2_topology __user *)arg); |
429 | mutex_unlock(&dev->graph_mutex); | 432 | mutex_unlock(&dev->graph_mutex); |
430 | break; | 433 | break; |
431 | 434 | #endif | |
432 | default: | 435 | default: |
433 | ret = -ENOIOCTLCMD; | 436 | ret = -ENOIOCTLCMD; |
434 | } | 437 | } |
@@ -477,7 +480,9 @@ static long media_device_compat_ioctl(struct file *filp, unsigned int cmd, | |||
477 | case MEDIA_IOC_DEVICE_INFO: | 480 | case MEDIA_IOC_DEVICE_INFO: |
478 | case MEDIA_IOC_ENUM_ENTITIES: | 481 | case MEDIA_IOC_ENUM_ENTITIES: |
479 | case MEDIA_IOC_SETUP_LINK: | 482 | case MEDIA_IOC_SETUP_LINK: |
483 | #if 0 /* Let's postpone it to Kernel 4.6 */ | ||
480 | case MEDIA_IOC_G_TOPOLOGY: | 484 | case MEDIA_IOC_G_TOPOLOGY: |
485 | #endif | ||
481 | return media_device_ioctl(filp, cmd, arg); | 486 | return media_device_ioctl(filp, cmd, arg); |
482 | 487 | ||
483 | case MEDIA_IOC_ENUM_LINKS32: | 488 | case MEDIA_IOC_ENUM_LINKS32: |
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 5dbb208e5451..1e3c8cb43bd7 100644 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h | |||
@@ -286,7 +286,7 @@ struct media_links_enum { | |||
286 | * later, before the adding this API upstream. | 286 | * later, before the adding this API upstream. |
287 | */ | 287 | */ |
288 | 288 | ||
289 | 289 | #if 0 /* Let's postpone it to Kernel 4.6 */ | |
290 | struct media_v2_entity { | 290 | struct media_v2_entity { |
291 | __u32 id; | 291 | __u32 id; |
292 | char name[64]; /* FIXME: move to a property? (RFC says so) */ | 292 | 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 | { | 351 | { |
352 | return (void __user *)(uintptr_t)arg; | 352 | return (void __user *)(uintptr_t)arg; |
353 | } | 353 | } |
354 | #endif | ||
354 | 355 | ||
355 | /* ioctls */ | 356 | /* ioctls */ |
356 | 357 | ||
@@ -358,6 +359,9 @@ static inline void __user *media_get_uptr(__u64 arg) | |||
358 | #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) | 359 | #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) |
359 | #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) | 360 | #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) |
360 | #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) | 361 | #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) |
362 | |||
363 | #if 0 /* Let's postpone it to Kernel 4.6 */ | ||
361 | #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) | 364 | #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) |
365 | #endif | ||
362 | 366 | ||
363 | #endif /* __LINUX_MEDIA_H */ | 367 | #endif /* __LINUX_MEDIA_H */ |