Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'media/v4.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
- some last time changes before we stablize the new entity function
integer numbers at uAPI
- probe: fix erroneous return value on i2c/adp1653 driver
- fix tx 5v detect regression on adv7604 driver
- fix missing unlock on error in vpfe_prepare_pipeline() on
davinci_vpfe driver

* tag 'media/v4.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] media: Sanitise the reserved fields of the G_TOPOLOGY IOCTL arguments
[media] media.h: postpone connectors entities
[media] media.h: use hex values for range offsets, move connectors base up.
[media] adv7604: fix tx 5v detect regression
[media] media.h: get rid of MEDIA_ENT_F_CONN_TEST
[media] [for,v4.5] media.h: increase the spacing between function ranges
[media] media: i2c/adp1653: probe: fix erroneous return value
[media] media: davinci_vpfe: fix missing unlock on error in vpfe_prepare_pipeline()

+34 -34
-4
Documentation/DocBook/media/v4l/media-types.xml
··· 57 57 <entry>Connector for a RGB composite signal.</entry> 58 58 </row> 59 59 <row> 60 - <entry><constant>MEDIA_ENT_F_CONN_TEST</constant></entry> 61 - <entry>Connector for a test generator.</entry> 62 - </row> 63 - <row> 64 60 <entry><constant>MEDIA_ENT_F_CAM_SENSOR</constant></entry> 65 61 <entry>Camera video sensor entity.</entry> 66 62 </row>
+1 -1
drivers/media/i2c/adp1653.c
··· 497 497 if (!client->dev.platform_data) { 498 498 dev_err(&client->dev, 499 499 "Neither DT not platform data provided\n"); 500 - return EINVAL; 500 + return -EINVAL; 501 501 } 502 502 flash->platform_data = client->dev.platform_data; 503 503 }
+1 -2
drivers/media/i2c/adv7604.c
··· 1960 1960 } 1961 1961 1962 1962 /* tx 5v detect */ 1963 - tx_5v = io_read(sd, 0x70) & info->cable_det_mask; 1963 + tx_5v = irq_reg_0x70 & info->cable_det_mask; 1964 1964 if (tx_5v) { 1965 1965 v4l2_dbg(1, debug, sd, "%s: tx_5v: 0x%x\n", __func__, tx_5v); 1966 - io_write(sd, 0x71, tx_5v); 1967 1966 adv76xx_s_detect_tx_5v_ctrl(sd); 1968 1967 if (handled) 1969 1968 *handled = true;
+1 -2
drivers/media/usb/au0828/au0828-video.c
··· 1843 1843 ent->function = MEDIA_ENT_F_CONN_RF; 1844 1844 break; 1845 1845 default: /* AU0828_VMUX_DEBUG */ 1846 - ent->function = MEDIA_ENT_F_CONN_TEST; 1847 - break; 1846 + continue; 1848 1847 } 1849 1848 1850 1849 ret = media_entity_pads_init(ent, 1, &dev->input_pad[i]);
+1 -1
drivers/staging/media/davinci_vpfe/vpfe_video.c
··· 147 147 mutex_lock(&mdev->graph_mutex); 148 148 ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev); 149 149 if (ret) { 150 - mutex_unlock(&video->lock); 150 + mutex_unlock(&mdev->graph_mutex); 151 151 return -ENOMEM; 152 152 } 153 153 media_entity_graph_walk_start(&graph, entity);
+30 -24
include/uapi/linux/media.h
··· 66 66 /* 67 67 * DVB entities 68 68 */ 69 - #define MEDIA_ENT_F_DTV_DEMOD (MEDIA_ENT_F_BASE + 1) 70 - #define MEDIA_ENT_F_TS_DEMUX (MEDIA_ENT_F_BASE + 2) 71 - #define MEDIA_ENT_F_DTV_CA (MEDIA_ENT_F_BASE + 3) 72 - #define MEDIA_ENT_F_DTV_NET_DECAP (MEDIA_ENT_F_BASE + 4) 69 + #define MEDIA_ENT_F_DTV_DEMOD (MEDIA_ENT_F_BASE + 0x00001) 70 + #define MEDIA_ENT_F_TS_DEMUX (MEDIA_ENT_F_BASE + 0x00002) 71 + #define MEDIA_ENT_F_DTV_CA (MEDIA_ENT_F_BASE + 0x00003) 72 + #define MEDIA_ENT_F_DTV_NET_DECAP (MEDIA_ENT_F_BASE + 0x00004) 73 + 74 + /* 75 + * I/O entities 76 + */ 77 + #define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 0x01001) 78 + #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002) 79 + #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003) 73 80 74 81 /* 75 82 * Connectors 76 83 */ 77 84 /* It is a responsibility of the entity drivers to add connectors and links */ 78 - #define MEDIA_ENT_F_CONN_RF (MEDIA_ENT_F_BASE + 21) 79 - #define MEDIA_ENT_F_CONN_SVIDEO (MEDIA_ENT_F_BASE + 22) 80 - #define MEDIA_ENT_F_CONN_COMPOSITE (MEDIA_ENT_F_BASE + 23) 81 - /* For internal test signal generators and other debug connectors */ 82 - #define MEDIA_ENT_F_CONN_TEST (MEDIA_ENT_F_BASE + 24) 85 + #ifdef __KERNEL__ 86 + /* 87 + * For now, it should not be used in userspace, as some 88 + * definitions may change 89 + */ 83 90 84 - /* 85 - * I/O entities 86 - */ 87 - #define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 31) 88 - #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 32) 89 - #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 33) 91 + #define MEDIA_ENT_F_CONN_RF (MEDIA_ENT_F_BASE + 0x30001) 92 + #define MEDIA_ENT_F_CONN_SVIDEO (MEDIA_ENT_F_BASE + 0x30002) 93 + #define MEDIA_ENT_F_CONN_COMPOSITE (MEDIA_ENT_F_BASE + 0x30003) 94 + 95 + #endif 90 96 91 97 /* 92 98 * Don't touch on those. The ranges MEDIA_ENT_F_OLD_BASE and ··· 297 291 __u32 id; 298 292 char name[64]; /* FIXME: move to a property? (RFC says so) */ 299 293 __u32 function; /* Main function of the entity */ 300 - __u16 reserved[12]; 301 - }; 294 + __u32 reserved[6]; 295 + } __attribute__ ((packed)); 302 296 303 297 /* Should match the specific fields at media_intf_devnode */ 304 298 struct media_v2_intf_devnode { 305 299 __u32 major; 306 300 __u32 minor; 307 - }; 301 + } __attribute__ ((packed)); 308 302 309 303 struct media_v2_interface { 310 304 __u32 id; ··· 316 310 struct media_v2_intf_devnode devnode; 317 311 __u32 raw[16]; 318 312 }; 319 - }; 313 + } __attribute__ ((packed)); 320 314 321 315 struct media_v2_pad { 322 316 __u32 id; 323 317 __u32 entity_id; 324 318 __u32 flags; 325 - __u16 reserved[9]; 326 - }; 319 + __u32 reserved[5]; 320 + } __attribute__ ((packed)); 327 321 328 322 struct media_v2_link { 329 323 __u32 id; 330 324 __u32 source_id; 331 325 __u32 sink_id; 332 326 __u32 flags; 333 - __u32 reserved[5]; 334 - }; 327 + __u32 reserved[6]; 328 + } __attribute__ ((packed)); 335 329 336 330 struct media_v2_topology { 337 331 __u64 topology_version; ··· 351 345 __u32 num_links; 352 346 __u32 reserved4; 353 347 __u64 ptr_links; 354 - }; 348 + } __attribute__ ((packed)); 355 349 356 350 static inline void __user *media_get_uptr(__u64 arg) 357 351 {