Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Oct 2012 03:39:17 +0000 (12:39 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Oct 2012 03:39:17 +0000 (12:39 +0900)
Pull second set of media updates from Mauro Carvalho Chehab:
 "Despite its size, most of the stuff here is trivial.  This series
  contains:

   - s5p-mfc: additions at the driver and at the core to support H.264
     hardware codec;
   - Some improvements at s5p and davinci embedded drivers;
   - Some V4L2 compliance fixes applied on a few drivers;
   - Several random trivial patches, including several fixes and a few
     new board support additions;

  Notes:

   1) Some Exynos media patches were dependent on some -arm fixes that
      got merged on changeset 782cd9e.  That's why this pull request is
      based that changeset.

   2) As promised, I reviewed the pending VB2 DMABUF series.

      While setting a test environment, it was noticed that the upstream
      support for Samsung Exynos 4 boards (smdk310 and Origen) are
      broken upstream, likely due to regressions: both defconfigs are
      wrong and regulator settings for both boards are broken.  That,
      allied with some bug at the dummy regulator driver, causes OOPSes
      during boot time.

      Long story short: even fixing the above, the proposed patches
      OOPSed when running the DMABUF test.  Not sure yet if the OOPSes
      are due to some other undetected regressions, or due to some bug
      on the patches.

      Due to the above, DMABUF patches for vb2 got NACKed for 3.7."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (109 commits)
  [media] m5mols: Add missing #include <linux/sizes.h>
  [media] stk1160: Add support for S-Video input
  Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
  [media]  dvb: LNA implementation changes
  [media] v4l2-ioctl: fix W=1 warnings
  [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
  [media] omap3isp: Fix compilation error in ispreg.h
  [media] rc-msi-digivox-ii: Add full scan keycodes
  [media] cx25821: testing the wrong variable
  [media] tda18271-common: hold the I2C adapter during write transfers
  [media] ds3000: add module parameter to force firmware upload
  [media] drivers/media: Remove unnecessary semicolon
  [media] winbond: remove space from driver name
  [media] iguanair: cannot send data from the stack
  [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
  [media] dvb-usb: print small buffers via %*ph
  [media] uvc: Add return code check at vb2_queue_init()
  [media] em28xx: Replace memcpy with struct assignment
  [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
  [media] mem2mem_testdev: Use devm_kzalloc() in probe
  ...

Conflicts:
arch/arm/mach-davinci/include/mach/da8xx.h

1  2 
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/include/mach/da8xx.h
arch/arm/mach-exynos/mach-nuri.c
arch/arm/mach-exynos/mach-origen.c
arch/arm/mach-exynos/mach-universal_c210.c

  #include <mach/time.h>
  #include <mach/serial.h>
  #include <mach/common.h>
 -#include <mach/asp.h>
  #include <mach/gpio-davinci.h>
  
  #include "davinci.h"
  #include "clock.h"
  #include "mux.h"
 +#include "asp.h"
  
  /*
   * Device specific clocks
@@@ -701,7 -701,7 +701,7 @@@ static struct resource dm644x_venc_reso
  #define DM644X_VPSS_DACCLKEN                  BIT(4)
  
  static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
-                                  unsigned int mode)
+                                  unsigned int pclock)
  {
        int ret = 0;
        u32 v = DM644X_VPSS_VENCLKEN;
                v |= DM644X_VPSS_DACCLKEN;
                writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
                break;
-       case VPBE_ENC_DV_PRESET:
-               switch (mode) {
-               case V4L2_DV_480P59_94:
-               case V4L2_DV_576P50:
+       case VPBE_ENC_CUSTOM_TIMINGS:
+               if (pclock <= 27000000) {
                        v |= DM644X_VPSS_MUXSEL_PLL2_MODE |
                             DM644X_VPSS_DACCLKEN;
                        writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
-                       break;
-               case V4L2_DV_720P60:
-               case V4L2_DV_1080I60:
-               case V4L2_DV_1080P30:
+               } else {
                        /*
                         * For HD, use external clock source since
                         * HD requires higher clock rate
                         */
                        v |= DM644X_VPSS_MUXSEL_VPBECLK_MODE;
                        writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
-                       break;
-               default:
-                       ret = -EINVAL;
-                       break;
                }
                break;
        default:
  #include <linux/platform_device.h>
  #include <linux/davinci_emac.h>
  #include <linux/spi/spi.h>
 +#include <linux/platform_data/davinci_asp.h>
+ #include <linux/videodev2.h>
  
  #include <mach/serial.h>
  #include <mach/edma.h>
 -#include <mach/asp.h>
  #include <mach/pm.h>
  #include <linux/platform_data/i2c-davinci.h>
  #include <linux/platform_data/mmc-davinci.h>
  #include <linux/platform_data/usb-davinci.h>
  #include <linux/platform_data/spi-davinci.h>
  
+ #include <media/davinci/vpif_types.h>
  extern void __iomem *da8xx_syscfg0_base;
  extern void __iomem *da8xx_syscfg1_base;
  
@@@ -63,6 -66,7 +66,7 @@@ extern unsigned int da850_max_speed
  #define DA8XX_PLL0_BASE               0x01c11000
  #define DA8XX_TIMER64P0_BASE  0x01c20000
  #define DA8XX_TIMER64P1_BASE  0x01c21000
+ #define DA8XX_VPIF_BASE               0x01e17000
  #define DA8XX_GPIO_BASE               0x01e26000
  #define DA8XX_PSC1_BASE               0x01e27000
  #define DA8XX_AEMIF_CS2_BASE  0x60000000
@@@ -92,6 -96,11 +96,11 @@@ int da8xx_register_cpuidle(void)
  void __iomem * __init da8xx_get_mem_ctlr(void);
  int da850_register_pm(struct platform_device *pdev);
  int __init da850_register_sata(unsigned long refclkpn);
+ int __init da850_register_vpif(void);
+ int __init da850_register_vpif_display
+                       (struct vpif_display_config *display_config);
+ int __init da850_register_vpif_capture
+                       (struct vpif_capture_config *capture_config);
  void da8xx_restart(char mode, const char *cmd);
  
  extern struct platform_device da8xx_serial_device;
@@@ -126,6 -135,8 +135,8 @@@ extern const short da830_ecap1_pins[]
  extern const short da830_ecap2_pins[];
  extern const short da830_eqep0_pins[];
  extern const short da830_eqep1_pins[];
+ extern const short da850_vpif_capture_pins[];
+ extern const short da850_vpif_display_pins[];
  
  extern const short da850_i2c0_pins[];
  extern const short da850_i2c1_pins[];
@@@ -29,7 -29,6 +29,7 @@@
  #include <drm/exynos_drm.h>
  
  #include <video/platform_lcd.h>
 +#include <video/samsung_fimd.h>
  #include <media/m5mols.h>
  #include <media/s5k6aa.h>
  #include <media/s5p_fimc.h>
@@@ -40,6 -39,7 +40,6 @@@
  #include <asm/mach-types.h>
  
  #include <plat/adc.h>
 -#include <plat/regs-fb-v4.h>
  #include <plat/regs-serial.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
@@@ -378,10 -378,10 +378,10 @@@ static struct regulator_consumer_suppl
  };
  static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
        REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
-       REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+       REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
  };
  static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
-       REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
+       REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
  };
  static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
        REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
@@@ -1180,9 -1180,7 +1180,7 @@@ static struct platform_device cam_8m_12
  static struct s5p_platform_mipi_csis mipi_csis_platdata = {
        .clk_rate       = 166000000UL,
        .lanes          = 2,
-       .alignment      = 32,
        .hs_settle      = 12,
-       .phy_enable     = s5p_csis_phy_enable,
  };
  
  #define GPIO_CAM_MEGA_RST     EXYNOS4_GPY3(7) /* ISP_RESET */
@@@ -1226,7 -1224,6 +1224,6 @@@ static struct s5p_fimc_isp_info nuri_ca
                .bus_type       = FIMC_MIPI_CSI2,
                .board_info     = &m5mols_board_info,
                .clk_frequency  = 24000000UL,
-               .csi_data_align = 32,
        },
  };
  
@@@ -30,9 -30,9 +30,9 @@@
  #include <asm/mach-types.h>
  
  #include <video/platform_lcd.h>
 +#include <video/samsung_fimd.h>
  
  #include <plat/regs-serial.h>
 -#include <plat/regs-fb-v4.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
  #include <plat/sdhci.h>
@@@ -97,12 -97,12 +97,12 @@@ static struct s3c2410_uartcfg origen_ua
  };
  
  static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
-       REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+       REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
        REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
        REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
  };
  static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
-       REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
+       REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
  };
  static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
        REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */
@@@ -30,7 -30,6 +30,7 @@@
  #include <asm/hardware/gic.h>
  #include <asm/mach-types.h>
  
 +#include <video/samsung_fimd.h>
  #include <plat/regs-serial.h>
  #include <plat/clock.h>
  #include <plat/cpu.h>
@@@ -40,6 -39,7 +40,6 @@@
  #include <plat/fb.h>
  #include <plat/mfc.h>
  #include <plat/sdhci.h>
 -#include <plat/regs-fb-v4.h>
  #include <plat/fimc-core.h>
  #include <plat/s5p-time.h>
  #include <plat/camport.h>
@@@ -209,7 -209,7 +209,7 @@@ static struct regulator_consumer_suppl
        REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
        REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
        REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
-       REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
+       REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"),
  };
  
  static struct regulator_init_data lp3974_ldo3_data = {
@@@ -273,7 -273,7 +273,7 @@@ static struct regulator_init_data lp397
  };
  
  static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
-       REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"),
+       REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"),
  };
  
  static struct regulator_init_data lp3974_ldo7_data = {
@@@ -942,9 -942,7 +942,7 @@@ static struct platform_device cam_s_if_
  static struct s5p_platform_mipi_csis mipi_csis_platdata = {
        .clk_rate       = 166000000UL,
        .lanes          = 2,
-       .alignment      = 32,
        .hs_settle      = 12,
-       .phy_enable     = s5p_csis_phy_enable,
  };
  
  #define GPIO_CAM_LEVEL_EN(n)  EXYNOS4_GPE4(n + 3)
@@@ -1008,7 -1006,6 +1006,6 @@@ static struct s5p_fimc_isp_info univers
                .board_info     = &m5mols_board_info,
                .i2c_bus_num    = 0,
                .clk_frequency  = 24000000UL,
-               .csi_data_align = 32,
        },
  };