Merge tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Feb 2012 23:54:02 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Feb 2012 23:54:02 +0000 (15:54 -0800)
fbdev fixes for 3.3

It includes:
 - compile fix for fsl-diu-fb
 - fix for a suspend/resume issue in atmel_lcdfb
 - fix for a suspend/resume issue in OMAP
 - workaround for a hardware bug to avoid physical damage in OMAP
 - really trivial dead code removal in intelfb

* tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6:
  atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume
  intelfb: remove some dead code
  drivers/video: compile fixes for fsl-diu-fb.c
  OMAPDSS: HDMI: PHY burnout fix
  OMAP: 4430SDP/Panda: add HDMI HPD gpio
  OMAP: 4430SDP/Panda: setup HDMI GPIO muxes
  OMAPDSS: remove wrong HDMI HPD muxing
  OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD
  OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios
  OMAPDSS: use sync versions of pm_runtime_put

1  2 
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/display.c
drivers/video/intelfb/intelfbdrv.c
drivers/video/omap2/dss/dsi.c

index 39fba9df17fba3209396cba2d8be2d59553c8ab5,0ce758edaad27273293f3107898ce4b0b13b5dda..21fc876486601ff13f24220ef78512dc586a2e87
  #include <linux/leds_pwm.h>
  
  #include <mach/hardware.h>
 -#include <mach/omap4-common.h>
 +#include <asm/hardware/gic.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
  
  #include <plat/board.h>
 -#include <plat/common.h>
 +#include "common.h"
  #include <plat/usb.h>
  #include <plat/mmc.h>
  #include <plat/omap4-keypad.h>
@@@ -52,8 -52,9 +52,9 @@@
  #define ETH_KS8851_QUART              138
  #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO      184
  #define OMAP4_SFH7741_ENABLE_GPIO             188
- #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
+ #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
  #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
+ #define HDMI_GPIO_HPD  63 /* Hotplug detect */
  #define DISPLAY_SEL_GPIO      59      /* LCD2/PicoDLP switch */
  #define DLP_POWER_ON_GPIO     40
  
@@@ -372,17 -373,11 +373,17 @@@ static struct platform_device sdp4430_v
        },
  };
  
 +static struct platform_device sdp4430_dmic_codec = {
 +      .name   = "dmic-codec",
 +      .id     = -1,
 +};
 +
  static struct platform_device *sdp4430_devices[] __initdata = {
        &sdp4430_gpio_keys_device,
        &sdp4430_leds_gpio,
        &sdp4430_leds_pwm,
        &sdp4430_vbat,
 +      &sdp4430_dmic_codec,
  };
  
  static struct omap_musb_board_data musb_board_data = {
@@@ -410,7 -405,6 +411,7 @@@ static struct omap2_hsmmc_info mmc[] = 
        {
                .mmc            = 5,
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
 +              .pm_caps        = MMC_PM_KEEP_POWER,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = -EINVAL,
                .ocr_mask       = MMC_VDD_165_195,
@@@ -603,8 -597,9 +604,9 @@@ static void __init omap_sfh7741prox_ini
  }
  
  static struct gpio sdp4430_hdmi_gpios[] = {
-       { HDMI_GPIO_HPD,        GPIOF_OUT_INIT_HIGH,    "hdmi_gpio_hpd"   },
+       { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
        { HDMI_GPIO_LS_OE,      GPIOF_OUT_INIT_HIGH,    "hdmi_gpio_ls_oe" },
+       { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" },
  };
  
  static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
  
  static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
  {
-       gpio_free(HDMI_GPIO_LS_OE);
-       gpio_free(HDMI_GPIO_HPD);
+       gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios));
  }
  
  static struct nokia_dsi_panel_data dsi1_panel = {
@@@ -738,6 -732,10 +739,10 @@@ static void sdp4430_lcd_init(void
                pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
  }
  
+ static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
+       .hpd_gpio = HDMI_GPIO_HPD,
+ };
  static struct omap_dss_device sdp4430_hdmi_device = {
        .name = "hdmi",
        .driver_name = "hdmi_panel",
        .platform_enable = sdp4430_panel_enable_hdmi,
        .platform_disable = sdp4430_panel_disable_hdmi,
        .channel = OMAP_DSS_CHANNEL_DIGIT,
+       .data = &sdp4430_hdmi_data,
  };
  
  static struct picodlp_panel_data sdp4430_picodlp_pdata = {
@@@ -829,6 -828,10 +835,10 @@@ static void omap_4430sdp_display_init(v
                omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
        else
                omap_hdmi_init(0);
+       omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
  }
  
  #ifdef CONFIG_OMAP_MUX
@@@ -837,8 -840,74 +847,8 @@@ static struct omap_board_mux board_mux[
        { .reg_offset = OMAP_MUX_TERMINATOR },
  };
  
 -static struct omap_device_pad serial2_pads[] __initdata = {
 -      OMAP_MUX_STATIC("uart2_cts.uart2_cts",
 -                       OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart2_rts.uart2_rts",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart2_rx.uart2_rx",
 -                       OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart2_tx.uart2_tx",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -};
 -
 -static struct omap_device_pad serial3_pads[] __initdata = {
 -      OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
 -                       OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
 -                       OMAP_PIN_INPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -};
 -
 -static struct omap_device_pad serial4_pads[] __initdata = {
 -      OMAP_MUX_STATIC("uart4_rx.uart4_rx",
 -                       OMAP_PIN_INPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart4_tx.uart4_tx",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -};
 -
 -static struct omap_board_data serial2_data __initdata = {
 -      .id             = 1,
 -      .pads           = serial2_pads,
 -      .pads_cnt       = ARRAY_SIZE(serial2_pads),
 -};
 -
 -static struct omap_board_data serial3_data __initdata = {
 -      .id             = 2,
 -      .pads           = serial3_pads,
 -      .pads_cnt       = ARRAY_SIZE(serial3_pads),
 -};
 -
 -static struct omap_board_data serial4_data __initdata = {
 -      .id             = 3,
 -      .pads           = serial4_pads,
 -      .pads_cnt       = ARRAY_SIZE(serial4_pads),
 -};
 -
 -static inline void board_serial_init(void)
 -{
 -      struct omap_board_data bdata;
 -      bdata.flags     = 0;
 -      bdata.pads      = NULL;
 -      bdata.pads_cnt  = 0;
 -      bdata.id        = 0;
 -      /* pass dummy data for UART1 */
 -      omap_serial_init_port(&bdata);
 -
 -      omap_serial_init_port(&serial2_data);
 -      omap_serial_init_port(&serial3_data);
 -      omap_serial_init_port(&serial4_data);
 -}
  #else
  #define board_mux     NULL
 -
 -static inline void board_serial_init(void)
 -{
 -      omap_serial_init();
 -}
   #endif
  
  static void omap4_sdp4430_wifi_mux_init(void)
@@@ -888,7 -957,7 +898,7 @@@ static void __init omap_4430sdp_init(vo
        omap4_i2c_init();
        omap_sfh7741prox_init();
        platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
 -      board_serial_init();
 +      omap_serial_init();
        omap_sdrc_init(NULL, NULL);
        omap4_sdp4430_wifi_init();
        omap4_twl6030_hsmmc_init(mmc);
@@@ -918,8 -987,6 +928,8 @@@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4
        .map_io         = omap4_map_io,
        .init_early     = omap4430_init_early,
        .init_irq       = gic_init_irq,
 +      .handle_irq     = gic_handle_irq,
        .init_machine   = omap_4430sdp_init,
        .timer          = &omap4_timer,
 +      .restart        = omap_prcm_restart,
  MACHINE_END
index 30ad40db2cf39558bdefc6bf40169114919ed6e7,370c4b428888ff5e6921c14a02a91471080ad034..b7779c206a90af0d9747f71a3d6d5f8963a90362
  #include <linux/wl12xx.h>
  
  #include <mach/hardware.h>
 -#include <mach/omap4-common.h>
 +#include <asm/hardware/gic.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
  #include <video/omapdss.h>
  
  #include <plat/board.h>
 -#include <plat/common.h>
 +#include "common.h"
  #include <plat/usb.h>
  #include <plat/mmc.h>
  #include <video/omap-panel-dvi.h>
@@@ -51,8 -51,9 +51,9 @@@
  #define GPIO_HUB_NRESET               62
  #define GPIO_WIFI_PMENA               43
  #define GPIO_WIFI_IRQ         53
- #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
+ #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
  #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
+ #define HDMI_GPIO_HPD  63 /* Hotplug detect */
  
  /* wl127x BT, FM, GPS connectivity chip */
  static int wl1271_gpios[] = {46, -1, -1};
@@@ -364,8 -365,74 +365,8 @@@ static struct omap_board_mux board_mux[
        { .reg_offset = OMAP_MUX_TERMINATOR },
  };
  
 -static struct omap_device_pad serial2_pads[] __initdata = {
 -      OMAP_MUX_STATIC("uart2_cts.uart2_cts",
 -                       OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart2_rts.uart2_rts",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart2_rx.uart2_rx",
 -                       OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart2_tx.uart2_tx",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -};
 -
 -static struct omap_device_pad serial3_pads[] __initdata = {
 -      OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
 -                       OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
 -                       OMAP_PIN_INPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -};
 -
 -static struct omap_device_pad serial4_pads[] __initdata = {
 -      OMAP_MUX_STATIC("uart4_rx.uart4_rx",
 -                       OMAP_PIN_INPUT | OMAP_MUX_MODE0),
 -      OMAP_MUX_STATIC("uart4_tx.uart4_tx",
 -                       OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 -};
 -
 -static struct omap_board_data serial2_data __initdata = {
 -      .id             = 1,
 -      .pads           = serial2_pads,
 -      .pads_cnt       = ARRAY_SIZE(serial2_pads),
 -};
 -
 -static struct omap_board_data serial3_data __initdata = {
 -      .id             = 2,
 -      .pads           = serial3_pads,
 -      .pads_cnt       = ARRAY_SIZE(serial3_pads),
 -};
 -
 -static struct omap_board_data serial4_data __initdata = {
 -      .id             = 3,
 -      .pads           = serial4_pads,
 -      .pads_cnt       = ARRAY_SIZE(serial4_pads),
 -};
 -
 -static inline void board_serial_init(void)
 -{
 -      struct omap_board_data bdata;
 -      bdata.flags     = 0;
 -      bdata.pads      = NULL;
 -      bdata.pads_cnt  = 0;
 -      bdata.id        = 0;
 -      /* pass dummy data for UART1 */
 -      omap_serial_init_port(&bdata);
 -
 -      omap_serial_init_port(&serial2_data);
 -      omap_serial_init_port(&serial3_data);
 -      omap_serial_init_port(&serial4_data);
 -}
  #else
  #define board_mux     NULL
 -
 -static inline void board_serial_init(void)
 -{
 -      omap_serial_init();
 -}
  #endif
  
  /* Display DVI */
@@@ -413,8 -480,9 +414,9 @@@ int __init omap4_panda_dvi_init(void
  }
  
  static struct gpio panda_hdmi_gpios[] = {
-       { HDMI_GPIO_HPD,        GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd"   },
+       { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
        { HDMI_GPIO_LS_OE,      GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
+       { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" },
  };
  
  static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev)
  
  static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev)
  {
-       gpio_free(HDMI_GPIO_LS_OE);
-       gpio_free(HDMI_GPIO_HPD);
+       gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios));
  }
  
+ static struct omap_dss_hdmi_data omap4_panda_hdmi_data = {
+       .hpd_gpio = HDMI_GPIO_HPD,
+ };
  static struct omap_dss_device  omap4_panda_hdmi_device = {
        .name = "hdmi",
        .driver_name = "hdmi_panel",
        .platform_enable = omap4_panda_panel_enable_hdmi,
        .platform_disable = omap4_panda_panel_disable_hdmi,
        .channel = OMAP_DSS_CHANNEL_DIGIT,
+       .data = &omap4_panda_hdmi_data,
  };
  
  static struct omap_dss_device *omap4_panda_dss_devices[] = {
@@@ -473,6 -545,10 +479,10 @@@ void omap4_panda_display_init(void
                omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
        else
                omap_hdmi_init(0);
+       omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
  }
  
  static void __init omap4_panda_init(void)
        omap4_panda_i2c_init();
        platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
        platform_device_register(&omap_vwlan_device);
 -      board_serial_init();
 +      omap_serial_init();
        omap_sdrc_init(NULL, NULL);
        omap4_twl6030_hsmmc_init(mmc);
        omap4_ehci_init();
@@@ -504,8 -580,6 +514,8 @@@ MACHINE_START(OMAP4_PANDA, "OMAP4 Pand
        .map_io         = omap4_map_io,
        .init_early     = omap4430_init_early,
        .init_irq       = gic_init_irq,
 +      .handle_irq     = gic_handle_irq,
        .init_machine   = omap4_panda_init,
        .timer          = &omap4_timer,
 +      .restart        = omap_prcm_restart,
  MACHINE_END
index 3c446d1a1781fe3d819b2732ea28e2426c2a1348,d6e65e29d83dd2972f726404cb6af53e3ae8b80a..3677b1f58b85f32c25e9c4f1e886a0e259ee9102
  #include <linux/io.h>
  #include <linux/clk.h>
  #include <linux/err.h>
 +#include <linux/delay.h>
  
  #include <video/omapdss.h>
  #include <plat/omap_hwmod.h>
  #include <plat/omap_device.h>
  #include <plat/omap-pm.h>
 -#include <plat/common.h>
 +#include "common.h"
  
  #include "mux.h"
  #include "control.h"
@@@ -103,12 -102,8 +103,8 @@@ static void omap4_hdmi_mux_pads(enum om
        u32 reg;
        u16 control_i2c_1;
  
-       /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
-       omap_mux_init_signal("hdmi_hpd",
-                       OMAP_PIN_INPUT_PULLUP);
        omap_mux_init_signal("hdmi_cec",
                        OMAP_PIN_INPUT_PULLUP);
-       /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
        omap_mux_init_signal("hdmi_ddc_scl",
                        OMAP_PIN_INPUT_PULLUP);
        omap_mux_init_signal("hdmi_ddc_sda",
index c6afa33a45322b4f70c57e2672535ab8cabef715,a5947c94145fe70c116a41490fc3d4133f1c3c80..02fd2263610c1c63d1cdb8cd8173373a3ce88200
@@@ -230,15 -230,15 +230,15 @@@ MODULE_DESCRIPTION("Framebuffer driver 
  MODULE_LICENSE("Dual BSD/GPL");
  MODULE_DEVICE_TABLE(pci, intelfb_pci_table);
  
 -static int accel        = 1;
 +static bool accel       = 1;
  static int vram         = 4;
 -static int hwcursor     = 0;
 -static int mtrr         = 1;
 -static int fixed        = 0;
 -static int noinit       = 0;
 -static int noregister   = 0;
 -static int probeonly    = 0;
 -static int idonly       = 0;
 +static bool hwcursor    = 0;
 +static bool mtrr        = 1;
 +static bool fixed       = 0;
 +static bool noinit      = 0;
 +static bool noregister  = 0;
 +static bool probeonly   = 0;
 +static bool idonly      = 0;
  static int bailearly    = 0;
  static int voffset    = 48;
  static char *mode       = NULL;
@@@ -263,7 -263,7 +263,7 @@@ module_param(probeonly, bool, 0)
  MODULE_PARM_DESC(probeonly, "Do a minimal probe (debug)");
  module_param(idonly, bool, 0);
  MODULE_PARM_DESC(idonly, "Just identify without doing anything else (debug)");
 -module_param(bailearly, bool, 0);
 +module_param(bailearly, int, 0);
  MODULE_PARM_DESC(bailearly, "Bail out early, depending on value (debug)");
  module_param(mode, charp, S_IRUGO);
  MODULE_PARM_DESC(mode,
@@@ -529,7 -529,6 +529,6 @@@ static int __devinit intelfb_pci_regist
        if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) {
                ERR_MSG("Could not allocate cmap for intelfb_info.\n");
                goto err_out_cmap;
-               return -ENODEV;
        }
  
        dinfo = info->par;
index d4d676c82c12fbe9789edc354c85b5a14bd19cbb,04a89a7bbaf54aeb439e7acf7b89f44f51a68040..52f36ec1c8bb3889e9e23cb2c6b6eca2181a454a
@@@ -342,8 -342,8 +342,8 @@@ struct dsi_packet_sent_handler_data 
  static struct platform_device *dsi_pdev_map[MAX_NUM_DSI];
  
  #ifdef DEBUG
 -static unsigned int dsi_perf;
 -module_param_named(dsi_perf, dsi_perf, bool, 0644);
 +static bool dsi_perf;
 +module_param(dsi_perf, bool, 0644);
  #endif
  
  static inline struct dsi_data *dsi_get_dsidrv_data(struct platform_device *dsidev)
@@@ -1079,7 -1079,7 +1079,7 @@@ void dsi_runtime_put(struct platform_de
  
        DSSDBG("dsi_runtime_put\n");
  
-       r = pm_runtime_put(&dsi->pdev->dev);
+       r = pm_runtime_put_sync(&dsi->pdev->dev);
        WARN_ON(r < 0);
  }