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

Configure Feed

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

Merge tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6

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

+113 -26
+14 -4
arch/arm/mach-omap2/board-4430sdp.c
··· 52 52 #define ETH_KS8851_QUART 138 53 53 #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 54 54 #define OMAP4_SFH7741_ENABLE_GPIO 188 55 - #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ 55 + #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ 56 56 #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 57 + #define HDMI_GPIO_HPD 63 /* Hotplug detect */ 57 58 #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ 58 59 #define DLP_POWER_ON_GPIO 40 59 60 ··· 604 603 } 605 604 606 605 static struct gpio sdp4430_hdmi_gpios[] = { 607 - { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, 606 + { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, 608 607 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 608 + { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, 609 609 }; 610 610 611 611 static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) ··· 623 621 624 622 static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) 625 623 { 626 - gpio_free(HDMI_GPIO_LS_OE); 627 - gpio_free(HDMI_GPIO_HPD); 624 + gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios)); 628 625 } 629 626 630 627 static struct nokia_dsi_panel_data dsi1_panel = { ··· 739 738 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); 740 739 } 741 740 741 + static struct omap_dss_hdmi_data sdp4430_hdmi_data = { 742 + .hpd_gpio = HDMI_GPIO_HPD, 743 + }; 744 + 742 745 static struct omap_dss_device sdp4430_hdmi_device = { 743 746 .name = "hdmi", 744 747 .driver_name = "hdmi_panel", ··· 750 745 .platform_enable = sdp4430_panel_enable_hdmi, 751 746 .platform_disable = sdp4430_panel_disable_hdmi, 752 747 .channel = OMAP_DSS_CHANNEL_DIGIT, 748 + .data = &sdp4430_hdmi_data, 753 749 }; 754 750 755 751 static struct picodlp_panel_data sdp4430_picodlp_pdata = { ··· 835 829 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); 836 830 else 837 831 omap_hdmi_init(0); 832 + 833 + omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); 834 + omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); 835 + omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); 838 836 } 839 837 840 838 #ifdef CONFIG_OMAP_MUX
+14 -4
arch/arm/mach-omap2/board-omap4panda.c
··· 51 51 #define GPIO_HUB_NRESET 62 52 52 #define GPIO_WIFI_PMENA 43 53 53 #define GPIO_WIFI_IRQ 53 54 - #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ 54 + #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ 55 55 #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 56 + #define HDMI_GPIO_HPD 63 /* Hotplug detect */ 56 57 57 58 /* wl127x BT, FM, GPS connectivity chip */ 58 59 static int wl1271_gpios[] = {46, -1, -1}; ··· 414 413 } 415 414 416 415 static struct gpio panda_hdmi_gpios[] = { 417 - { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, 416 + { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, 418 417 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 418 + { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, 419 419 }; 420 420 421 421 static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) ··· 433 431 434 432 static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) 435 433 { 436 - gpio_free(HDMI_GPIO_LS_OE); 437 - gpio_free(HDMI_GPIO_HPD); 434 + gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios)); 438 435 } 436 + 437 + static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { 438 + .hpd_gpio = HDMI_GPIO_HPD, 439 + }; 439 440 440 441 static struct omap_dss_device omap4_panda_hdmi_device = { 441 442 .name = "hdmi", ··· 447 442 .platform_enable = omap4_panda_panel_enable_hdmi, 448 443 .platform_disable = omap4_panda_panel_disable_hdmi, 449 444 .channel = OMAP_DSS_CHANNEL_DIGIT, 445 + .data = &omap4_panda_hdmi_data, 450 446 }; 451 447 452 448 static struct omap_dss_device *omap4_panda_dss_devices[] = { ··· 479 473 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); 480 474 else 481 475 omap_hdmi_init(0); 476 + 477 + omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); 478 + omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); 479 + omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); 482 480 } 483 481 484 482 static void __init omap4_panda_init(void)
-4
arch/arm/mach-omap2/display.c
··· 103 103 u32 reg; 104 104 u16 control_i2c_1; 105 105 106 - /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ 107 - omap_mux_init_signal("hdmi_hpd", 108 - OMAP_PIN_INPUT_PULLUP); 109 106 omap_mux_init_signal("hdmi_cec", 110 107 OMAP_PIN_INPUT_PULLUP); 111 - /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ 112 108 omap_mux_init_signal("hdmi_ddc_scl", 113 109 OMAP_PIN_INPUT_PULLUP); 114 110 omap_mux_init_signal("hdmi_ddc_sda",
+1 -1
drivers/video/atmel_lcdfb.c
··· 1108 1108 */ 1109 1109 lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL); 1110 1110 1111 - sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL); 1111 + sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR); 1112 1112 lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0); 1113 1113 if (sinfo->atmel_lcdfb_power_control) 1114 1114 sinfo->atmel_lcdfb_power_control(0);
+2 -2
drivers/video/fsl-diu-fb.c
··· 1432 1432 struct fsl_diu_data *data; 1433 1433 1434 1434 data = dev_get_drvdata(&ofdev->dev); 1435 - disable_lcdc(data->fsl_diu_info[0]); 1435 + disable_lcdc(data->fsl_diu_info); 1436 1436 1437 1437 return 0; 1438 1438 } ··· 1442 1442 struct fsl_diu_data *data; 1443 1443 1444 1444 data = dev_get_drvdata(&ofdev->dev); 1445 - enable_lcdc(data->fsl_diu_info[0]); 1445 + enable_lcdc(data->fsl_diu_info); 1446 1446 1447 1447 return 0; 1448 1448 }
-1
drivers/video/intelfb/intelfbdrv.c
··· 529 529 if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) { 530 530 ERR_MSG("Could not allocate cmap for intelfb_info.\n"); 531 531 goto err_out_cmap; 532 - return -ENODEV; 533 532 } 534 533 535 534 dinfo = info->par;
+1 -1
drivers/video/omap2/dss/dispc.c
··· 401 401 402 402 DSSDBG("dispc_runtime_put\n"); 403 403 404 - r = pm_runtime_put(&dispc.pdev->dev); 404 + r = pm_runtime_put_sync(&dispc.pdev->dev); 405 405 WARN_ON(r < 0); 406 406 } 407 407
+1 -1
drivers/video/omap2/dss/dsi.c
··· 1079 1079 1080 1080 DSSDBG("dsi_runtime_put\n"); 1081 1081 1082 - r = pm_runtime_put(&dsi->pdev->dev); 1082 + r = pm_runtime_put_sync(&dsi->pdev->dev); 1083 1083 WARN_ON(r < 0); 1084 1084 } 1085 1085
+1 -1
drivers/video/omap2/dss/dss.c
··· 720 720 721 721 DSSDBG("dss_runtime_put\n"); 722 722 723 - r = pm_runtime_put(&dss.pdev->dev); 723 + r = pm_runtime_put_sync(&dss.pdev->dev); 724 724 WARN_ON(r < 0); 725 725 } 726 726
+4 -1
drivers/video/omap2/dss/hdmi.c
··· 176 176 177 177 DSSDBG("hdmi_runtime_put\n"); 178 178 179 - r = pm_runtime_put(&hdmi.pdev->dev); 179 + r = pm_runtime_put_sync(&hdmi.pdev->dev); 180 180 WARN_ON(r < 0); 181 181 } 182 182 ··· 497 497 498 498 int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) 499 499 { 500 + struct omap_dss_hdmi_data *priv = dssdev->data; 500 501 int r = 0; 501 502 502 503 DSSDBG("ENTER hdmi_display_enable\n"); ··· 509 508 r = -ENODEV; 510 509 goto err0; 511 510 } 511 + 512 + hdmi.ip_data.hpd_gpio = priv->hpd_gpio; 512 513 513 514 r = omap_dss_start_device(dssdev); 514 515 if (r) {
+1 -1
drivers/video/omap2/dss/rfbi.c
··· 140 140 141 141 DSSDBG("rfbi_runtime_put\n"); 142 142 143 - r = pm_runtime_put(&rfbi.pdev->dev); 143 + r = pm_runtime_put_sync(&rfbi.pdev->dev); 144 144 WARN_ON(r < 0); 145 145 } 146 146
+4
drivers/video/omap2/dss/ti_hdmi.h
··· 126 126 const struct ti_hdmi_ip_ops *ops; 127 127 struct hdmi_config cfg; 128 128 struct hdmi_pll_info pll_data; 129 + 130 + /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */ 131 + int hpd_gpio; 132 + bool phy_tx_enabled; 129 133 }; 130 134 int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data); 131 135 void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data);
+64 -4
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
··· 28 28 #include <linux/delay.h> 29 29 #include <linux/string.h> 30 30 #include <linux/seq_file.h> 31 + #include <linux/gpio.h> 31 32 32 33 #include "ti_hdmi_4xxx_ip.h" 33 34 #include "dss.h" ··· 224 223 hdmi_set_pll_pwr(ip_data, HDMI_PLLPWRCMD_ALLOFF); 225 224 } 226 225 226 + static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data) 227 + { 228 + unsigned long flags; 229 + bool hpd; 230 + int r; 231 + /* this should be in ti_hdmi_4xxx_ip private data */ 232 + static DEFINE_SPINLOCK(phy_tx_lock); 233 + 234 + spin_lock_irqsave(&phy_tx_lock, flags); 235 + 236 + hpd = gpio_get_value(ip_data->hpd_gpio); 237 + 238 + if (hpd == ip_data->phy_tx_enabled) { 239 + spin_unlock_irqrestore(&phy_tx_lock, flags); 240 + return 0; 241 + } 242 + 243 + if (hpd) 244 + r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON); 245 + else 246 + r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_LDOON); 247 + 248 + if (r) { 249 + DSSERR("Failed to %s PHY TX power\n", 250 + hpd ? "enable" : "disable"); 251 + goto err; 252 + } 253 + 254 + ip_data->phy_tx_enabled = hpd; 255 + err: 256 + spin_unlock_irqrestore(&phy_tx_lock, flags); 257 + return r; 258 + } 259 + 260 + static irqreturn_t hpd_irq_handler(int irq, void *data) 261 + { 262 + struct hdmi_ip_data *ip_data = data; 263 + 264 + hdmi_check_hpd_state(ip_data); 265 + 266 + return IRQ_HANDLED; 267 + } 268 + 227 269 int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data) 228 270 { 229 271 u16 r = 0; 230 272 void __iomem *phy_base = hdmi_phy_base(ip_data); 231 273 232 274 r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_LDOON); 233 - if (r) 234 - return r; 235 - 236 - r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON); 237 275 if (r) 238 276 return r; 239 277 ··· 297 257 /* Write to phy address 3 to change the polarity control */ 298 258 REG_FLD_MOD(phy_base, HDMI_TXPHY_PAD_CFG_CTRL, 0x1, 27, 27); 299 259 260 + r = request_threaded_irq(gpio_to_irq(ip_data->hpd_gpio), 261 + NULL, hpd_irq_handler, 262 + IRQF_DISABLED | IRQF_TRIGGER_RISING | 263 + IRQF_TRIGGER_FALLING, "hpd", ip_data); 264 + if (r) { 265 + DSSERR("HPD IRQ request failed\n"); 266 + hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); 267 + return r; 268 + } 269 + 270 + r = hdmi_check_hpd_state(ip_data); 271 + if (r) { 272 + free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data); 273 + hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); 274 + return r; 275 + } 276 + 300 277 return 0; 301 278 } 302 279 303 280 void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data) 304 281 { 282 + free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data); 283 + 305 284 hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); 285 + ip_data->phy_tx_enabled = false; 306 286 } 307 287 308 288 static int hdmi_core_ddc_init(struct hdmi_ip_data *ip_data)
+1 -1
drivers/video/omap2/dss/venc.c
··· 401 401 402 402 DSSDBG("venc_runtime_put\n"); 403 403 404 - r = pm_runtime_put(&venc.pdev->dev); 404 + r = pm_runtime_put_sync(&venc.pdev->dev); 405 405 WARN_ON(r < 0); 406 406 } 407 407
+5
include/video/omapdss.h
··· 590 590 int (*get_backlight)(struct omap_dss_device *dssdev); 591 591 }; 592 592 593 + struct omap_dss_hdmi_data 594 + { 595 + int hpd_gpio; 596 + }; 597 + 593 598 struct omap_dss_driver { 594 599 struct device_driver driver; 595 600