diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-07 18:54:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-07 18:54:02 -0500 |
commit | 98e96852480566333f6dacd3223f0be15df34d60 (patch) | |
tree | dab2122717f7e371d9e20c0bc3561c501d61c658 | |
parent | 8eef05dd3e70233f3e391774d612dab44c3f023b (diff) | |
parent | 9f1065032ceb7e86c7c9f16bb86518857e88a172 (diff) |
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
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/display.c | 4 | ||||
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 2 | ||||
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 4 | ||||
-rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 5 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi.h | 4 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 68 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 2 | ||||
-rw-r--r-- | include/video/omapdss.h | 5 |
15 files changed, 113 insertions, 26 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 39fba9df17fb..21fc87648660 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -52,8 +52,9 @@ | |||
52 | #define ETH_KS8851_QUART 138 | 52 | #define ETH_KS8851_QUART 138 |
53 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 | 53 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 |
54 | #define OMAP4_SFH7741_ENABLE_GPIO 188 | 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 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | 56 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
57 | #define HDMI_GPIO_HPD 63 /* Hotplug detect */ | ||
57 | #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ | 58 | #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ |
58 | #define DLP_POWER_ON_GPIO 40 | 59 | #define DLP_POWER_ON_GPIO 40 |
59 | 60 | ||
@@ -603,8 +604,9 @@ static void __init omap_sfh7741prox_init(void) | |||
603 | } | 604 | } |
604 | 605 | ||
605 | static struct gpio sdp4430_hdmi_gpios[] = { | 606 | static struct gpio sdp4430_hdmi_gpios[] = { |
606 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, | 607 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, |
607 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | 608 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
609 | { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, | ||
608 | }; | 610 | }; |
609 | 611 | ||
610 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) | 612 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) |
@@ -621,8 +623,7 @@ static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) | |||
621 | 623 | ||
622 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) | 624 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) |
623 | { | 625 | { |
624 | gpio_free(HDMI_GPIO_LS_OE); | 626 | gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios)); |
625 | gpio_free(HDMI_GPIO_HPD); | ||
626 | } | 627 | } |
627 | 628 | ||
628 | static struct nokia_dsi_panel_data dsi1_panel = { | 629 | static struct nokia_dsi_panel_data dsi1_panel = { |
@@ -738,6 +739,10 @@ static void sdp4430_lcd_init(void) | |||
738 | pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); | 739 | pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); |
739 | } | 740 | } |
740 | 741 | ||
742 | static struct omap_dss_hdmi_data sdp4430_hdmi_data = { | ||
743 | .hpd_gpio = HDMI_GPIO_HPD, | ||
744 | }; | ||
745 | |||
741 | static struct omap_dss_device sdp4430_hdmi_device = { | 746 | static struct omap_dss_device sdp4430_hdmi_device = { |
742 | .name = "hdmi", | 747 | .name = "hdmi", |
743 | .driver_name = "hdmi_panel", | 748 | .driver_name = "hdmi_panel", |
@@ -745,6 +750,7 @@ static struct omap_dss_device sdp4430_hdmi_device = { | |||
745 | .platform_enable = sdp4430_panel_enable_hdmi, | 750 | .platform_enable = sdp4430_panel_enable_hdmi, |
746 | .platform_disable = sdp4430_panel_disable_hdmi, | 751 | .platform_disable = sdp4430_panel_disable_hdmi, |
747 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 752 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
753 | .data = &sdp4430_hdmi_data, | ||
748 | }; | 754 | }; |
749 | 755 | ||
750 | static struct picodlp_panel_data sdp4430_picodlp_pdata = { | 756 | static struct picodlp_panel_data sdp4430_picodlp_pdata = { |
@@ -829,6 +835,10 @@ static void omap_4430sdp_display_init(void) | |||
829 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | 835 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); |
830 | else | 836 | else |
831 | omap_hdmi_init(0); | 837 | omap_hdmi_init(0); |
838 | |||
839 | omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); | ||
840 | omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); | ||
841 | omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); | ||
832 | } | 842 | } |
833 | 843 | ||
834 | #ifdef CONFIG_OMAP_MUX | 844 | #ifdef CONFIG_OMAP_MUX |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 30ad40db2cf3..b7779c206a90 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -51,8 +51,9 @@ | |||
51 | #define GPIO_HUB_NRESET 62 | 51 | #define GPIO_HUB_NRESET 62 |
52 | #define GPIO_WIFI_PMENA 43 | 52 | #define GPIO_WIFI_PMENA 43 |
53 | #define GPIO_WIFI_IRQ 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 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | 55 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
56 | #define HDMI_GPIO_HPD 63 /* Hotplug detect */ | ||
56 | 57 | ||
57 | /* wl127x BT, FM, GPS connectivity chip */ | 58 | /* wl127x BT, FM, GPS connectivity chip */ |
58 | static int wl1271_gpios[] = {46, -1, -1}; | 59 | static int wl1271_gpios[] = {46, -1, -1}; |
@@ -413,8 +414,9 @@ int __init omap4_panda_dvi_init(void) | |||
413 | } | 414 | } |
414 | 415 | ||
415 | static struct gpio panda_hdmi_gpios[] = { | 416 | static struct gpio panda_hdmi_gpios[] = { |
416 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, | 417 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, |
417 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | 418 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
419 | { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, | ||
418 | }; | 420 | }; |
419 | 421 | ||
420 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | 422 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) |
@@ -431,10 +433,13 @@ static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | |||
431 | 433 | ||
432 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) | 434 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) |
433 | { | 435 | { |
434 | gpio_free(HDMI_GPIO_LS_OE); | 436 | gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios)); |
435 | gpio_free(HDMI_GPIO_HPD); | ||
436 | } | 437 | } |
437 | 438 | ||
439 | static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { | ||
440 | .hpd_gpio = HDMI_GPIO_HPD, | ||
441 | }; | ||
442 | |||
438 | static struct omap_dss_device omap4_panda_hdmi_device = { | 443 | static struct omap_dss_device omap4_panda_hdmi_device = { |
439 | .name = "hdmi", | 444 | .name = "hdmi", |
440 | .driver_name = "hdmi_panel", | 445 | .driver_name = "hdmi_panel", |
@@ -442,6 +447,7 @@ static struct omap_dss_device omap4_panda_hdmi_device = { | |||
442 | .platform_enable = omap4_panda_panel_enable_hdmi, | 447 | .platform_enable = omap4_panda_panel_enable_hdmi, |
443 | .platform_disable = omap4_panda_panel_disable_hdmi, | 448 | .platform_disable = omap4_panda_panel_disable_hdmi, |
444 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 449 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
450 | .data = &omap4_panda_hdmi_data, | ||
445 | }; | 451 | }; |
446 | 452 | ||
447 | static struct omap_dss_device *omap4_panda_dss_devices[] = { | 453 | static struct omap_dss_device *omap4_panda_dss_devices[] = { |
@@ -473,6 +479,10 @@ void omap4_panda_display_init(void) | |||
473 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | 479 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); |
474 | else | 480 | else |
475 | omap_hdmi_init(0); | 481 | omap_hdmi_init(0); |
482 | |||
483 | omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); | ||
484 | omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); | ||
485 | omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); | ||
476 | } | 486 | } |
477 | 487 | ||
478 | static void __init omap4_panda_init(void) | 488 | static void __init omap4_panda_init(void) |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 3c446d1a1781..3677b1f58b85 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -103,12 +103,8 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) | |||
103 | u32 reg; | 103 | u32 reg; |
104 | u16 control_i2c_1; | 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 | omap_mux_init_signal("hdmi_cec", | 106 | omap_mux_init_signal("hdmi_cec", |
110 | OMAP_PIN_INPUT_PULLUP); | 107 | OMAP_PIN_INPUT_PULLUP); |
111 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
112 | omap_mux_init_signal("hdmi_ddc_scl", | 108 | omap_mux_init_signal("hdmi_ddc_scl", |
113 | OMAP_PIN_INPUT_PULLUP); | 109 | OMAP_PIN_INPUT_PULLUP); |
114 | omap_mux_init_signal("hdmi_ddc_sda", | 110 | omap_mux_init_signal("hdmi_ddc_sda", |
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 0d7b20d4285d..e40c00f2c2ba 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -1108,7 +1108,7 @@ static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
1108 | */ | 1108 | */ |
1109 | lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL); | 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 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0); | 1112 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0); |
1113 | if (sinfo->atmel_lcdfb_power_control) | 1113 | if (sinfo->atmel_lcdfb_power_control) |
1114 | sinfo->atmel_lcdfb_power_control(0); | 1114 | sinfo->atmel_lcdfb_power_control(0); |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index acf292bfba02..6af3f16754f0 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -1432,7 +1432,7 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state) | |||
1432 | struct fsl_diu_data *data; | 1432 | struct fsl_diu_data *data; |
1433 | 1433 | ||
1434 | data = dev_get_drvdata(&ofdev->dev); | 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 | return 0; | 1437 | return 0; |
1438 | } | 1438 | } |
@@ -1442,7 +1442,7 @@ static int fsl_diu_resume(struct platform_device *ofdev) | |||
1442 | struct fsl_diu_data *data; | 1442 | struct fsl_diu_data *data; |
1443 | 1443 | ||
1444 | data = dev_get_drvdata(&ofdev->dev); | 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 | return 0; | 1447 | return 0; |
1448 | } | 1448 | } |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index c6afa33a4532..02fd2263610c 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -529,7 +529,6 @@ static int __devinit intelfb_pci_register(struct pci_dev *pdev, | |||
529 | if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) { | 529 | if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) { |
530 | ERR_MSG("Could not allocate cmap for intelfb_info.\n"); | 530 | ERR_MSG("Could not allocate cmap for intelfb_info.\n"); |
531 | goto err_out_cmap; | 531 | goto err_out_cmap; |
532 | return -ENODEV; | ||
533 | } | 532 | } |
534 | 533 | ||
535 | dinfo = info->par; | 534 | dinfo = info->par; |
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index a5ec7f37c185..e1626a1d5c45 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -401,7 +401,7 @@ void dispc_runtime_put(void) | |||
401 | 401 | ||
402 | DSSDBG("dispc_runtime_put\n"); | 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 | WARN_ON(r < 0); | 405 | WARN_ON(r < 0); |
406 | } | 406 | } |
407 | 407 | ||
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index d4d676c82c12..52f36ec1c8bb 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -1079,7 +1079,7 @@ void dsi_runtime_put(struct platform_device *dsidev) | |||
1079 | 1079 | ||
1080 | DSSDBG("dsi_runtime_put\n"); | 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 | WARN_ON(r < 0); | 1083 | WARN_ON(r < 0); |
1084 | } | 1084 | } |
1085 | 1085 | ||
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 17033457ee89..77c2b5a32b5d 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -720,7 +720,7 @@ void dss_runtime_put(void) | |||
720 | 720 | ||
721 | DSSDBG("dss_runtime_put\n"); | 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 | WARN_ON(r < 0); | 724 | WARN_ON(r < 0); |
725 | } | 725 | } |
726 | 726 | ||
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index b4c270edb915..d7aa3b056529 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -176,7 +176,7 @@ static void hdmi_runtime_put(void) | |||
176 | 176 | ||
177 | DSSDBG("hdmi_runtime_put\n"); | 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 | WARN_ON(r < 0); | 180 | WARN_ON(r < 0); |
181 | } | 181 | } |
182 | 182 | ||
@@ -497,6 +497,7 @@ bool omapdss_hdmi_detect(void) | |||
497 | 497 | ||
498 | int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) | 498 | int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) |
499 | { | 499 | { |
500 | struct omap_dss_hdmi_data *priv = dssdev->data; | ||
500 | int r = 0; | 501 | int r = 0; |
501 | 502 | ||
502 | DSSDBG("ENTER hdmi_display_enable\n"); | 503 | DSSDBG("ENTER hdmi_display_enable\n"); |
@@ -509,6 +510,8 @@ int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) | |||
509 | goto err0; | 510 | goto err0; |
510 | } | 511 | } |
511 | 512 | ||
513 | hdmi.ip_data.hpd_gpio = priv->hpd_gpio; | ||
514 | |||
512 | r = omap_dss_start_device(dssdev); | 515 | r = omap_dss_start_device(dssdev); |
513 | if (r) { | 516 | if (r) { |
514 | DSSERR("failed to start device\n"); | 517 | DSSERR("failed to start device\n"); |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 814bb9500dca..55f398014f33 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -140,7 +140,7 @@ static void rfbi_runtime_put(void) | |||
140 | 140 | ||
141 | DSSDBG("rfbi_runtime_put\n"); | 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 | WARN_ON(r < 0); | 144 | WARN_ON(r < 0); |
145 | } | 145 | } |
146 | 146 | ||
diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h index 7503f7f619a7..50dadba5070a 100644 --- a/drivers/video/omap2/dss/ti_hdmi.h +++ b/drivers/video/omap2/dss/ti_hdmi.h | |||
@@ -126,6 +126,10 @@ struct hdmi_ip_data { | |||
126 | const struct ti_hdmi_ip_ops *ops; | 126 | const struct ti_hdmi_ip_ops *ops; |
127 | struct hdmi_config cfg; | 127 | struct hdmi_config cfg; |
128 | struct hdmi_pll_info pll_data; | 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 | int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data); | 134 | int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data); |
131 | void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data); | 135 | void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data); |
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index 9af81f18f163..2d72334ca3da 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
31 | #include <linux/gpio.h> | ||
31 | 32 | ||
32 | #include "ti_hdmi_4xxx_ip.h" | 33 | #include "ti_hdmi_4xxx_ip.h" |
33 | #include "dss.h" | 34 | #include "dss.h" |
@@ -223,6 +224,49 @@ void ti_hdmi_4xxx_pll_disable(struct hdmi_ip_data *ip_data) | |||
223 | hdmi_set_pll_pwr(ip_data, HDMI_PLLPWRCMD_ALLOFF); | 224 | hdmi_set_pll_pwr(ip_data, HDMI_PLLPWRCMD_ALLOFF); |
224 | } | 225 | } |
225 | 226 | ||
227 | static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data) | ||
228 | { | ||
229 | unsigned long flags; | ||
230 | bool hpd; | ||
231 | int r; | ||
232 | /* this should be in ti_hdmi_4xxx_ip private data */ | ||
233 | static DEFINE_SPINLOCK(phy_tx_lock); | ||
234 | |||
235 | spin_lock_irqsave(&phy_tx_lock, flags); | ||
236 | |||
237 | hpd = gpio_get_value(ip_data->hpd_gpio); | ||
238 | |||
239 | if (hpd == ip_data->phy_tx_enabled) { | ||
240 | spin_unlock_irqrestore(&phy_tx_lock, flags); | ||
241 | return 0; | ||
242 | } | ||
243 | |||
244 | if (hpd) | ||
245 | r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON); | ||
246 | else | ||
247 | r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_LDOON); | ||
248 | |||
249 | if (r) { | ||
250 | DSSERR("Failed to %s PHY TX power\n", | ||
251 | hpd ? "enable" : "disable"); | ||
252 | goto err; | ||
253 | } | ||
254 | |||
255 | ip_data->phy_tx_enabled = hpd; | ||
256 | err: | ||
257 | spin_unlock_irqrestore(&phy_tx_lock, flags); | ||
258 | return r; | ||
259 | } | ||
260 | |||
261 | static irqreturn_t hpd_irq_handler(int irq, void *data) | ||
262 | { | ||
263 | struct hdmi_ip_data *ip_data = data; | ||
264 | |||
265 | hdmi_check_hpd_state(ip_data); | ||
266 | |||
267 | return IRQ_HANDLED; | ||
268 | } | ||
269 | |||
226 | int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data) | 270 | int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data) |
227 | { | 271 | { |
228 | u16 r = 0; | 272 | u16 r = 0; |
@@ -232,10 +276,6 @@ int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data) | |||
232 | if (r) | 276 | if (r) |
233 | return r; | 277 | return r; |
234 | 278 | ||
235 | r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON); | ||
236 | if (r) | ||
237 | return r; | ||
238 | |||
239 | /* | 279 | /* |
240 | * Read address 0 in order to get the SCP reset done completed | 280 | * Read address 0 in order to get the SCP reset done completed |
241 | * Dummy access performed to make sure reset is done | 281 | * Dummy access performed to make sure reset is done |
@@ -257,12 +297,32 @@ int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data) | |||
257 | /* Write to phy address 3 to change the polarity control */ | 297 | /* Write to phy address 3 to change the polarity control */ |
258 | REG_FLD_MOD(phy_base, HDMI_TXPHY_PAD_CFG_CTRL, 0x1, 27, 27); | 298 | REG_FLD_MOD(phy_base, HDMI_TXPHY_PAD_CFG_CTRL, 0x1, 27, 27); |
259 | 299 | ||
300 | r = request_threaded_irq(gpio_to_irq(ip_data->hpd_gpio), | ||
301 | NULL, hpd_irq_handler, | ||
302 | IRQF_DISABLED | IRQF_TRIGGER_RISING | | ||
303 | IRQF_TRIGGER_FALLING, "hpd", ip_data); | ||
304 | if (r) { | ||
305 | DSSERR("HPD IRQ request failed\n"); | ||
306 | hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); | ||
307 | return r; | ||
308 | } | ||
309 | |||
310 | r = hdmi_check_hpd_state(ip_data); | ||
311 | if (r) { | ||
312 | free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data); | ||
313 | hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); | ||
314 | return r; | ||
315 | } | ||
316 | |||
260 | return 0; | 317 | return 0; |
261 | } | 318 | } |
262 | 319 | ||
263 | void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data) | 320 | void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data) |
264 | { | 321 | { |
322 | free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data); | ||
323 | |||
265 | hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); | 324 | hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); |
325 | ip_data->phy_tx_enabled = false; | ||
266 | } | 326 | } |
267 | 327 | ||
268 | static int hdmi_core_ddc_init(struct hdmi_ip_data *ip_data) | 328 | static int hdmi_core_ddc_init(struct hdmi_ip_data *ip_data) |
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index b3e9f9091581..5c3d0f901510 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -401,7 +401,7 @@ static void venc_runtime_put(void) | |||
401 | 401 | ||
402 | DSSDBG("venc_runtime_put\n"); | 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 | WARN_ON(r < 0); | 405 | WARN_ON(r < 0); |
406 | } | 406 | } |
407 | 407 | ||
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 062b3b24ff10..483f67caa7ad 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -590,6 +590,11 @@ struct omap_dss_device { | |||
590 | int (*get_backlight)(struct omap_dss_device *dssdev); | 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 | struct omap_dss_driver { | 598 | struct omap_dss_driver { |
594 | struct device_driver driver; | 599 | struct device_driver driver; |
595 | 600 | ||