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 /drivers | |
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
Diffstat (limited to 'drivers')
-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 |
11 files changed, 80 insertions, 14 deletions
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 | ||