diff --git a/projects/RPi/patches/linux/linux-01-RPi_support-0bb9f12.patch b/projects/RPi/patches/linux/linux-01-RPi_support-6a6b2b8.patch similarity index 98% rename from projects/RPi/patches/linux/linux-01-RPi_support-0bb9f12.patch rename to projects/RPi/patches/linux/linux-01-RPi_support-6a6b2b8.patch index deb88d0e5d..1b18ea7660 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support-0bb9f12.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support-6a6b2b8.patch @@ -1,7 +1,7 @@ -From 1f812580c0379c4c9beaf2edb2fd37b2bf79c9ca Mon Sep 17 00:00:00 2001 +From ad0db0e90f50ac83b02e62c9ace019a0f98ce44f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 001/104] Main bcm2708 linux port +Subject: [PATCH 001/112] Main bcm2708 linux port Signed-off-by: popcornmix --- @@ -8559,13 +8559,13 @@ index 362927c4..e23fffb 100644 unsigned int data_early:1; /* Data finished before cmd */ -- -1.8.5.1 +1.8.5.5 -From e88053f7840141c2e06f13d66388b0c6695adda8 Mon Sep 17 00:00:00 2001 +From 6a4b92da01a6986f4f413584430c9c666a26cc78 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 7 May 2013 22:20:24 +0100 -Subject: [PATCH 002/104] Add quick config. +Subject: [PATCH 002/112] Add quick config. This is designed for quick compiling when developing. No modules are needed and it includes all Pi specific drivers @@ -8778,13 +8778,13 @@ index 0000000..e5efe75 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -- -1.8.5.1 +1.8.5.5 -From c2da5e7113151f2ac284d829e53374f0a7fbc884 Mon Sep 17 00:00:00 2001 +From 9c8b9033b0c5e2dd8ca9b38a1ea0659da330e78e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 003/104] Add dwc_otg driver +Subject: [PATCH 003/112] Add dwc_otg driver Signed-off-by: popcornmix --- @@ -65853,13 +65853,13 @@ index 0000000..cdc9963 +test_main(); +0; -- -1.8.5.1 +1.8.5.5 -From b3bdb85694ccffc2ae992af4f5f1258122e9a941 Mon Sep 17 00:00:00 2001 +From 77dadb820565427eb2f7ed36dd9fad629764ba20 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 -Subject: [PATCH 004/104] bcm2708 watchdog driver +Subject: [PATCH 004/112] bcm2708 watchdog driver Signed-off-by: popcornmix --- @@ -66289,13 +66289,13 @@ index 0000000..2f19203 +MODULE_ALIAS_MISCDEV(TEMP_MINOR); +MODULE_LICENSE("GPL"); -- -1.8.5.1 +1.8.5.5 -From 17015767c052cc2e39e95df9367363d6c3d39976 Mon Sep 17 00:00:00 2001 +From 004c3448a678c9e66f794372ff04324cb553044a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 -Subject: [PATCH 005/104] bcm2708 framebuffer driver +Subject: [PATCH 005/112] bcm2708 framebuffer driver Signed-off-by: popcornmix --- @@ -69331,13 +69331,13 @@ index 3c14e43..7626beb 100644 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -- -1.8.5.1 +1.8.5.5 -From f001f353e21c972e1d85e91ebcdf28ee6bb97868 Mon Sep 17 00:00:00 2001 +From 3b64636909d324d22167261eef8abe369964945b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 006/104] bcm2708 vchiq driver +Subject: [PATCH 006/112] bcm2708 vchiq driver Signed-off-by: popcornmix --- @@ -81835,13 +81835,13 @@ index 0000000..b6bfa21 + return vchiq_build_time; +} -- -1.8.5.1 +1.8.5.5 -From 8ef0bc2eeaa6f8497775a1ae133a455a330cba2c Mon Sep 17 00:00:00 2001 +From 7d7ca91c026f29d730fe915d5682d994b906d006 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 007/104] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 007/112] cma: Add vc_cma driver to enable use of CMA Signed-off-by: popcornmix --- @@ -83128,13 +83128,13 @@ index 0000000..5325832 + +#endif /* VC_CMA_H */ -- -1.8.5.1 +1.8.5.5 -From d06c9404a5bce1896099cebb0b824fd685ecc568 Mon Sep 17 00:00:00 2001 +From b450711b7109a35ffdb4d500286a71350876affd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 008/104] bcm2708: alsa sound driver +Subject: [PATCH 008/112] bcm2708: alsa sound driver Signed-off-by: popcornmix --- @@ -85453,13 +85453,13 @@ index 0000000..af3e6eb + +#endif // _VC_AUDIO_DEFS_H_ -- -1.8.5.1 +1.8.5.5 -From 972d2f082e7632e7ec834aca6a29317d10183f3f Mon Sep 17 00:00:00 2001 +From e9935576836463f3cd126f885e7b422a621bd12c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 009/104] Allow mac address to be set in smsc95xx +Subject: [PATCH 009/112] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -85550,13 +85550,13 @@ index 3f38ba8..60076fe 100644 if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { -- -1.8.5.1 +1.8.5.5 -From 143236b020cec2798dca6a1f3752a5a6a05388d2 Mon Sep 17 00:00:00 2001 +From 1a78d6b8a284e9783426ea47f376d7b9e3d6062b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 May 2012 23:12:13 +0100 -Subject: [PATCH 010/104] Fixes for sdhci-bcm2708 +Subject: [PATCH 010/112] Fixes for sdhci-bcm2708 possible fix for sdcard missing status. Thank naren @@ -86805,13 +86805,13 @@ index e23fffb..b1b6537 100644 const struct sdhci_ops *ops; /* Low level hw interface */ -- -1.8.5.1 +1.8.5.5 -From 7107ef8966b27ad895c608156af8e74773c94322 Mon Sep 17 00:00:00 2001 +From 2d4aa45aadcd4ccfb3851bde127d069ff5c818cf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Nov 2013 18:56:10 +0000 -Subject: [PATCH 011/104] Add Chris Boot's i2c and spi drivers. +Subject: [PATCH 011/112] Add Chris Boot's i2c and spi drivers. --- arch/arm/configs/bcmrpi_cutdown_defconfig | 9 + @@ -88172,13 +88172,13 @@ index 0000000..180264a +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -- -1.8.5.1 +1.8.5.5 -From fde085753fe04b9905eacb9e3709bd8770dd06dc Mon Sep 17 00:00:00 2001 +From 05c90e82a8030661c9a65f3fe599d080885ad4c4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 012/104] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 012/112] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) --- @@ -88238,13 +88238,13 @@ index 63b8273..2a36411 100644 bcm_register_device(&bcm2708_fb_device); bcm_register_device(&bcm2708_usb_device); -- -1.8.5.1 +1.8.5.5 -From 3b34d2a49827328b4510ab6e2457d9c255e57c1c Mon Sep 17 00:00:00 2001 +From e9cf5a49e985fc5349aaf9b63ca166892d810d39 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:46:42 +0100 -Subject: [PATCH 013/104] Add FIQ patch to dwc_otg driver. Enable with +Subject: [PATCH 013/112] Add FIQ patch to dwc_otg driver. Enable with dwc_otg.fiq_fix_enable=1. Should give about 10% more ARM performance. Thanks to Gordon and Costas @@ -89401,13 +89401,13 @@ index e46d9bb..6b2c7d0 100644 struct lm_device *lmdev; #elif defined(PCI_INTERFACE) -- -1.8.5.1 +1.8.5.5 -From 1e6c69c718646bd62dd18c169be1141b08fb1ef3 Mon Sep 17 00:00:00 2001 +From 9a8f74d92f3d96f412e55c283c39f1ad01d04fea Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Sep 2012 15:17:53 +0100 -Subject: [PATCH 016/104] Avoid dynamic memory allocation for channel lock in +Subject: [PATCH 016/112] Avoid dynamic memory allocation for channel lock in USB driver. Thanks ddv2005. --- @@ -89511,13 +89511,13 @@ index b7b6b0c..76b5085 100644 /** -- -1.8.5.1 +1.8.5.5 -From ef229a6e0acdce0fd487fc428f26fd217943dfba Mon Sep 17 00:00:00 2001 +From afeae3ba4bee6d9efebc964ee1828d0b59b97f78 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 017/104] Add cpufreq driver +Subject: [PATCH 017/112] Add cpufreq driver --- arch/arm/Kconfig | 1 + @@ -89816,13 +89816,13 @@ index 0000000..7bc55bd +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -- -1.8.5.1 +1.8.5.5 -From 472ea9b1077b0f4f3653da4075315314def96053 Mon Sep 17 00:00:00 2001 +From e2055bb44f9b735e1bcbdc8b8a79227d0777bca7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:58:47 +0100 -Subject: [PATCH 018/104] config: add missing options from 3.6.y kernel +Subject: [PATCH 018/112] config: add missing options from 3.6.y kernel --- arch/arm/configs/bcmrpi_defconfig | 741 ++++++++++++++++++++++++++++++++------ @@ -90855,13 +90855,13 @@ index 31f5afaa..31adf3c 100644 # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=y -- -1.8.5.1 +1.8.5.5 -From 5590291d0c7761f2a67c59460deb00b70ca5537a Mon Sep 17 00:00:00 2001 +From e1f95f8716c76f633320ff208df20eb2f0a51d5b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 8 Apr 2013 21:12:48 +0100 -Subject: [PATCH 019/104] Add NAK holdoff scheme. Enabled by default, disable +Subject: [PATCH 019/112] Add NAK holdoff scheme. Enabled by default, disable with dwc_otg.nak_holdoff_enable=0. Thanks gsh --- @@ -91068,13 +91068,13 @@ index a9dea55..ebee73a 100644 if (!DWC_CIRCLEQ_EMPTY(&qh->qtd_list)) { /* Add back to inactive non-periodic schedule. */ -- -1.8.5.1 +1.8.5.5 -From 80b5fb53ce772196781e1ff1f1d1cdf289318b3d Mon Sep 17 00:00:00 2001 +From ab4f6ce99333b8a70098a50c4445be6bcfbd3426 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 020/104] Added hwmon/thermal driver for reporting core +Subject: [PATCH 020/112] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian --- @@ -91619,13 +91619,13 @@ index 0000000..3f9a733 + +module_platform_driver(bcm2835_thermal_driver); -- -1.8.5.1 +1.8.5.5 -From c1895ad01b34056bf2dc144f57eb1c88a3c94d6a Mon Sep 17 00:00:00 2001 +From 5c780a22fff22628fbc9fdbb4ce6412c2a1b28aa Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Apr 2013 12:16:36 +0100 -Subject: [PATCH 021/104] Enable multiple ALSA channels +Subject: [PATCH 021/112] Enable multiple ALSA channels --- arch/arm/mach-bcm2708/bcm2708.c | 54 ++++++++++++++++++++++++++++++++++++----- @@ -91697,13 +91697,13 @@ index 8b6ff52..b4d94bf 100644 static struct resource bcm2708_spi_resources[] = { -- -1.8.5.1 +1.8.5.5 -From cde076912c8a0cc16d5674e4ee78f0082d8a9114 Mon Sep 17 00:00:00 2001 +From 89cf8a221ec7a26e94638f1eee606bc49b51b44d Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Sun, 4 Nov 2012 15:55:01 +0000 -Subject: [PATCH 022/104] Make sure we wait for the reset to finish +Subject: [PATCH 022/112] Make sure we wait for the reset to finish --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2 ++ @@ -91723,13 +91723,13 @@ index aff59df..1a23d4b 100644 mphi_int_count = 0; } -- -1.8.5.1 +1.8.5.5 -From ac63df73b27c39c5901a71be0dd42ae14b69a1d9 Mon Sep 17 00:00:00 2001 +From f59d6db68ab5d1e6fc461e8aa57f9fd58910f935 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 023/104] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 023/112] lirc: added support for RaspberryPi GPIO --- drivers/staging/media/lirc/Kconfig | 6 + @@ -92467,13 +92467,13 @@ index 0000000..c76f696 +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Enable debugging messages"); -- -1.8.5.1 +1.8.5.5 -From c549b00c3c488ebc298e4cf3a22e2838622aaf85 Mon Sep 17 00:00:00 2001 +From 2a88e7ae3f965ee0bdd35ac20c168e9f562451f9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Dec 2012 18:23:03 +0000 -Subject: [PATCH 024/104] Default to dwc_otp.lpm_enable=0 +Subject: [PATCH 024/112] Default to dwc_otp.lpm_enable=0 --- drivers/usb/host/dwc_otg/dwc_otg_driver.c | 2 +- @@ -92493,13 +92493,13 @@ index d58ebd7..c2bb596 100644 .ahb_thr_ratio = -1, .power_down = -1, -- -1.8.5.1 +1.8.5.5 -From e39be26586764d47374cfe26e29b5d81ec9c1c94 Mon Sep 17 00:00:00 2001 +From 1e8da824fe695474fb9775233e83886e1424f5b9 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 9 Jan 2013 16:12:04 +0000 -Subject: [PATCH 025/104] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent +Subject: [PATCH 025/112] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent kernel memory corruption, escalating to OOPS under high USB load. --- @@ -92533,13 +92533,13 @@ index ebee73a..b3efaf4 100644 DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags); -- -1.8.5.1 +1.8.5.5 -From 0b2e7460e1c8fb52a6b0b0137530c04346cd94fe Mon Sep 17 00:00:00 2001 +From 1113300f968a40d83ea49e9b0e0748632a6e7bef Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:51:55 +0100 -Subject: [PATCH 026/104] Add hwrng (hardware random number generator) driver +Subject: [PATCH 026/112] Add hwrng (hardware random number generator) driver --- arch/arm/mach-bcm2708/include/mach/platform.h | 1 + @@ -92717,13 +92717,13 @@ index 0000000..1ffa7d7 +MODULE_DESCRIPTION("BCM2708 H/W Random Number Generator (RNG) driver"); +MODULE_LICENSE("GPL and additional rights"); -- -1.8.5.1 +1.8.5.5 -From 4fc73e35565dc78b6d820347a614f5475e23a513 Mon Sep 17 00:00:00 2001 +From a4e053e8ed17631dee1ef1664b63dac1a5d064dc Mon Sep 17 00:00:00 2001 From: Technion Date: Mon, 11 Feb 2013 22:08:53 +1100 -Subject: [PATCH 027/104] Changed wording on logging. Previously, we received +Subject: [PATCH 027/112] Changed wording on logging. Previously, we received errors like this: mmc0: could read SD Status register (SSR) at the 3th attempt A more sensible response is now returned. A typo also fixed in comments. @@ -92755,13 +92755,13 @@ index 897cea6..ea11f9c 100644 for (i = 0; i < 16; i++) -- -1.8.5.1 +1.8.5.5 -From d58960a1b6989ebfe570d6143f0efb639cb90a7a Mon Sep 17 00:00:00 2001 +From 130a66832fb4eb79ab404e0ad2c6ab5fe9321828 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:36:47 +0000 -Subject: [PATCH 028/104] dwc_otg: Fix unsafe access of QTD during URB enqueue +Subject: [PATCH 028/112] dwc_otg: Fix unsafe access of QTD during URB enqueue In dwc_otg_hcd_urb_enqueue during qtd creation, it was possible that the transaction could complete almost immediately after the qtd was assigned @@ -92845,13 +92845,13 @@ index b3efaf4..1554be5 100644 } } -- -1.8.5.1 +1.8.5.5 -From 5c4dec8d702429cf200341a766e18b4f388ee890 Mon Sep 17 00:00:00 2001 +From 6eb6097cde38723ca6e0653be3a236912adc9881 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:38:40 +0000 -Subject: [PATCH 029/104] dwc_otg: Fix incorrect URB allocation error handling +Subject: [PATCH 029/112] dwc_otg: Fix incorrect URB allocation error handling If the memory allocation for a dwc_otg_urb failed, the kernel would OOPS because for some reason a member of the *unallocated* struct was set to @@ -92889,13 +92889,13 @@ index 35d03d1..6fe30e3 100644 } -- -1.8.5.1 +1.8.5.5 -From 92b885cca7af3ea1854260de4567a2aa297af384 Mon Sep 17 00:00:00 2001 +From ac044a2f29b90a2eb6a574401508df55d376fa37 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 24 Feb 2013 16:30:57 +0000 -Subject: [PATCH 030/104] Add retry on error and tidy of temperature driver +Subject: [PATCH 030/112] Add retry on error and tidy of temperature driver --- drivers/thermal/bcm2835-thermal.c | 78 ++++++++++++++------------------------- @@ -93019,13 +93019,13 @@ index 3f9a733..85fceb5 100644 static int bcm2835_get_trip_type(struct thermal_zone_device * thermal_dev, int trip_num, enum thermal_trip_type *trip_type) { -- -1.8.5.1 +1.8.5.5 -From a3fafeedc791fee74442171a5f41f84d1a3e1d4a Mon Sep 17 00:00:00 2001 +From 46622b2b93e5b0bac1cb65d7f6a02b12d921cd02 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 28 Feb 2013 16:52:51 +0000 -Subject: [PATCH 031/104] dwc_otg: fix potential use-after-free case in +Subject: [PATCH 031/112] dwc_otg: fix potential use-after-free case in interrupt handler If a transaction had previously aborted, certain interrupts are @@ -93054,13 +93054,13 @@ index 1a23d4b..7af455d 100644 if (hcint.b.nyet) { retval |= handle_hc_nyet_intr(dwc_otg_hcd, hc, hc_regs, qtd); -- -1.8.5.1 +1.8.5.5 -From 3c6243657b8b45c50278312525a3b45b4efd8b3f Mon Sep 17 00:00:00 2001 +From 3e70e3bcf51ab7f227da9e4bbc7248a94354f1ba Mon Sep 17 00:00:00 2001 From: P33M Date: Sun, 3 Mar 2013 14:45:53 +0000 -Subject: [PATCH 032/104] dwc_otg: add handling of SPLIT transaction data +Subject: [PATCH 032/112] dwc_otg: add handling of SPLIT transaction data toggle errors Previously a data toggle error on packets from a USB1.1 device behind @@ -93112,13 +93112,13 @@ index 7af455d..a27dacd 100644 if (hcint.b.nyet) { /* -- -1.8.5.1 +1.8.5.5 -From 82605784af95892e484ff69b8be9e32a0455112b Mon Sep 17 00:00:00 2001 +From ce82a3c93fc76c6008409aa6a56a2bdaf31114c5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 21:14:28 +0100 -Subject: [PATCH 033/104] Add bitbanging pullups, use them for w1-gpio +Subject: [PATCH 033/112] Add bitbanging pullups, use them for w1-gpio Allows parasite power to work, uses module option pullup=1 --- @@ -93254,13 +93254,13 @@ index e10acc2..667fdd5 100644 } } -- -1.8.5.1 +1.8.5.5 -From d1fca5b1c47f4b0a73e9871cdccb166cf4242500 Mon Sep 17 00:00:00 2001 +From e02a454756a3b859344aeb1eed9685c97f7fae04 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 21 Mar 2013 19:36:17 +0000 -Subject: [PATCH 034/104] dwc_otg: implement tasklet for returning URBs to +Subject: [PATCH 034/112] dwc_otg: implement tasklet for returning URBs to usbcore hcd layer The dwc_otg driver interrupt handler for transfer completion will spend @@ -93499,13 +93499,13 @@ index 2b4a14e..39787e3 100644 } -- -1.8.5.1 +1.8.5.5 -From bf94c45f5299eb4daf8c5b3e38be448fe6d34f3e Mon Sep 17 00:00:00 2001 +From 8b7682b6c528cf5ea61673d01b7335e375788419 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Apr 2013 00:08:36 +0100 -Subject: [PATCH 036/104] dwc_otg: fix NAK holdoff and allow on split +Subject: [PATCH 036/112] dwc_otg: fix NAK holdoff and allow on split transactions only This corrects a bug where if a single active non-periodic endpoint @@ -93572,13 +93572,13 @@ index 533b17d..73f7643 100644 DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); if (hcd->available_host_channels < 1) { -- -1.8.5.1 +1.8.5.5 -From a6e8b37565f8cdad3a3561fe17d28a5a5e3596b3 Mon Sep 17 00:00:00 2001 +From 58bc818b6557315c05e3feb6db3a15efebe29c59 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 26 Apr 2013 10:08:31 -0700 -Subject: [PATCH 037/104] Merge pull request #286 from +Subject: [PATCH 037/112] Merge pull request #286 from martinezjavier/rpi-3.6.y-dev add mmap support and some cleanups to bcm2835 ALSA driver @@ -94056,13 +94056,13 @@ index 080bd5c..36afee3 100755 struct semaphore buffers_update_sem; struct semaphore control_sem; -- -1.8.5.1 +1.8.5.5 -From c3ca49ed88967168e5f396cec8c3b5a48c4df669 Mon Sep 17 00:00:00 2001 +From 80e7b776b50485226263238c4db63414e2b5accb Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 038/104] Speed up console framebuffer imageblit function +Subject: [PATCH 038/112] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -94271,13 +94271,13 @@ index a2bb276..436494f 100644 start_index, pitch_index); } else -- -1.8.5.1 +1.8.5.5 -From 57ba80f0281adbf9c72d9ecb7bef3d25fc02cdc6 Mon Sep 17 00:00:00 2001 +From e375d969abf4ee0bd92b32cfc7bddbb97cf96ad4 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 039/104] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 039/112] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -94370,13 +94370,13 @@ index fb795c3..fa72af0 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -- -1.8.5.1 +1.8.5.5 -From c311556c2366961d43af724d03bc56b57d5c9c86 Mon Sep 17 00:00:00 2001 +From 9d8bdb8ef42112010afc14559bafca96b6463340 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 16:00:25 +0300 -Subject: [PATCH 040/104] bcm2708_fb: DMA acceleration for fb_copyarea +Subject: [PATCH 040/112] bcm2708_fb: DMA acceleration for fb_copyarea Based on http://www.raspberrypi.org/phpBB3/viewtopic.php?p=62425#p62425 Also used Simon's dmaer_master module as a reference for tweaking DMA @@ -94835,13 +94835,13 @@ index 08d9238..5758146 100644 return 0; -- -1.8.5.1 +1.8.5.5 -From 286ce4c4276af3bfdcdfd7a7c65746b49612dc68 Mon Sep 17 00:00:00 2001 +From 05a5486a61a81836e11bb7a13d9f8aab1c3d70e0 Mon Sep 17 00:00:00 2001 From: Mike Bradley Date: Mon, 17 Jun 2013 11:31:42 -0700 -Subject: [PATCH 041/104] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock +Subject: [PATCH 041/112] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock held in completion handler usb_hcd_unlink_urb_from_ep must be called with the HCD lock held. Calling it @@ -94925,13 +94925,13 @@ index 39787e3..5e6a26a 100644 return 0; } -- -1.8.5.1 +1.8.5.5 -From 98f9312df6fe78fd96ec801ba0748fc3aac46b85 Mon Sep 17 00:00:00 2001 +From 9415cdf36066c5178596f5a63efd59c7e298b608 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Thu, 4 Apr 2013 11:05:21 +0100 -Subject: [PATCH 042/104] USB fix using a FIQ to implement split transactions +Subject: [PATCH 042/112] USB fix using a FIQ to implement split transactions This commit adds a FIQ implementaion that schedules the split transactions using a FIQ so we don't get @@ -96331,13 +96331,13 @@ index 1b1f83c..c8590b5 100644 if (status.b.sr) { -- -1.8.5.1 +1.8.5.5 -From 7eff18fbc9a9f14cd9de2044546576609c00c8c2 Mon Sep 17 00:00:00 2001 +From 976c8d0b09228a03c52e5de5d84a068c413538af Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 11:39:46 +0100 -Subject: [PATCH 043/104] dwc_otg: fix device attributes and avoid kernel +Subject: [PATCH 043/112] dwc_otg: fix device attributes and avoid kernel warnings on boot --- @@ -96403,13 +96403,13 @@ index fab2961..af1cd4d 100644 #ifdef CONFIG_USB_DWC_OTG_LPM -- -1.8.5.1 +1.8.5.5 -From 3a1f9dbff7a7a2c98943c405c145cbe9546e5b18 Mon Sep 17 00:00:00 2001 +From a3fa4e65844880b560d1c78dd9fb31370aeb81ba Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 Jul 2013 23:55:52 +0100 -Subject: [PATCH 044/104] dcw_otg: avoid logging function that can cause panics +Subject: [PATCH 044/112] dcw_otg: avoid logging function that can cause panics See: https://github.com/raspberrypi/firmware/issues/21 Thanks to cleverca22 for fix @@ -96431,13 +96431,13 @@ index af1cd4d..9da0c92 100644 return sprintf(buf, "SPRAM Dump\n"); } -- -1.8.5.1 +1.8.5.5 -From 8d1b22347da132a6f1cf808986b445c698043cc9 Mon Sep 17 00:00:00 2001 +From c8c1da5eb997750b6ece0c40f9bf372ae7d0cacc Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 20:41:26 +0100 -Subject: [PATCH 045/104] dwc_otg: mask correct interrupts after transaction +Subject: [PATCH 045/112] dwc_otg: mask correct interrupts after transaction error recovery The dwc_otg driver will unmask certain interrupts on a transaction @@ -96501,13 +96501,13 @@ index 8e5789f..fd73e41 100644 } -- -1.8.5.1 +1.8.5.5 -From d4d5424fcfbfc6fbb94e85b19f7de5e5f30eeaf3 Mon Sep 17 00:00:00 2001 +From 88d3b4bae79d3481679e567ab63f313c5370dc31 Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 21:48:41 +0100 -Subject: [PATCH 046/104] dwc_otg: fiq: prevent FIQ thrash and incorrect state +Subject: [PATCH 046/112] dwc_otg: fiq: prevent FIQ thrash and incorrect state passing to IRQ In the case of a transaction to a device that had previously aborted @@ -96561,13 +96561,13 @@ index fd73e41..2ec0565 100644 // Clear the interrupt, this will also clear the HAINT bit FIQ_WRITE((dwc_regs_base + 0x500 + (channel * 0x20) + 0x8), hcint.d32); -- -1.8.5.1 +1.8.5.5 -From cd438f3a4062e6d211bce8a06475144a44a215ce Mon Sep 17 00:00:00 2001 +From 8307590ca17ff85a73a71aa14162af02e3b412e4 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Mon, 8 Jul 2013 04:12:19 +0100 -Subject: [PATCH 047/104] Fix function tracing +Subject: [PATCH 047/112] Fix function tracing --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 12 ++++++------ @@ -96629,13 +96629,13 @@ index 2ec0565..083b1c3 100644 /* entry takes care to store registers we will be treading on here */ -- -1.8.5.1 +1.8.5.5 -From 6b2dc8280a0cd790d5c2b564e5e8cfa4b8159886 Mon Sep 17 00:00:00 2001 +From dafb6fb888925b3564afe1d4c4904e65499e0a58 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 16:32:41 +0100 -Subject: [PATCH 048/104] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue +Subject: [PATCH 048/112] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue --- drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 53 ++++++++++++++-------------- @@ -96719,13 +96719,13 @@ index d1c5c2b..315c803 100644 } -- -1.8.5.1 +1.8.5.5 -From 0aa276452e04e9c2b716a45415778e3b97c15d84 Mon Sep 17 00:00:00 2001 +From 294d9c329426749baa187b698125091e374d54d5 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 17:07:26 +0100 -Subject: [PATCH 049/104] dwc_otg: prevent OOPSes during device disconnects +Subject: [PATCH 049/112] dwc_otg: prevent OOPSes during device disconnects The dwc_otg_urb_enqueue function is thread-unsafe. In particular the access of urb->hcpriv, usb_hcd_link_urb_to_ep, dwc_otg_urb->qtd and @@ -96863,13 +96863,13 @@ index 7b92025..db95851 100644 return retval; -- -1.8.5.1 +1.8.5.5 -From 539d70be4607cc54153c52c13ba038c1abd67459 Mon Sep 17 00:00:00 2001 +From c7a8c9aa2155042f1a22beecff6c7e90e022491e Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Jul 2013 14:08:26 +0100 -Subject: [PATCH 050/104] dwc_otg: prevent BUG() in TT allocation if hub +Subject: [PATCH 050/112] dwc_otg: prevent BUG() in TT allocation if hub address is > 16 A fixed-size array is used to track TT allocation. This was @@ -96956,13 +96956,13 @@ index 083b1c3..c76910d 100644 } -- -1.8.5.1 +1.8.5.5 -From 1cd57c1789e75b8dbf29460a99b71f95d7606082 Mon Sep 17 00:00:00 2001 +From c6e32bfb635342cb0c1644da81b7de7460ada443 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 23 Jul 2013 14:15:32 +0100 -Subject: [PATCH 051/104] dwc_otg: make channel halts with unknown state less +Subject: [PATCH 051/112] dwc_otg: make channel halts with unknown state less damaging If the IRQ received a channel halt interrupt through the FIQ @@ -97004,13 +97004,13 @@ index c76910d..5fd8613 100644 } -- -1.8.5.1 +1.8.5.5 -From 6c9a269d0ebed2d9c0c880aba002fb509f5b6d91 Mon Sep 17 00:00:00 2001 +From 8e827ab02f045f7b5c922f11b74d3ceb837cbb64 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 30 Jul 2013 09:58:48 +0100 -Subject: [PATCH 052/104] dwc_otg: fiq_split: use TTs with more granularity +Subject: [PATCH 052/112] dwc_otg: fiq_split: use TTs with more granularity This fixes certain issues with split transaction scheduling. @@ -97127,13 +97127,13 @@ index 5fd8613..a959a49 100644 /* Try to queue more transfers now that there's a free channel. */ -- -1.8.5.1 +1.8.5.5 -From dcb55eb247ce604ffd3471f8e638c27a9bbb505d Mon Sep 17 00:00:00 2001 +From 2c6625e1f3c5cb4a4018c8685364d68afe4de22d Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 2 Aug 2013 10:04:18 +0100 -Subject: [PATCH 053/104] dwc_otg: fix potential sleep while atomic during urb +Subject: [PATCH 053/112] dwc_otg: fix potential sleep while atomic during urb enqueue Fixes a regression introduced with eb1b482a. Kmalloc called from @@ -97159,13 +97159,13 @@ index 87e517d..88c0544 100644 if (alloc_bandwidth) { allocate_bus_bandwidth(hcd, -- -1.8.5.1 +1.8.5.5 -From f061c2c39d1a89136e3c032f1fe7dfa7626a12a0 Mon Sep 17 00:00:00 2001 +From bae72f04d7330138b1364e6fa249ee3de90d2566 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:42:12 +0100 -Subject: [PATCH 054/104] dwc_otg: make fiq_split_enable imply fiq_fix_enable +Subject: [PATCH 054/112] dwc_otg: make fiq_split_enable imply fiq_fix_enable Failing to set up the FIQ correctly would result in "IRQ 32: nobody cared" errors in dmesg. @@ -97191,13 +97191,13 @@ index 176dc14..f06c3d22 100644 DWC_DRIVER_VERSION, #ifdef LM_INTERFACE -- -1.8.5.1 +1.8.5.5 -From 463dabcb64b407a25dca517fe2a709fe6a4e93a1 Mon Sep 17 00:00:00 2001 +From 0ea6e42a5d83ea2acedee1f42fd6df9e6e52cccc Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:47:12 +0100 -Subject: [PATCH 055/104] dwc_otg: prevent crashes on host port disconnects +Subject: [PATCH 055/112] dwc_otg: prevent crashes on host port disconnects Fix several issues resulting in crashes or inconsistent state if a Model A root port was disconnected. @@ -97352,13 +97352,13 @@ index 88c0544..ae4271a 100644 if (status) { DWC_PRINTF("Uknown urb status %d\n", status); -- -1.8.5.1 +1.8.5.5 -From 0bb9c26033f2611812e436dab64537436f779c42 Mon Sep 17 00:00:00 2001 +From b869d5539dc2b99cf827ef5459bedda83e4ff17a Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 13:17:58 +0100 -Subject: [PATCH 056/104] dwc_otg: prevent leaking URBs during enqueue +Subject: [PATCH 056/112] dwc_otg: prevent leaking URBs during enqueue A dwc_otg_urb would get leaked if the HCD enqueue function failed for any reason. Free the URB at the appropriate points. @@ -97391,13 +97391,13 @@ index ae4271a..ee8eec9 100644 return retval; } -- -1.8.5.1 +1.8.5.5 -From bb32849d64a43eb051c8e789bae746fa3486fff8 Mon Sep 17 00:00:00 2001 +From 7395d0d23fc1ccb26c80a8e34542c957e94faa01 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Sep 2013 16:08:27 +0100 -Subject: [PATCH 057/104] dwc_otg: Enable NAK holdoff for control split +Subject: [PATCH 057/112] dwc_otg: Enable NAK holdoff for control split transactions Certain low-speed devices take a very long time to complete a @@ -97427,13 +97427,13 @@ index 3a549a1..f8dc4be 100644 hc->qh->nak_frame = dwc_otg_hcd_get_frame_number(hcd); } -- -1.8.5.1 +1.8.5.5 -From ad50b23365ef8e690388b2c497bfb29bf8ee1cb2 Mon Sep 17 00:00:00 2001 +From e20646daea154a4100e659a7bcae645f73421a86 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 20 Sep 2013 19:07:56 +0100 -Subject: [PATCH 058/104] dwc_otg: Fix for occasional lockup on boot when doing +Subject: [PATCH 058/112] dwc_otg: Fix for occasional lockup on boot when doing a USB reset --- @@ -97456,13 +97456,13 @@ index f8dc4be..64d33a5 100644 return 1; } -- -1.8.5.1 +1.8.5.5 -From 7ae9f06e26a0e265262f2b6c67c2dbbbe013383c Mon Sep 17 00:00:00 2001 +From 0b780ab670818598ffe6b20069ef19e77da038c6 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 27 Sep 2013 14:42:24 +0100 -Subject: [PATCH 059/104] dwc_otg: Don't issue traffic to LS devices in FS mode +Subject: [PATCH 059/112] dwc_otg: Don't issue traffic to LS devices in FS mode Issuing low-speed packets when the root port is in full-speed mode causes the root port to stop responding. Explicitly fail when @@ -97501,13 +97501,13 @@ index 1904f6a..22300f0 100644 if (qtd == NULL) { DWC_ERROR("DWC OTG HCD URB Enqueue failed creating QTD\n"); -- -1.8.5.1 +1.8.5.5 -From 7ff008b20453e3df85234187853ad1fc88b438ea Mon Sep 17 00:00:00 2001 +From 3cfac16f37ff37e993fa66e1975d9a5bcfc75838 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Wed, 6 Nov 2013 13:25:20 +0400 -Subject: [PATCH 060/104] ARM: bcm2708: PL01X debug include was moved into +Subject: [PATCH 060/112] ARM: bcm2708: PL01X debug include was moved into arch/arm/include/debug/ --- @@ -97525,13 +97525,13 @@ index 2d0dc1c..b24304a 100644 -#include +#include -- -1.8.5.1 +1.8.5.5 -From 2fd6ebb7220ceddd6a0eb9da722400c846d0e15d Mon Sep 17 00:00:00 2001 +From 2ba7e8407436303acb8f12f6ebc0c5672cb1c379 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 20 Nov 2013 11:22:05 +0000 -Subject: [PATCH 062/104] sdhci: Only do one iteration of PIO reading loop +Subject: [PATCH 062/112] sdhci: Only do one iteration of PIO reading loop --- drivers/mmc/host/sdhci.c | 1 + @@ -97550,13 +97550,13 @@ index 0b44ccf..51bb441 100644 DBG("PIO transfer complete - %d blocks left.\n", host->blocks); -- -1.8.5.1 +1.8.5.5 -From 6da01f099b10db018350ca54284f32a24ab4d04d Mon Sep 17 00:00:00 2001 +From 9a7917ef735b353901daf88367d572225500400b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 2 Sep 2013 16:44:57 +0100 -Subject: [PATCH 063/104] vchiq: create_pagelist copes with vmalloc memory +Subject: [PATCH 063/112] vchiq: create_pagelist copes with vmalloc memory Signed-off-by: Daniel Stone --- @@ -97694,13 +97694,13 @@ index 2b5fa56..b3bdaa2 100644 kfree(pagelist); } -- -1.8.5.1 +1.8.5.5 -From f42d49648303ba07d8adfe55f95c01e16b0a8378 Mon Sep 17 00:00:00 2001 +From 4a009b5a7854bc48923f9197f2f07eb7ea8eb6f1 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 30 Sep 2013 17:04:55 +0100 -Subject: [PATCH 064/104] vchiq: fix the shim message release +Subject: [PATCH 064/112] vchiq: fix the shim message release Signed-off-by: Daniel Stone --- @@ -97789,13 +97789,13 @@ index f752f8d..fe9bd80 100644 } -- -1.8.5.1 +1.8.5.5 -From 03a232c4c1cc7d2cf156165651322e375f8fb112 Mon Sep 17 00:00:00 2001 +From 52c1f81bbadac48b3af9c61c34035267ffd08719 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 9 Nov 2013 22:37:21 +0000 -Subject: [PATCH 065/104] vchiq: export additional symbols +Subject: [PATCH 065/112] vchiq: export additional symbols Signed-off-by: Daniel Stone --- @@ -97823,13 +97823,13 @@ index fe9bd80..a0b069d 100644 /*********************************************************** * Name: vchi_initialise -- -1.8.5.1 +1.8.5.5 -From 7c5ce9b36a5be14c505b0bb6ed8fa01a0fab5284 Mon Sep 17 00:00:00 2001 +From fd85d8015f27b7b50225f7cca84ba13aca6e5935 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 066/104] bcm2835: add v4l2 camera device +Subject: [PATCH 066/112] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -103814,13 +103814,13 @@ index 0000000..9d1d11e + +#endif /* MMAL_VCHIQ_H */ -- -1.8.5.1 +1.8.5.5 -From 399d98d65e16f8ecc6b4b61acf8bfe468a79dd6d Mon Sep 17 00:00:00 2001 +From 1cdf6e566889ff44db3f2e59c163483310409279 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 10:58:01 +0000 -Subject: [PATCH 067/104] V4L2: Fix EV values. Add manual shutter speed control +Subject: [PATCH 067/112] V4L2: Fix EV values. Add manual shutter speed control V4L2 EV values should be in units of 1/1000. Corrected. Add support for V4L2_CID_EXPOSURE_ABSOLUTE which should @@ -104010,13 +104010,13 @@ index c611b58..d8aace5 100644 enum mmal_parameter_camera_config_timestamp_mode { -- -1.8.5.1 +1.8.5.5 -From f3e8830bf7a43deb2ba6fde2c117c5077f946137 Mon Sep 17 00:00:00 2001 +From b7b3c79cedb09b44ea6d4835cdf8730a474930a4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:01:53 +0000 -Subject: [PATCH 068/104] V4L2: Correct JPEG Q-factor range +Subject: [PATCH 068/112] V4L2: Correct JPEG Q-factor range Should be 1-100, not 0-100 @@ -104051,13 +104051,13 @@ index 481d1f6..c2e4c64 100644 }; -- -1.8.5.1 +1.8.5.5 -From 950102591d708ea19fac2861bb6ba3327c296895 Mon Sep 17 00:00:00 2001 +From 6dc8f1fa93a6933042723025e16f39c6f2f1359b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:05:24 +0000 -Subject: [PATCH 069/104] V4L2: Fix issue of driver jamming if STREAMON failed. +Subject: [PATCH 069/112] V4L2: Fix issue of driver jamming if STREAMON failed. Fix issue where the driver was left in a partially enabled state if STREAMON failed, and would then reject many IOCTLs @@ -104090,13 +104090,13 @@ index 47fe45d..2743074 100644 } -- -1.8.5.1 +1.8.5.5 -From de70c2610f49149a9d3f55143bdfb5a2cc4dc992 Mon Sep 17 00:00:00 2001 +From 2079741c6f8cb95c7a982060e71732e65a830013 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 15:30:48 +0000 -Subject: [PATCH 070/104] V4L2: Fix ISO controls. +Subject: [PATCH 070/112] V4L2: Fix ISO controls. Driver was passing the index to the GPU, and not the desired ISO value. @@ -104146,13 +104146,13 @@ index c2e4c64..92863f7 100644 { V4L2_CID_IMAGE_STABILIZATION, MMAL_CONTROL_TYPE_STD, -- -1.8.5.1 +1.8.5.5 -From 9d4822ed8cff4b090c383b1814a7e7a70aa1530c Mon Sep 17 00:00:00 2001 +From ddc7a29973a9725d6c687e33a2d83cad9dcb8aac Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 16:40:24 +0000 -Subject: [PATCH 071/104] V4L2: Add flicker avoidance controls +Subject: [PATCH 071/112] V4L2: Add flicker avoidance controls Add support for V4L2_CID_POWER_LINE_FREQUENCY to set flicker avoidance frequencies. @@ -104264,13 +104264,13 @@ index d8aace5..b3d2c39 100644 enum mmal_parameter_rate_control_mode { MMAL_VIDEO_RATECONTROL_DEFAULT, -- -1.8.5.1 +1.8.5.5 -From 23f04eeb9fc6b65f7426475450eb638089f7cb37 Mon Sep 17 00:00:00 2001 +From 572aa661a6b18a70ea3ac1c9fd8c58dc2a05020f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Dec 2013 15:54:13 +0000 -Subject: [PATCH 072/104] V4L2: Add support for frame rate control. +Subject: [PATCH 072/112] V4L2: Add support for frame rate control. Add support for frame rate (or time per frame as V4L2 inverts it) control via s_parm. @@ -104506,13 +104506,13 @@ index b3d2c39..0f2bd50 100644 MMAL_PARAM_TIMESTAMP_MODE_ZERO = 0, /* Always timestamp frames as 0 */ MMAL_PARAM_TIMESTAMP_MODE_RAW_STC, /* Use the raw STC value -- -1.8.5.1 +1.8.5.5 -From 13116a3ebff95d0780091293e3fcd3acb9d4cb78 Mon Sep 17 00:00:00 2001 +From c7d6634fd53f3bf505c15b9983c521fe459ea5e6 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:30:09 +0000 -Subject: [PATCH 073/104] V4L2: Improve G_FBUF handling so we pass conformance +Subject: [PATCH 073/112] V4L2: Improve G_FBUF handling so we pass conformance Return some sane numbers for get framebuffer so that we pass conformance. @@ -104549,13 +104549,13 @@ index 8c38d03..c8d8742 100644 return 0; } -- -1.8.5.1 +1.8.5.5 -From aaa746ba4bd69831ceb5c7db5553e418aacb0ad6 Mon Sep 17 00:00:00 2001 +From b5eb0440b1a981c5524a49483a301d7852e0ca99 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:29:39 +0000 -Subject: [PATCH 074/104] V4L2: Fix information advertised through g_vidfmt +Subject: [PATCH 074/112] V4L2: Fix information advertised through g_vidfmt Width and height were being stored based on incorrect values. @@ -104592,13 +104592,13 @@ index c8d8742..4766a9c 100644 } -- -1.8.5.1 +1.8.5.5 -From d362dba4c8bdb31e037952493f53b6b157a62cd2 Mon Sep 17 00:00:00 2001 +From 5e2ad2212f19d6cc820b998174faf14575919554 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:03:54 +0000 -Subject: [PATCH 075/104] V4L2: Add support for inline H264 headers +Subject: [PATCH 075/112] V4L2: Add support for inline H264 headers Add support for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER to control H264 inline headers. @@ -104900,13 +104900,13 @@ index 0f2bd50..b08a4b0 100644 /** Valid mirror modes */ -- -1.8.5.1 +1.8.5.5 -From 959244a068715383e1db290d96c36b061d3c436c Mon Sep 17 00:00:00 2001 +From 634ec51b214f5b5d89bfb0a3bd248f35bba406fa Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 19 Dec 2013 17:33:02 +0000 -Subject: [PATCH 076/104] V4L2: Fix JPEG timestamp issue +Subject: [PATCH 076/112] V4L2: Fix JPEG timestamp issue JPEG images were coming through from the GPU with timestamp of 0. Detect this and give current system time instead @@ -104941,13 +104941,13 @@ index 4766a9c..9fc90a2 100644 (int)dev->capture.kernel_start_ts. tv_sec, -- -1.8.5.1 +1.8.5.5 -From c6cf17a9b3785be529191ab66b4324d5e43a081b Mon Sep 17 00:00:00 2001 +From 1f553cbd7bfae30cde740dc6632a62f749af8b4d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:24:55 +0000 -Subject: [PATCH 077/104] V4L2: Fix issue when switching down JPEG resolution. +Subject: [PATCH 077/112] V4L2: Fix issue when switching down JPEG resolution. JPEG buffer size calculation is based on input resolution. Input resolution was being configured after output port @@ -105106,13 +105106,13 @@ index 9fc90a2..4780107 100644 } else { /* configure buffering */ -- -1.8.5.1 +1.8.5.5 -From 6f84b2590c6ae7ad827d63573c0bedf19b429283 Mon Sep 17 00:00:00 2001 +From ee5121fea198e4d4f9a296c4c2a1330edf0c187d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 2 Dec 2013 16:57:44 +0000 -Subject: [PATCH 078/104] config: Enable V4L / MMAL driver +Subject: [PATCH 078/112] config: Enable V4L / MMAL driver --- arch/arm/configs/bcmrpi_defconfig | 3 +++ @@ -105133,13 +105133,13 @@ index 31adf3c..c850de6 100644 CONFIG_USB_SI470X=m CONFIG_I2C_SI470X=m -- -1.8.5.1 +1.8.5.5 -From f012588f649028422fb02b91516288064cd8d751 Mon Sep 17 00:00:00 2001 +From acf95602264483f3b7ce995e2691b336c4361866 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 9 Jan 2014 16:05:20 +0000 -Subject: [PATCH 079/104] gpio: support low and high level interrupts +Subject: [PATCH 079/112] gpio: support low and high level interrupts --- arch/arm/mach-bcm2708/bcm2708_gpio.c | 52 +++++++++++++++++++++++++----------- @@ -105254,13 +105254,13 @@ index d0339eb..bab8a49 100644 static struct irq_chip bcm2708_irqchip = { -- -1.8.5.1 +1.8.5.5 -From 183e6466a752674c2f341286af659ad06eff1351 Mon Sep 17 00:00:00 2001 +From e2e92a0efbe1cf226f702730ca590c88bb132246 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 080/104] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 080/112] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -105332,13 +105332,13 @@ index 00fd7fd..f5fd4bd 100644 #ifdef CONFIG_MEMCG_SWAP -- -1.8.5.1 +1.8.5.5 -From 26dadf35d7a0a6ecfb66956ba84a40f6ce2053e0 Mon Sep 17 00:00:00 2001 +From d146559df3f7a23befb638bbdfa211fc86603be9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 27 Jan 2014 21:00:56 +0000 -Subject: [PATCH 081/104] config: enable RT2800USB_RT3573 and RT2800USB_RT55XX +Subject: [PATCH 081/112] config: enable RT2800USB_RT3573 and RT2800USB_RT55XX wifi drivers --- @@ -105360,13 +105360,13 @@ index 2d79fac..271679d 100644 CONFIG_RTL8192CU=m CONFIG_ZD1211RW=m -- -1.8.5.1 +1.8.5.5 -From 897b917e640fe9eeecb4118821ad1b7b1fc737ce Mon Sep 17 00:00:00 2001 +From 7b00ba735c36544b3e3161de977d7526ae8aeaac Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 29 Jan 2014 21:37:00 +0000 -Subject: [PATCH 082/104] video: relax the dimensions check for rotated +Subject: [PATCH 082/112] video: relax the dimensions check for rotated displays --- @@ -105398,13 +105398,13 @@ index 5758146..935288d 100644 region->height <= 0 || region->height > info->var.yres || region->sx < 0 || region->sx >= info->var.xres || -- -1.8.5.1 +1.8.5.5 -From 4a22ba19fee89cd7253c2cb97057660fc6b76b6b Mon Sep 17 00:00:00 2001 +From 10831c8883e4ef150d191e98ceb6208c2d89d123 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 083/104] dmaengine: Add support for BCM2708 +Subject: [PATCH 083/112] dmaengine: Add support for BCM2708 Add support for DMA controller of BCM2708 as used in the Raspberry Pi. Currently it only supports cyclic DMA. @@ -106041,13 +106041,13 @@ index 0000000..7d5ed19 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.1 +1.8.5.5 -From 80bbb262e31d2cf747c56d861ba2bcb5096ac29e Mon Sep 17 00:00:00 2001 +From 6016efc11abbe3748738960a37bc2945ca8b3fc4 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:33:38 +0100 -Subject: [PATCH 084/104] ASoC: Add support for BCM2708 +Subject: [PATCH 084/112] ASoC: Add support for BCM2708 This driver adds support for digital audio (I2S) for the BCM2708 SoC that is used by the @@ -107065,13 +107065,13 @@ index 0000000..ebaf3d6 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.1 +1.8.5.5 -From 6591d5790611ab07bbf6b2aeb358436fc09c7920 Mon Sep 17 00:00:00 2001 +From b19ab4a9dd4fddcd7e7acf6c6ed39bb3640db512 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:37:51 +0100 -Subject: [PATCH 085/104] BCM2708: Extend mach header +Subject: [PATCH 085/112] BCM2708: Extend mach header Extend the headers of the mach-bcm2708 in order to support I2S and DMA engine. @@ -107113,13 +107113,13 @@ index 992a630..2e7e1bb 100644 #define BSC0_BASE (BCM2708_PERI_BASE + 0x205000) /* BSC0 I2C/TWI */ #define UART1_BASE (BCM2708_PERI_BASE + 0x215000) /* Uart 1 */ -- -1.8.5.1 +1.8.5.5 -From 711911d222a5bc7ebd6156003c86dbf3e9d751a6 Mon Sep 17 00:00:00 2001 +From 3735ad0cbfe38267180ba8005dc893c53d7f4931 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 086/104] ASoC: Add support for PCM5102A codec +Subject: [PATCH 086/112] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -107244,13 +107244,13 @@ index 0000000..126f1e9 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.1 +1.8.5.5 -From d0cd836cbe94e0fe96a8ed82780b0f5a104fc34e Mon Sep 17 00:00:00 2001 +From 639a16c209864fa58cab4b85622eed8398efd7ff Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:04:54 +0100 -Subject: [PATCH 087/104] BCM2708: Add I2S support to board file +Subject: [PATCH 087/112] BCM2708: Add I2S support to board file Adds the required initializations for I2S to the board file of mach-bcm2708. @@ -107305,13 +107305,13 @@ index b4d94bf..d44d70e 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -- -1.8.5.1 +1.8.5.5 -From 387d45787c47f457fce425b1fec091428d5a9fb2 Mon Sep 17 00:00:00 2001 +From 0a986c0491e4dcae90fcb44b24081a9597d6e4a9 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 088/104] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 088/112] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -107460,13 +107460,13 @@ index 0000000..4b70b45 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -- -1.8.5.1 +1.8.5.5 -From 29b2e0b803792b727372fa23dd620dcbbdb274ae Mon Sep 17 00:00:00 2001 +From 17302035e7305ff9d661941922a67744f64aff1d Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 089/104] BCM2708: Add HifiBerry DAC to board file +Subject: [PATCH 089/112] BCM2708: Add HifiBerry DAC to board file This adds the initalization of the HifiBerry DAC to the mach-bcm2708 board file. @@ -107514,13 +107514,13 @@ index d44d70e..cfb1634 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -- -1.8.5.1 +1.8.5.5 -From 01bfd9e4e1bbfdf4a444803ba5de1fbd2d758100 Mon Sep 17 00:00:00 2001 +From 7f64d5de7e0a2b79704f033bfe79b7b72279ed2a Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 18:55:53 +0100 -Subject: [PATCH 090/104] ASoC: BCM2708: Add 24 bit support +Subject: [PATCH 090/112] ASoC: BCM2708: Add 24 bit support This adds 24 bit support to the I2S driver of the BCM2708. Besides enabling the 24 bit flags, it includes two bug fixes: @@ -107592,13 +107592,13 @@ index ebaf3d6..a179216 100644 .period_bytes_min = 32, .period_bytes_max = 64 * PAGE_SIZE, -- -1.8.5.1 +1.8.5.5 -From 19a0db40773543651395da01065272e4f3e80928 Mon Sep 17 00:00:00 2001 +From 4926c6239315e8cbe8648f5e3d168451eb5acc9c Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 2 Dec 2013 20:28:22 +0100 -Subject: [PATCH 091/104] BCM2708: Add I2S and DMA support to default config +Subject: [PATCH 091/112] BCM2708: Add I2S and DMA support to default config This commit adds several modules that are needed for I2S support for the Raspberry Pi to the defconfig. @@ -107638,13 +107638,13 @@ index 271679d..9f5bbe0 100644 CONFIG_UIO_PDRV_GENIRQ=m CONFIG_STAGING=y -- -1.8.5.1 +1.8.5.5 -From 5986abebcae9f5c9cbec370ffdd241248ec60e8f Mon Sep 17 00:00:00 2001 +From d08396304e6c58e560cb162512cdb3dab4cac3cd Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 20:50:28 +0100 -Subject: [PATCH 092/104] ASoC: BCM2708: Add support for RPi-DAC +Subject: [PATCH 092/112] ASoC: BCM2708: Add support for RPi-DAC This adds a machine driver for the RPi-DAC. @@ -107956,13 +107956,13 @@ index 0000000..b4eaa44 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.1 +1.8.5.5 -From 2fb5853fcd29c5b15775231431fe2b1a87e388da Mon Sep 17 00:00:00 2001 +From b4b54c3b368ba2915a032e81ea225ff75b444bdf Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Thu, 2 Jan 2014 23:34:21 +0000 -Subject: [PATCH 093/104] Added support for Proto i2s DAC +Subject: [PATCH 093/112] Added support for Proto i2s DAC --- arch/arm/mach-bcm2708/bcm2708.c | 19 ++++++ @@ -108144,13 +108144,13 @@ index 0000000..4dc8705 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -- -1.8.5.1 +1.8.5.5 -From 825191515033e6e83d0054f498ef0688eac0c24e Mon Sep 17 00:00:00 2001 +From 29a864982a5ea553c883673b3c7ffaa5e4287ee4 Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Fri, 3 Jan 2014 05:50:49 +0000 -Subject: [PATCH 094/104] Add support for additional ASoC i2s drivers +Subject: [PATCH 094/112] Add support for additional ASoC i2s drivers --- sound/soc/bcm/rpi-cs534x.c | 105 +++++++++++++++++++++++++++++++++++++++++++ @@ -108698,13 +108698,13 @@ index 0000000..6115033 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to a TDA1541A"); +MODULE_LICENSE("GPL"); -- -1.8.5.1 +1.8.5.5 -From e2300674803f2431697d20cd696a86f5be059be8 Mon Sep 17 00:00:00 2001 +From 4de76a7ee7072fe132c61d6e3c7b80e48e12ce1e Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Fri, 3 Jan 2014 05:51:53 +0000 -Subject: [PATCH 095/104] Add support for additional ASoC i2s drivers +Subject: [PATCH 095/112] Add support for additional ASoC i2s drivers --- arch/arm/mach-bcm2708/bcm2708.c | 135 ++++++++++++++++++++++++++++++++++------ @@ -108983,13 +108983,13 @@ index 95a9d44..eb869fa 100644 +obj-$(CONFIG_SND_BCM2708_SOC_RPI_CODEC_ESS9018) += snd-soc-rpi-ess9018.o +obj-$(CONFIG_SND_BCM2708_SOC_RPI_CODEC_PCM5102A) += snd-soc-rpi-pcm5102a.o -- -1.8.5.1 +1.8.5.5 -From 0ec9685082a81c90b3fa21e7e45cc568cc8df6c6 Mon Sep 17 00:00:00 2001 +From f64dc83780e2e3d2ae38dd21849e43e7fe4f4479 Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Sat, 4 Jan 2014 18:27:33 +0000 -Subject: [PATCH 096/104] Remove compile warning +Subject: [PATCH 096/112] Remove compile warning --- sound/soc/bcm/rpi-proto.c | 3 +-- @@ -109017,13 +109017,13 @@ index 5752af2..c1532d4 100644 ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL, sysclk, SND_SOC_CLOCK_IN); -- -1.8.5.1 +1.8.5.5 -From e084ccebac1fd088a730da4221ce12e2ce4fb40e Mon Sep 17 00:00:00 2001 +From cad1d26d4270cf4a572a523efdab792ce40f7909 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 097/104] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 097/112] ASoC: wm8804: Implement MCLK configuration options, add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for most sample rates. At 192kHz only 128xfs is supported. The existing driver selects 128xfs automatically for some lower samples rates. By using an @@ -109137,13 +109137,13 @@ index 8ec14f5..e72d4f4 100644 #endif /* _WM8804_H */ -- -1.8.5.1 +1.8.5.5 -From 8108bfa5588aef0df4ccf95a989033d5ddb66fa5 Mon Sep 17 00:00:00 2001 +From 4df4a3515b628fd019bad52af743a2c545187aa5 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 098/104] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 098/112] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -109352,13 +109352,13 @@ index 0000000..e4f769d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -- -1.8.5.1 +1.8.5.5 -From 1c0ad350ddfd3c45a0273a71e1e980012067def8 Mon Sep 17 00:00:00 2001 +From 867f95ad6f7da7e3cf1a09bebd25e7aa8787948c Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:26:08 +0100 -Subject: [PATCH 099/104] BCM2708: Added support for HiFiBerry Digi board Board +Subject: [PATCH 099/112] BCM2708: Added support for HiFiBerry Digi board Board initalization by I2C Signed-off-by: Daniel Matuschek @@ -109405,13 +109405,13 @@ index dfc2a8c..1cba3d7 100644 bcm_register_device(&snd_rpi_dac_device); bcm_register_device(&snd_pcm1794a_codec_device); -- -1.8.5.1 +1.8.5.5 -From c8cdbe72bb7d269623c469ccceedc82bff814b15 Mon Sep 17 00:00:00 2001 +From 3527b52823ca6a45d6edab4e7509572ea48b776d Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:27:28 +0100 -Subject: [PATCH 100/104] BCM2708: Added HiFiBerry Digi configuration option It +Subject: [PATCH 100/112] BCM2708: Added HiFiBerry Digi configuration option It will be compiled as a module by default. This also includes the WM8804 driver. @@ -109436,13 +109436,13 @@ index 61395f4..7b14c76 100644 CONFIG_SND_SOC_I2C_AND_SPI=m CONFIG_SND_SOC_PCM5102A=m -- -1.8.5.1 +1.8.5.5 -From 86eb794595540eb6a203d885a07b911358f81c5c Mon Sep 17 00:00:00 2001 +From ae965332dea310f0f19438420f881b23c362408a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 101/104] ASoC: wm8804: Set idle_bias_off to false Idle bias +Subject: [PATCH 101/112] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -109464,13 +109464,13 @@ index 7ec8381..50d0f0c 100644 .controls = wm8804_snd_controls, .num_controls = ARRAY_SIZE(wm8804_snd_controls), -- -1.8.5.1 +1.8.5.5 -From 4fab74d49a6dd951840774ae3691b4a159212ef2 Mon Sep 17 00:00:00 2001 +From fae66368b1c930e57316e07c01e09be30b141c56 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Feb 2014 16:34:37 +0000 -Subject: [PATCH 102/104] dma_engine: Replace DMA_SUCCESS with DMA_COMPLETE +Subject: [PATCH 102/112] dma_engine: Replace DMA_SUCCESS with DMA_COMPLETE --- drivers/dma/bcm2708-dmaengine.c | 2 +- @@ -109490,13 +109490,13 @@ index 7d5ed19..b244293 100644 spin_lock_irqsave(&c->vc.lock, flags); -- -1.8.5.1 +1.8.5.5 -From 015e26fe1b9c54d65dcc0a3c80383979a9e0dca3 Mon Sep 17 00:00:00 2001 +From ad58b4aed5668a114ac7de233c9b6bb867d5f4c7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Feb 2014 17:03:51 +0000 -Subject: [PATCH 103/104] bcm2708: Allow disk activity led gpio to be specified +Subject: [PATCH 103/112] bcm2708: Allow disk activity led gpio to be specified --- arch/arm/mach-bcm2708/bcm2708.c | 8 +++++++- @@ -109534,13 +109534,13 @@ index 1cba3d7..e9f0701 100644 +module_param(disk_led_active_low, uint, 0644); module_param(reboot_part, uint, 0644); -- -1.8.5.1 +1.8.5.5 -From 660b0008f5d318d8a29187b64c8717e75ad14c1c Mon Sep 17 00:00:00 2001 +From 1592f70b6de225ace424a9c9d6a7ee681c9db857 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Feb 2014 19:12:47 +0000 -Subject: [PATCH 104/104] bcm2708fb: Allow swapping of red/blue in 24/32 modes +Subject: [PATCH 104/112] bcm2708fb: Allow swapping of red/blue in 24/32 modes --- drivers/video/bcm2708_fb.c | 21 ++++++++++++++------- @@ -109611,5 +109611,1366 @@ index 935288d..3f1bc8f 100644 MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); +MODULE_PARM_DESC(fbswap, "Swap order of red and blue in 24 and 32 bit modes"); -- -1.8.5.1 +1.8.5.5 + + +From 4a0bcd58e7ec9e85aacb98cd2c2bf3fd630893d3 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Mon, 23 Dec 2013 15:42:21 +0000 +Subject: [PATCH 105/112] V4L2: Enable MJPEG encoding + +Requires GPU firmware update to support MJPEG encoder. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 7 +++++++ + drivers/media/platform/bcm2835/mmal-encodings.h | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 4780107..166039e 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -100,6 +100,13 @@ + .mmal = MMAL_ENCODING_H264, + .depth = 8, + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, ++ }, ++ { ++ .name = "MJPEG", ++ .fourcc = V4L2_PIX_FMT_MJPEG, ++ .mmal = MMAL_ENCODING_MJPEG, ++ .depth = 8, ++ .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, + } + }; + +diff --git a/drivers/media/platform/bcm2835/mmal-encodings.h b/drivers/media/platform/bcm2835/mmal-encodings.h +index 856e80e..764bb12 100644 +--- a/drivers/media/platform/bcm2835/mmal-encodings.h ++++ b/drivers/media/platform/bcm2835/mmal-encodings.h +@@ -27,6 +27,7 @@ + #define MMAL_ENCODING_VP6 MMAL_FOURCC('V', 'P', '6', ' ') + #define MMAL_ENCODING_THEORA MMAL_FOURCC('T', 'H', 'E', 'O') + #define MMAL_ENCODING_SPARK MMAL_FOURCC('S', 'P', 'R', 'K') ++#define MMAL_ENCODING_MJPEG MMAL_FOURCC('M', 'J', 'P', 'G') + + #define MMAL_ENCODING_JPEG MMAL_FOURCC('J', 'P', 'E', 'G') + #define MMAL_ENCODING_GIF MMAL_FOURCC('G', 'I', 'F', ' ') +-- +1.8.5.5 + + +From e770f02d700796ed4c28ecf1fcfb835923bf4f49 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Thu, 2 Jan 2014 15:57:06 +0000 +Subject: [PATCH 106/112] V4L2: Correct flag settings for compressed formats + +Set flags field correctly on enum_fmt_vid_cap for compressed +image formats. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 9 +++++++++ + drivers/media/platform/bcm2835/mmal-common.h | 1 + + 2 files changed, 10 insertions(+) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 166039e..7f99a14 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -69,6 +69,7 @@ + { + .name = "4:2:0, packed YUV", + .fourcc = V4L2_PIX_FMT_YUV420, ++ .flags = 0, + .mmal = MMAL_ENCODING_I420, + .depth = 12, + .mmal_component = MMAL_COMPONENT_CAMERA, +@@ -76,6 +77,7 @@ + { + .name = "4:2:2, packed, YUYV", + .fourcc = V4L2_PIX_FMT_YUYV, ++ .flags = 0, + .mmal = MMAL_ENCODING_YUYV, + .depth = 16, + .mmal_component = MMAL_COMPONENT_CAMERA, +@@ -83,6 +85,7 @@ + { + .name = "RGB24 (BE)", + .fourcc = V4L2_PIX_FMT_BGR24, ++ .flags = 0, + .mmal = MMAL_ENCODING_BGR24, + .depth = 24, + .mmal_component = MMAL_COMPONENT_CAMERA, +@@ -90,6 +93,7 @@ + { + .name = "JPEG", + .fourcc = V4L2_PIX_FMT_JPEG, ++ .flags = V4L2_FMT_FLAG_COMPRESSED, + .mmal = MMAL_ENCODING_JPEG, + .depth = 8, + .mmal_component = MMAL_COMPONENT_IMAGE_ENCODE, +@@ -97,6 +101,7 @@ + { + .name = "H264", + .fourcc = V4L2_PIX_FMT_H264, ++ .flags = V4L2_FMT_FLAG_COMPRESSED, + .mmal = MMAL_ENCODING_H264, + .depth = 8, + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, +@@ -104,6 +109,7 @@ + { + .name = "MJPEG", + .fourcc = V4L2_PIX_FMT_MJPEG, ++ .flags = V4L2_FMT_FLAG_COMPRESSED, + .mmal = MMAL_ENCODING_MJPEG, + .depth = 8, + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, +@@ -555,6 +561,7 @@ static int vidioc_enum_fmt_vid_overlay(struct file *file, void *priv, + + strlcpy(f->description, fmt->name, sizeof(f->description)); + f->pixelformat = fmt->fourcc; ++ f->flags = fmt->flags; + + return 0; + } +@@ -750,6 +757,8 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, + + strlcpy(f->description, fmt->name, sizeof(f->description)); + f->pixelformat = fmt->fourcc; ++ f->flags = fmt->flags; ++ + return 0; + } + +diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h +index 602b4a7..076f9a8 100644 +--- a/drivers/media/platform/bcm2835/mmal-common.h ++++ b/drivers/media/platform/bcm2835/mmal-common.h +@@ -26,6 +26,7 @@ + struct mmal_fmt { + char *name; + u32 fourcc; /* v4l2 format id */ ++ int flags; /* v4l2 flags field */ + u32 mmal; + int depth; + u32 mmal_component; /* MMAL component index to be used to encode */ +-- +1.8.5.5 + + +From f09751b92399dddb4dff33b63a2a85adb207b03a Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 12 Feb 2014 11:18:20 +0000 +Subject: [PATCH 107/112] V4L2: H264 profile & level ctrls, FPS control and + auto exp pri + +Several control handling updates. +H264 profile and level controls. +Timeperframe/FPS reworked to add V4L2_CID_EXPOSURE_AUTO_PRIORITY to +select whether AE is allowed to override the framerate specified. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 107 ++++++----- + drivers/media/platform/bcm2835/bcm2835-camera.h | 12 +- + drivers/media/platform/bcm2835/controls.c | 225 ++++++++++++++++++++++- + drivers/media/platform/bcm2835/mmal-parameters.h | 87 +++++++++ + 4 files changed, 383 insertions(+), 48 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 7f99a14..6d0d77a 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -36,7 +36,8 @@ + + #define BM2835_MMAL_VERSION "0.0.2" + #define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2" +- ++#define MIN_WIDTH 16 ++#define MIN_HEIGHT 16 + #define MAX_WIDTH 2592 + #define MAX_HEIGHT 1944 + #define MIN_BUFFER_SIZE (80*1024) +@@ -56,7 +57,7 @@ + static struct bm2835_mmal_dev *gdev; /* global device data */ + + #define FPS_MIN 1 +-#define FPS_MAX 30 ++#define FPS_MAX 90 + + /* timeperframe: min/max and default */ + static const struct v4l2_fract +@@ -903,10 +904,8 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, + camera_port->es.video.crop.y = 0; + camera_port->es.video.crop.width = f->fmt.pix.width; + camera_port->es.video.crop.height = f->fmt.pix.height; +- camera_port->es.video.frame_rate.num = +- dev->capture.timeperframe.denominator; +- camera_port->es.video.frame_rate.den = +- dev->capture.timeperframe.numerator; ++ camera_port->es.video.frame_rate.num = 0; ++ camera_port->es.video.frame_rate.den = 1; + + ret = vchiq_mmal_port_set_format(dev->instance, camera_port); + +@@ -940,8 +939,10 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, + preview_port->es.video.crop.y = 0; + preview_port->es.video.crop.width = f->fmt.pix.width; + preview_port->es.video.crop.height = f->fmt.pix.height; +- preview_port->es.video.frame_rate.num = 30; +- preview_port->es.video.frame_rate.den = 1; ++ preview_port->es.video.frame_rate.num = ++ dev->capture.timeperframe.denominator; ++ preview_port->es.video.frame_rate.den = ++ dev->capture.timeperframe.numerator; + ret = vchiq_mmal_port_set_format(dev->instance, preview_port); + if (overlay_enabled) { + ret = vchiq_mmal_port_connect_tunnel( +@@ -1116,22 +1117,56 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, + } + + ret = mmal_setup_components(dev, f); +- if (ret != 0) ++ if (ret != 0) { + v4l2_err(&dev->v4l2_dev, + "%s: failed to setup mmal components: %d\n", + __func__, ret); ++ ret = -EINVAL; ++ } + + return ret; + } + ++int vidioc_enum_framesizes(struct file *file, void *fh, ++ struct v4l2_frmsizeenum *fsize) ++{ ++ static const struct v4l2_frmsize_stepwise sizes = { ++ MIN_WIDTH, MAX_WIDTH, 2, ++ MIN_HEIGHT, MAX_HEIGHT, 2 ++ }; ++ int i; ++ ++ if (fsize->index) ++ return -EINVAL; ++ for (i = 0; i < ARRAY_SIZE(formats); i++) ++ if (formats[i].fourcc == fsize->pixel_format) ++ break; ++ if (i == ARRAY_SIZE(formats)) ++ return -EINVAL; ++ fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE; ++ fsize->stepwise = sizes; ++ return 0; ++} ++ + /* timeperframe is arbitrary and continous */ + static int vidioc_enum_frameintervals(struct file *file, void *priv, + struct v4l2_frmivalenum *fival) + { ++ int i; ++ + if (fival->index) + return -EINVAL; + +- /* regarding width & height - we support any */ ++ for (i = 0; i < ARRAY_SIZE(formats); i++) ++ if (formats[i].fourcc == fival->pixel_format) ++ break; ++ if (i == ARRAY_SIZE(formats)) ++ return -EINVAL; ++ ++ /* regarding width & height - we support any within range */ ++ if (fival->width < MIN_WIDTH || fival->width > MAX_WIDTH || ++ fival->height < MIN_HEIGHT || fival->height > MAX_HEIGHT) ++ return -EINVAL; + + fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS; + +@@ -1167,7 +1202,6 @@ static int vidioc_s_parm(struct file *file, void *priv, + struct bm2835_mmal_dev *dev = video_drvdata(file); + struct v4l2_fract tpf; + struct mmal_parameter_rational fps_param; +- int ret; + + if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; +@@ -1183,27 +1217,11 @@ static int vidioc_s_parm(struct file *file, void *priv, + parm->parm.capture.timeperframe = tpf; + parm->parm.capture.readbuffers = 1; + +- fps_param.num = dev->capture.timeperframe.denominator; +- fps_param.den = dev->capture.timeperframe.numerator; +- ret = vchiq_mmal_port_parameter_set(dev->instance, +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_PREVIEW], +- MMAL_PARAMETER_VIDEO_FRAME_RATE, +- &fps_param, sizeof(fps_param)); +- ret += vchiq_mmal_port_parameter_set(dev->instance, +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_VIDEO], +- MMAL_PARAMETER_VIDEO_FRAME_RATE, +- &fps_param, sizeof(fps_param)); +- ret += vchiq_mmal_port_parameter_set(dev->instance, +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_CAPTURE], +- MMAL_PARAMETER_VIDEO_FRAME_RATE, +- &fps_param, sizeof(fps_param)); +- if (ret) +- v4l2_dbg(0, bcm2835_v4l2_debug, &dev->v4l2_dev, +- "Failed to set fps ret %d\n", +- ret); ++ fps_param.num = 0; /* Select variable fps, and then use ++ * FPS_RANGE to select the actual limits. ++ */ ++ fps_param.den = 1; ++ set_framerate_params(dev); + + return 0; + } +@@ -1236,6 +1254,7 @@ static int vidioc_s_parm(struct file *file, void *priv, + .vidioc_querybuf = vb2_ioctl_querybuf, + .vidioc_qbuf = vb2_ioctl_qbuf, + .vidioc_dqbuf = vb2_ioctl_dqbuf, ++ .vidioc_enum_framesizes = vidioc_enum_framesizes, + .vidioc_enum_frameintervals = vidioc_enum_frameintervals, + .vidioc_g_parm = vidioc_g_parm, + .vidioc_s_parm = vidioc_s_parm, +@@ -1331,10 +1350,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + format->es->video.crop.y = 0; + format->es->video.crop.width = 1024; + format->es->video.crop.height = 768; +- format->es->video.frame_rate.num = +- dev->capture.timeperframe.denominator; +- format->es->video.frame_rate.den = +- dev->capture.timeperframe.numerator; ++ format->es->video.frame_rate.num = 0; /* Rely on fps_range */ ++ format->es->video.frame_rate.den = 1; + + format = + &dev->component[MMAL_COMPONENT_CAMERA]-> +@@ -1349,10 +1366,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + format->es->video.crop.y = 0; + format->es->video.crop.width = 1024; + format->es->video.crop.height = 768; +- format->es->video.frame_rate.num = +- dev->capture.timeperframe.denominator; +- format->es->video.frame_rate.den = +- dev->capture.timeperframe.numerator; ++ format->es->video.frame_rate.num = 0; /* Rely on fps_range */ ++ format->es->video.frame_rate.den = 1; + + format = + &dev->component[MMAL_COMPONENT_CAMERA]-> +@@ -1366,7 +1381,7 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + format->es->video.crop.y = 0; + format->es->video.crop.width = 2592; + format->es->video.crop.height = 1944; +- format->es->video.frame_rate.num = 30; ++ format->es->video.frame_rate.num = 0; /* Rely on fps_range */ + format->es->video.frame_rate.den = 1; + + dev->capture.width = format->es->video.width; +@@ -1374,6 +1389,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + dev->capture.fmt = &formats[0]; + dev->capture.encode_component = NULL; + dev->capture.timeperframe = tpf_default; ++ dev->capture.enc_profile = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH; ++ dev->capture.enc_level = V4L2_MPEG_VIDEO_H264_LEVEL_4_0; + + /* get the preview component ready */ + ret = vchiq_mmal_component_init( +@@ -1420,6 +1437,14 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + } + + { ++ struct vchiq_mmal_port *encoder_port = ++ &dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->output[0]; ++ encoder_port->format.encoding = MMAL_ENCODING_H264; ++ ret = vchiq_mmal_port_set_format(dev->instance, ++ encoder_port); ++ } ++ ++ { + unsigned int enable = 1; + vchiq_mmal_port_parameter_set( + dev->instance, +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 25aa91f..8822a1a 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.h ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.h +@@ -15,7 +15,7 @@ + * core driver device + */ + +-#define V4L2_CTRL_COUNT 21 /* number of v4l controls */ ++#define V4L2_CTRL_COUNT 24 /* number of v4l controls */ + + enum { + MMAL_COMPONENT_CAMERA = 0, +@@ -49,7 +49,9 @@ struct bm2835_mmal_dev { + int hflip; + int vflip; + enum mmal_parameter_exposuremode exposure_mode; ++ enum v4l2_exposure_auto_type exposure_mode_v4l2; + unsigned int manual_shutter_speed; ++ bool exp_auto_priority; + + /* allocated mmal instance and components */ + struct vchiq_mmal_instance *instance; +@@ -63,12 +65,16 @@ struct bm2835_mmal_dev { + unsigned int height; /* height */ + unsigned int stride; /* stride */ + struct mmal_fmt *fmt; +- struct v4l2_fract timeperframe; ++ struct v4l2_fract timeperframe; + + /* H264 encode bitrate */ + int encode_bitrate; + /* H264 bitrate mode. CBR/VBR */ + int encode_bitrate_mode; ++ /* H264 profile */ ++ enum v4l2_mpeg_video_h264_profile enc_profile; ++ /* H264 level */ ++ enum v4l2_mpeg_video_h264_level enc_level; + /* JPEG Q-factor */ + int q_factor; + +@@ -98,7 +104,7 @@ int bm2835_mmal_init_controls( + struct v4l2_ctrl_handler *hdl); + + int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev); +- ++int set_framerate_params(struct bm2835_mmal_dev *dev); + + /* Debug helpers */ + +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index cb062a9..45cf790 100644 +--- a/drivers/media/platform/bcm2835/controls.c ++++ b/drivers/media/platform/bcm2835/controls.c +@@ -69,7 +69,6 @@ + (s64)V4L2_MPEG_VIDEO_BITRATE_MODE_CBR, + }; + +- + enum bm2835_mmal_ctrl_type { + MMAL_CONTROL_TYPE_STD, + MMAL_CONTROL_TYPE_STD_MENU, +@@ -329,6 +328,9 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, + + } + dev->exposure_mode = exp_mode; ++ dev->exposure_mode_v4l2 = ctrl->val; ++ } else if (mmal_ctrl->id == V4L2_CID_EXPOSURE_AUTO_PRIORITY) { ++ dev->exp_auto_priority = ctrl->val; + } + + if (dev->exposure_mode == MMAL_PARAM_EXPOSUREMODE_OFF) +@@ -340,6 +342,8 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, + ret += vchiq_mmal_port_parameter_set(dev->instance, control, + MMAL_PARAMETER_EXPOSURE_MODE, + &exp_mode, sizeof(u32)); ++ ret += set_framerate_params(dev); ++ + return ret; + } + +@@ -540,8 +544,8 @@ static int ctrl_set_colfx(struct bm2835_mmal_dev *dev, + &dev->colourfx, sizeof(dev->colourfx)); + + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, +- "After: mmal_ctrl:%p ctrl id:0x%x ctrl val:%d ret %d(%d)\n", +- mmal_ctrl, ctrl->id, ctrl->val, ret, ++ "%s: After: mmal_ctrl:%p ctrl id:0x%x ctrl val:%d ret %d(%d)\n", ++ __func__, mmal_ctrl, ctrl->id, ctrl->val, ret, + (ret == 0 ? 0 : -EINVAL)); + return (ret == 0 ? 0 : EINVAL); + } +@@ -623,6 +627,117 @@ static int ctrl_set_video_encode_param_output(struct bm2835_mmal_dev *dev, + &u32_value, sizeof(u32_value)); + } + ++static int ctrl_set_video_encode_profile_level(struct bm2835_mmal_dev *dev, ++ struct v4l2_ctrl *ctrl, ++ const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) ++{ ++ struct mmal_parameter_video_profile param; ++ int ret = 0; ++ ++ if (ctrl->id == V4L2_CID_MPEG_VIDEO_H264_PROFILE) { ++ switch (ctrl->val) { ++ case V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE: ++ case V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE: ++ case V4L2_MPEG_VIDEO_H264_PROFILE_MAIN: ++ case V4L2_MPEG_VIDEO_H264_PROFILE_HIGH: ++ dev->capture.enc_profile = ctrl->val; ++ break; ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ } else if (ctrl->id == V4L2_CID_MPEG_VIDEO_H264_LEVEL) { ++ switch (ctrl->val) { ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_0: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1B: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_1: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_2: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_3: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_2_0: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_2_1: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_2_2: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_3_0: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_3_1: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_3_2: ++ case V4L2_MPEG_VIDEO_H264_LEVEL_4_0: ++ dev->capture.enc_level = ctrl->val; ++ break; ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ } ++ ++ if (!ret) { ++ switch (dev->capture.enc_profile) { ++ case V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE: ++ param.profile = MMAL_VIDEO_PROFILE_H264_BASELINE; ++ break; ++ case V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE: ++ param.profile = ++ MMAL_VIDEO_PROFILE_H264_CONSTRAINED_BASELINE; ++ break; ++ case V4L2_MPEG_VIDEO_H264_PROFILE_MAIN: ++ param.profile = MMAL_VIDEO_PROFILE_H264_MAIN; ++ break; ++ case V4L2_MPEG_VIDEO_H264_PROFILE_HIGH: ++ param.profile = MMAL_VIDEO_PROFILE_H264_HIGH; ++ break; ++ default: ++ /* Should never get here */ ++ break; ++ } ++ ++ switch (dev->capture.enc_level) { ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_0: ++ param.level = MMAL_VIDEO_LEVEL_H264_1; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1B: ++ param.level = MMAL_VIDEO_LEVEL_H264_1b; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_1: ++ param.level = MMAL_VIDEO_LEVEL_H264_11; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_2: ++ param.level = MMAL_VIDEO_LEVEL_H264_12; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_1_3: ++ param.level = MMAL_VIDEO_LEVEL_H264_13; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_2_0: ++ param.level = MMAL_VIDEO_LEVEL_H264_2; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_2_1: ++ param.level = MMAL_VIDEO_LEVEL_H264_21; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_2_2: ++ param.level = MMAL_VIDEO_LEVEL_H264_22; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_3_0: ++ param.level = MMAL_VIDEO_LEVEL_H264_3; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_3_1: ++ param.level = MMAL_VIDEO_LEVEL_H264_31; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_3_2: ++ param.level = MMAL_VIDEO_LEVEL_H264_32; ++ break; ++ case V4L2_MPEG_VIDEO_H264_LEVEL_4_0: ++ param.level = MMAL_VIDEO_LEVEL_H264_4; ++ break; ++ default: ++ /* Should never get here */ ++ break; ++ } ++ ++ ret = vchiq_mmal_port_parameter_set(dev->instance, ++ &dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->output[0], ++ mmal_ctrl->mmal_id, ++ ¶m, sizeof(param)); ++ } ++ return ret; ++} ++ + static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) + { + struct bm2835_mmal_dev *dev = +@@ -639,6 +754,9 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) + } + + ret = mmal_ctrl->setter(dev, ctrl, mmal_ctrl); ++ if (ret) ++ pr_warn("ctrl id:%d/MMAL param %08X- returned ret %d\n", ++ ctrl->id, mmal_ctrl->mmal_id, ret); + if (mmal_ctrl->ignore_errors) + ret = 0; + return ret; +@@ -725,6 +843,14 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) + false + }, + { ++ V4L2_CID_EXPOSURE_AUTO_PRIORITY, MMAL_CONTROL_TYPE_STD, ++ 0, 1, ++ 0, 1, NULL, ++ 0, /* Dummy MMAL ID as it gets mapped into FPS range*/ ++ &ctrl_set_exposure, ++ false ++ }, ++ { + V4L2_CID_EXPOSURE_METERING, + MMAL_CONTROL_TYPE_STD_MENU, + ~0x7, 2, V4L2_EXPOSURE_METERING_AVERAGE, 0, NULL, +@@ -814,6 +940,39 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) + &ctrl_set_video_encode_param_output, + true /* Errors ignored as requires latest firmware to work */ + }, ++ { ++ V4L2_CID_MPEG_VIDEO_H264_PROFILE, ++ MMAL_CONTROL_TYPE_STD_MENU, ++ ~((1<ctrls[c]) && (v4l2_ctrls[c].setter)) { + ret = v4l2_ctrls[c].setter(dev, dev->ctrls[c], + &v4l2_ctrls[c]); +- if (!v4l2_ctrls[c]. ignore_errors && ret) ++ if (!v4l2_ctrls[c].ignore_errors && ret) { ++ v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "Failed when setting default values for ctrl %d\n", ++ c); + break; ++ } + } + } + return ret; + } + ++int set_framerate_params(struct bm2835_mmal_dev *dev) ++{ ++ struct mmal_parameter_fps_range fps_range; ++ int ret; ++ ++ if ((dev->exposure_mode_v4l2 == V4L2_EXPOSURE_AUTO || ++ dev->exposure_mode_v4l2 == V4L2_EXPOSURE_APERTURE_PRIORITY) && ++ (dev->exp_auto_priority)) { ++ /* Variable FPS. Define min FPS as 1fps. ++ * Max as max defined FPS. ++ */ ++ fps_range.fps_low.num = 1; ++ fps_range.fps_low.den = 1; ++ fps_range.fps_high.num = dev->capture.timeperframe.denominator; ++ fps_range.fps_high.den = dev->capture.timeperframe.numerator; ++ } else { ++ /* Fixed FPS - set min and max to be the same */ ++ fps_range.fps_low.num = fps_range.fps_high.num = ++ dev->capture.timeperframe.denominator; ++ fps_range.fps_low.den = fps_range.fps_high.den = ++ dev->capture.timeperframe.numerator; ++ } ++ ++ v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "Set fps range to %d/%d to %d/%d\n", ++ fps_range.fps_low.num, ++ fps_range.fps_low.den, ++ fps_range.fps_high.num, ++ fps_range.fps_high.den ++ ); ++ ++ ret = vchiq_mmal_port_parameter_set(dev->instance, ++ &dev->component[MMAL_COMPONENT_CAMERA]-> ++ output[MMAL_CAMERA_PORT_PREVIEW], ++ MMAL_PARAMETER_FPS_RANGE, ++ &fps_range, sizeof(fps_range)); ++ ret += vchiq_mmal_port_parameter_set(dev->instance, ++ &dev->component[MMAL_COMPONENT_CAMERA]-> ++ output[MMAL_CAMERA_PORT_VIDEO], ++ MMAL_PARAMETER_FPS_RANGE, ++ &fps_range, sizeof(fps_range)); ++ ret += vchiq_mmal_port_parameter_set(dev->instance, ++ &dev->component[MMAL_COMPONENT_CAMERA]-> ++ output[MMAL_CAMERA_PORT_CAPTURE], ++ MMAL_PARAMETER_FPS_RANGE, ++ &fps_range, sizeof(fps_range)); ++ if (ret) ++ v4l2_dbg(0, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "Failed to set fps ret %d\n", ++ ret); ++ ++ return ret; ++ ++} + int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, + struct v4l2_ctrl_handler *hdl) + { +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +index b08a4b0..ae8fef9 100644 +--- a/drivers/media/platform/bcm2835/mmal-parameters.h ++++ b/drivers/media/platform/bcm2835/mmal-parameters.h +@@ -182,6 +182,14 @@ enum mmal_parameter_camera_config_timestamp_mode { + */ + }; + ++struct mmal_parameter_fps_range { ++ /**< Low end of the permitted framerate range */ ++ struct mmal_parameter_rational fps_low; ++ /**< High end of the permitted framerate range */ ++ struct mmal_parameter_rational fps_high; ++}; ++ ++ + /* camera configuration parameter */ + struct mmal_parameter_camera_config { + /* Parameters for setting up the image pools */ +@@ -293,6 +301,85 @@ enum mmal_parameter_rate_control_mode { + MMAL_VIDEO_RATECONTROL_CONSTANT_SKIP_FRAMES + }; + ++enum mmal_video_profile { ++ MMAL_VIDEO_PROFILE_H263_BASELINE, ++ MMAL_VIDEO_PROFILE_H263_H320CODING, ++ MMAL_VIDEO_PROFILE_H263_BACKWARDCOMPATIBLE, ++ MMAL_VIDEO_PROFILE_H263_ISWV2, ++ MMAL_VIDEO_PROFILE_H263_ISWV3, ++ MMAL_VIDEO_PROFILE_H263_HIGHCOMPRESSION, ++ MMAL_VIDEO_PROFILE_H263_INTERNET, ++ MMAL_VIDEO_PROFILE_H263_INTERLACE, ++ MMAL_VIDEO_PROFILE_H263_HIGHLATENCY, ++ MMAL_VIDEO_PROFILE_MP4V_SIMPLE, ++ MMAL_VIDEO_PROFILE_MP4V_SIMPLESCALABLE, ++ MMAL_VIDEO_PROFILE_MP4V_CORE, ++ MMAL_VIDEO_PROFILE_MP4V_MAIN, ++ MMAL_VIDEO_PROFILE_MP4V_NBIT, ++ MMAL_VIDEO_PROFILE_MP4V_SCALABLETEXTURE, ++ MMAL_VIDEO_PROFILE_MP4V_SIMPLEFACE, ++ MMAL_VIDEO_PROFILE_MP4V_SIMPLEFBA, ++ MMAL_VIDEO_PROFILE_MP4V_BASICANIMATED, ++ MMAL_VIDEO_PROFILE_MP4V_HYBRID, ++ MMAL_VIDEO_PROFILE_MP4V_ADVANCEDREALTIME, ++ MMAL_VIDEO_PROFILE_MP4V_CORESCALABLE, ++ MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCODING, ++ MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCORE, ++ MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSCALABLE, ++ MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSIMPLE, ++ MMAL_VIDEO_PROFILE_H264_BASELINE, ++ MMAL_VIDEO_PROFILE_H264_MAIN, ++ MMAL_VIDEO_PROFILE_H264_EXTENDED, ++ MMAL_VIDEO_PROFILE_H264_HIGH, ++ MMAL_VIDEO_PROFILE_H264_HIGH10, ++ MMAL_VIDEO_PROFILE_H264_HIGH422, ++ MMAL_VIDEO_PROFILE_H264_HIGH444, ++ MMAL_VIDEO_PROFILE_H264_CONSTRAINED_BASELINE, ++ MMAL_VIDEO_PROFILE_DUMMY = 0x7FFFFFFF ++}; ++ ++enum mmal_video_level { ++ MMAL_VIDEO_LEVEL_H263_10, ++ MMAL_VIDEO_LEVEL_H263_20, ++ MMAL_VIDEO_LEVEL_H263_30, ++ MMAL_VIDEO_LEVEL_H263_40, ++ MMAL_VIDEO_LEVEL_H263_45, ++ MMAL_VIDEO_LEVEL_H263_50, ++ MMAL_VIDEO_LEVEL_H263_60, ++ MMAL_VIDEO_LEVEL_H263_70, ++ MMAL_VIDEO_LEVEL_MP4V_0, ++ MMAL_VIDEO_LEVEL_MP4V_0b, ++ MMAL_VIDEO_LEVEL_MP4V_1, ++ MMAL_VIDEO_LEVEL_MP4V_2, ++ MMAL_VIDEO_LEVEL_MP4V_3, ++ MMAL_VIDEO_LEVEL_MP4V_4, ++ MMAL_VIDEO_LEVEL_MP4V_4a, ++ MMAL_VIDEO_LEVEL_MP4V_5, ++ MMAL_VIDEO_LEVEL_MP4V_6, ++ MMAL_VIDEO_LEVEL_H264_1, ++ MMAL_VIDEO_LEVEL_H264_1b, ++ MMAL_VIDEO_LEVEL_H264_11, ++ MMAL_VIDEO_LEVEL_H264_12, ++ MMAL_VIDEO_LEVEL_H264_13, ++ MMAL_VIDEO_LEVEL_H264_2, ++ MMAL_VIDEO_LEVEL_H264_21, ++ MMAL_VIDEO_LEVEL_H264_22, ++ MMAL_VIDEO_LEVEL_H264_3, ++ MMAL_VIDEO_LEVEL_H264_31, ++ MMAL_VIDEO_LEVEL_H264_32, ++ MMAL_VIDEO_LEVEL_H264_4, ++ MMAL_VIDEO_LEVEL_H264_41, ++ MMAL_VIDEO_LEVEL_H264_42, ++ MMAL_VIDEO_LEVEL_H264_5, ++ MMAL_VIDEO_LEVEL_H264_51, ++ MMAL_VIDEO_LEVEL_DUMMY = 0x7FFFFFFF ++}; ++ ++struct mmal_parameter_video_profile { ++ enum mmal_video_profile profile; ++ enum mmal_video_level level; ++}; ++ + /* video parameters */ + + enum mmal_parameter_video_type { +-- +1.8.5.5 + + +From 09983b61625b95dc0d5785c16fc225ffb767bf10 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 12 Feb 2014 11:39:20 +0000 +Subject: [PATCH 108/112] V4L2: Correct BGR24 to RGB24 in format table + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 6d0d77a..8285e6a 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -84,8 +84,8 @@ + .mmal_component = MMAL_COMPONENT_CAMERA, + }, + { +- .name = "RGB24 (BE)", +- .fourcc = V4L2_PIX_FMT_BGR24, ++ .name = "RGB24 (LE)", ++ .fourcc = V4L2_PIX_FMT_RGB24, + .flags = 0, + .mmal = MMAL_ENCODING_BGR24, + .depth = 24, +-- +1.8.5.5 + + +From 4c5e7b967c2baf9bcbcf90d13867897066dfcb54 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 12 Feb 2014 15:35:41 +0000 +Subject: [PATCH 109/112] V4L2: Add additional pixel formats. Correct + colourspace + +Adds the other flavours of YUYV, and NV12. +Corrects the overlay advertised colourspace. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 36 +++++++++++++++++++++++-- + 1 file changed, 34 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 8285e6a..3dea993 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -114,7 +114,39 @@ + .mmal = MMAL_ENCODING_MJPEG, + .depth = 8, + .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, +- } ++ }, ++ { ++ .name = "4:2:2, packed, YVYU", ++ .fourcc = V4L2_PIX_FMT_YVYU, ++ .flags = 0, ++ .mmal = MMAL_ENCODING_YVYU, ++ .depth = 16, ++ .mmal_component = MMAL_COMPONENT_CAMERA, ++ }, ++ { ++ .name = "4:2:2, packed, VYUY", ++ .fourcc = V4L2_PIX_FMT_VYUY, ++ .flags = 0, ++ .mmal = MMAL_ENCODING_VYUY, ++ .depth = 16, ++ .mmal_component = MMAL_COMPONENT_CAMERA, ++ }, ++ { ++ .name = "4:2:2, packed, UYVY", ++ .fourcc = V4L2_PIX_FMT_UYVY, ++ .flags = 0, ++ .mmal = MMAL_ENCODING_UYVY, ++ .depth = 16, ++ .mmal_component = MMAL_COMPONENT_CAMERA, ++ }, ++ { ++ .name = "4:2:0, packed, NV12", ++ .fourcc = V4L2_PIX_FMT_NV12, ++ .flags = 0, ++ .mmal = MMAL_ENCODING_NV12, ++ .depth = 12, ++ .mmal_component = MMAL_COMPONENT_CAMERA, ++ }, + }; + + static struct mmal_fmt *get_format(struct v4l2_format *f) +@@ -691,7 +723,7 @@ static int vidioc_g_fbuf(struct file *file, void *fh, + a->fmt.bytesperline = (preview_port->es.video.width * 3)>>1; + a->fmt.sizeimage = (preview_port->es.video.width * + preview_port->es.video.height * 3)>>1; +- a->fmt.colorspace = V4L2_COLORSPACE_SMPTE170M; ++ a->fmt.colorspace = V4L2_COLORSPACE_JPEG; + + return 0; + } +-- +1.8.5.5 + + +From 06317ad6fcda21a2b930e43e1c5536c3a508ade0 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 14 Feb 2014 17:08:18 +0000 +Subject: [PATCH 110/112] V4L2: Drop logging msg from info to debug + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/mmal-vchiq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c +index a06fb44..82752e6 100644 +--- a/drivers/media/platform/bcm2835/mmal-vchiq.c ++++ b/drivers/media/platform/bcm2835/mmal-vchiq.c +@@ -1326,7 +1326,7 @@ static int port_parameter_get(struct vchiq_mmal_instance *instance, + memcpy(value, &rmsg->u.port_parameter_get_reply.value, + rmsg->u.port_parameter_get_reply.size); + +- pr_info("%s:result:%d component:0x%x port:%d parameter:%d\n", __func__, ++ pr_debug("%s:result:%d component:0x%x port:%d parameter:%d\n", __func__, + ret, port->component->handle, port->handle, parameter_id); + + release_msg: +-- +1.8.5.5 + + +From 1e957b13953428105b4b96db6751f537ccc2a786 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 14 Feb 2014 17:12:08 +0000 +Subject: [PATCH 111/112] V4L2: Initial pass at scene modes. + +Only supports exposure mode and metering modes. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.h | 10 +- + drivers/media/platform/bcm2835/controls.c | 225 ++++++++++++++++++++---- + 2 files changed, 199 insertions(+), 36 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 8822a1a..f389bea 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.h ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.h +@@ -15,7 +15,7 @@ + * core driver device + */ + +-#define V4L2_CTRL_COUNT 24 /* number of v4l controls */ ++#define V4L2_CTRL_COUNT 25 /* number of v4l controls */ + + enum { + MMAL_COMPONENT_CAMERA = 0, +@@ -45,11 +45,15 @@ struct bm2835_mmal_dev { + /* controls */ + struct v4l2_ctrl_handler ctrl_handler; + struct v4l2_ctrl *ctrls[V4L2_CTRL_COUNT]; ++ enum v4l2_scene_mode scene_mode; + struct mmal_colourfx colourfx; + int hflip; + int vflip; +- enum mmal_parameter_exposuremode exposure_mode; +- enum v4l2_exposure_auto_type exposure_mode_v4l2; ++ enum mmal_parameter_exposuremode exposure_mode_user; ++ enum v4l2_exposure_auto_type exposure_mode_v4l2_user; ++ /* active exposure mode may differ if selected via a scene mode */ ++ enum mmal_parameter_exposuremode exposure_mode_active; ++ enum mmal_parameter_exposuremeteringmode metering_mode; + unsigned int manual_shutter_speed; + bool exp_auto_priority; + +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index 45cf790..b7a7e883 100644 +--- a/drivers/media/platform/bcm2835/controls.c ++++ b/drivers/media/platform/bcm2835/controls.c +@@ -145,6 +145,25 @@ struct v4l2_to_mmal_effects_setting { + 1, 1, 0, 0, 0, {0, 0, 0, 0, 0} } + }; + ++struct v4l2_mmal_scene_config { ++ enum v4l2_scene_mode v4l2_scene; ++ enum mmal_parameter_exposuremode exposure_mode; ++ enum mmal_parameter_exposuremeteringmode metering_mode; ++}; ++ ++static const struct v4l2_mmal_scene_config scene_configs[] = { ++ /* V4L2_SCENE_MODE_NONE automatically added */ ++ { ++ V4L2_SCENE_MODE_NIGHT, ++ MMAL_PARAM_EXPOSUREMODE_NIGHT, ++ MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE ++ }, ++ { ++ V4L2_SCENE_MODE_SPORTS, ++ MMAL_PARAM_EXPOSUREMODE_SPORTS, ++ MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE ++ }, ++}; + + /* control handlers*/ + +@@ -296,7 +315,7 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, + struct v4l2_ctrl *ctrl, + const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) + { +- enum mmal_parameter_exposuremode exp_mode = dev->exposure_mode; ++ enum mmal_parameter_exposuremode exp_mode = dev->exposure_mode_user; + u32 shutter_speed = 0; + struct vchiq_mmal_port *control; + int ret = 0; +@@ -317,31 +336,32 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, + case V4L2_EXPOSURE_MANUAL: + exp_mode = MMAL_PARAM_EXPOSUREMODE_OFF; + break; +- +- case V4L2_EXPOSURE_SHUTTER_PRIORITY: +- exp_mode = MMAL_PARAM_EXPOSUREMODE_SPORTS; +- break; +- +- case V4L2_EXPOSURE_APERTURE_PRIORITY: +- exp_mode = MMAL_PARAM_EXPOSUREMODE_NIGHT; +- break; +- + } +- dev->exposure_mode = exp_mode; +- dev->exposure_mode_v4l2 = ctrl->val; ++ dev->exposure_mode_user = exp_mode; ++ dev->exposure_mode_v4l2_user = ctrl->val; + } else if (mmal_ctrl->id == V4L2_CID_EXPOSURE_AUTO_PRIORITY) { + dev->exp_auto_priority = ctrl->val; + } + +- if (dev->exposure_mode == MMAL_PARAM_EXPOSUREMODE_OFF) +- shutter_speed = dev->manual_shutter_speed; ++ if (dev->scene_mode == V4L2_SCENE_MODE_NONE) { ++ if (exp_mode == MMAL_PARAM_EXPOSUREMODE_OFF) ++ shutter_speed = dev->manual_shutter_speed; + +- ret = vchiq_mmal_port_parameter_set(dev->instance, control, +- MMAL_PARAMETER_SHUTTER_SPEED, +- &shutter_speed, sizeof(shutter_speed)); +- ret += vchiq_mmal_port_parameter_set(dev->instance, control, +- MMAL_PARAMETER_EXPOSURE_MODE, +- &exp_mode, sizeof(u32)); ++ ret = vchiq_mmal_port_parameter_set(dev->instance, ++ control, ++ MMAL_PARAMETER_SHUTTER_SPEED, ++ &shutter_speed, ++ sizeof(shutter_speed)); ++ ret += vchiq_mmal_port_parameter_set(dev->instance, ++ control, ++ MMAL_PARAMETER_EXPOSURE_MODE, ++ &exp_mode, ++ sizeof(u32)); ++ dev->exposure_mode_active = exp_mode; ++ } ++ /* exposure_dynamic_framerate (V4L2_CID_EXPOSURE_AUTO_PRIORITY) should ++ * always apply irrespective of scene mode. ++ */ + ret += set_framerate_params(dev); + + return ret; +@@ -351,35 +371,38 @@ static int ctrl_set_metering_mode(struct bm2835_mmal_dev *dev, + struct v4l2_ctrl *ctrl, + const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) + { +- u32 u32_value; +- struct vchiq_mmal_port *control; +- +- control = &dev->component[MMAL_COMPONENT_CAMERA]->control; +- + switch (ctrl->val) { + case V4L2_EXPOSURE_METERING_AVERAGE: +- u32_value = MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE; ++ dev->metering_mode = MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE; + break; + + case V4L2_EXPOSURE_METERING_CENTER_WEIGHTED: +- u32_value = MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT; ++ dev->metering_mode = MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT; + break; + + case V4L2_EXPOSURE_METERING_SPOT: +- u32_value = MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT; ++ dev->metering_mode = MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT; + break; + + /* todo matrix weighting not added to Linux API till 3.9 + case V4L2_EXPOSURE_METERING_MATRIX: +- u32_value = MMAL_PARAM_EXPOSUREMETERINGMODE_MATRIX; ++ dev->metering_mode = MMAL_PARAM_EXPOSUREMETERINGMODE_MATRIX; + break; + */ + + } + +- return vchiq_mmal_port_parameter_set(dev->instance, control, ++ if (dev->scene_mode == V4L2_SCENE_MODE_NONE) { ++ struct vchiq_mmal_port *control; ++ u32 u32_value = dev->metering_mode; ++ ++ control = &dev->component[MMAL_COMPONENT_CAMERA]->control; ++ ++ return vchiq_mmal_port_parameter_set(dev->instance, control, + mmal_ctrl->mmal_id, + &u32_value, sizeof(u32_value)); ++ } else ++ return 0; + } + + static int ctrl_set_flicker_avoidance(struct bm2835_mmal_dev *dev, +@@ -738,6 +761,113 @@ static int ctrl_set_video_encode_profile_level(struct bm2835_mmal_dev *dev, + return ret; + } + ++static int ctrl_set_scene_mode(struct bm2835_mmal_dev *dev, ++ struct v4l2_ctrl *ctrl, ++ const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) ++{ ++ int ret = 0; ++ int shutter_speed; ++ struct vchiq_mmal_port *control; ++ ++ v4l2_dbg(0, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "scene mode selected %d, was %d\n", ctrl->val, ++ dev->scene_mode); ++ control = &dev->component[MMAL_COMPONENT_CAMERA]->control; ++ ++ if (ctrl->val == dev->scene_mode) ++ return 0; ++ ++ if (ctrl->val == V4L2_SCENE_MODE_NONE) { ++ /* Restore all user selections */ ++ dev->scene_mode = V4L2_SCENE_MODE_NONE; ++ ++ if (dev->exposure_mode_user == MMAL_PARAM_EXPOSUREMODE_OFF) ++ shutter_speed = dev->manual_shutter_speed; ++ else ++ shutter_speed = 0; ++ ++ v4l2_dbg(0, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "%s: scene mode none: shut_speed %d, exp_mode %d, metering %d\n", ++ __func__, shutter_speed, dev->exposure_mode_user, ++ dev->metering_mode); ++ ret = vchiq_mmal_port_parameter_set(dev->instance, ++ control, ++ MMAL_PARAMETER_SHUTTER_SPEED, ++ &shutter_speed, ++ sizeof(shutter_speed)); ++ ret += vchiq_mmal_port_parameter_set(dev->instance, ++ control, ++ MMAL_PARAMETER_EXPOSURE_MODE, ++ &dev->exposure_mode_user, ++ sizeof(u32)); ++ dev->exposure_mode_active = dev->exposure_mode_user; ++ ret += vchiq_mmal_port_parameter_set(dev->instance, ++ control, ++ MMAL_PARAMETER_EXP_METERING_MODE, ++ &dev->metering_mode, ++ sizeof(u32)); ++ ret += set_framerate_params(dev); ++ } else { ++ /* Set up scene mode */ ++ int i; ++ const struct v4l2_mmal_scene_config *scene = NULL; ++ int shutter_speed; ++ enum mmal_parameter_exposuremode exposure_mode; ++ enum mmal_parameter_exposuremeteringmode metering_mode; ++ ++ for (i = 0; i < ARRAY_SIZE(scene_configs); i++) { ++ if (scene_configs[i].v4l2_scene == ++ ctrl->val) { ++ scene = &scene_configs[i]; ++ break; ++ } ++ } ++ if (i >= ARRAY_SIZE(scene_configs)) ++ return -EINVAL; ++ ++ /* Set all the values */ ++ dev->scene_mode = ctrl->val; ++ ++ if (scene->exposure_mode == MMAL_PARAM_EXPOSUREMODE_OFF) ++ shutter_speed = dev->manual_shutter_speed; ++ else ++ shutter_speed = 0; ++ exposure_mode = scene->exposure_mode; ++ metering_mode = scene->metering_mode; ++ ++ v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "%s: scene mode none: shut_speed %d, exp_mode %d, metering %d\n", ++ __func__, shutter_speed, exposure_mode, metering_mode); ++ ++ ret = vchiq_mmal_port_parameter_set(dev->instance, control, ++ MMAL_PARAMETER_SHUTTER_SPEED, ++ &shutter_speed, ++ sizeof(shutter_speed)); ++ ret += vchiq_mmal_port_parameter_set(dev->instance, ++ control, ++ MMAL_PARAMETER_EXPOSURE_MODE, ++ &exposure_mode, ++ sizeof(u32)); ++ dev->exposure_mode_active = exposure_mode; ++ ret += vchiq_mmal_port_parameter_set(dev->instance, control, ++ MMAL_PARAMETER_EXPOSURE_MODE, ++ &exposure_mode, ++ sizeof(u32)); ++ ret += vchiq_mmal_port_parameter_set(dev->instance, control, ++ MMAL_PARAMETER_EXP_METERING_MODE, ++ &metering_mode, ++ sizeof(u32)); ++ ret += set_framerate_params(dev); ++ } ++ if (ret) { ++ v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, ++ "%s: Setting scene to %d, ret=%d\n", ++ __func__, ctrl->val, ret); ++ ret = -EINVAL; ++ } ++ return 0; ++} ++ + static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) + { + struct bm2835_mmal_dev *dev = +@@ -973,6 +1103,15 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) + &ctrl_set_video_encode_profile_level, + false + }, ++ { ++ V4L2_CID_SCENE_MODE, MMAL_CONTROL_TYPE_STD_MENU, ++ -1, /* Min is computed at runtime */ ++ V4L2_SCENE_MODE_TEXT, ++ V4L2_SCENE_MODE_NONE, 1, NULL, ++ MMAL_PARAMETER_PROFILE, ++ &ctrl_set_scene_mode, ++ false ++ }, + }; + + int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev) +@@ -1000,8 +1139,7 @@ int set_framerate_params(struct bm2835_mmal_dev *dev) + struct mmal_parameter_fps_range fps_range; + int ret; + +- if ((dev->exposure_mode_v4l2 == V4L2_EXPOSURE_AUTO || +- dev->exposure_mode_v4l2 == V4L2_EXPOSURE_APERTURE_PRIORITY) && ++ if ((dev->exposure_mode_active != MMAL_PARAM_EXPOSUREMODE_OFF) && + (dev->exp_auto_priority)) { + /* Variable FPS. Define min FPS as 1fps. + * Max as max defined FPS. +@@ -1049,6 +1187,7 @@ int set_framerate_params(struct bm2835_mmal_dev *dev) + return ret; + + } ++ + int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, + struct v4l2_ctrl_handler *hdl) + { +@@ -1068,10 +1207,30 @@ int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, + break; + + case MMAL_CONTROL_TYPE_STD_MENU: ++ { ++ int mask = ctrl->min; ++ ++ if (ctrl->id == V4L2_CID_SCENE_MODE) { ++ /* Special handling to work out the mask ++ * value based on the scene_configs array ++ * at runtime. Reduces the chance of ++ * mismatches. ++ */ ++ int i; ++ mask = 1<ctrls[c] = v4l2_ctrl_new_std_menu(hdl, + &bm2835_mmal_ctrl_ops, ctrl->id, +- ctrl->max, ctrl->min, ctrl->def); ++ ctrl->max, mask, ctrl->def); + break; ++ } + + case MMAL_CONTROL_TYPE_INT_MENU: + dev->ctrls[c] = v4l2_ctrl_new_int_menu(hdl, +-- +1.8.5.5 + + +From 6a6b2b8d733a6359bbc2591e4b7377f333ddca82 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 21 Feb 2014 17:15:59 +0000 +Subject: [PATCH 112/112] alsa: Make alsa work queue high priority. Fixes + underrun issues when using negitive nice priority + +--- + sound/arm/bcm2835-vchiq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 4013d83..ee09b13 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -178,7 +178,7 @@ int bcm2835_audio_write(bcm2835_alsa_stream_t *alsa_stream, + + void my_workqueue_init(bcm2835_alsa_stream_t * alsa_stream) + { +- alsa_stream->my_wq = create_workqueue("my_queue"); ++ alsa_stream->my_wq = alloc_workqueue("my_queue", WQ_HIGHPRI, 1); + return; + } + +-- +1.8.5.5