Pull fbdev fixes from Tomi Valkeinen: - fbdev: Minor fixes to broadsheetfb, fsl-diu-fb, mb862xxfb, tridentfb, omapfb - display-timing: Fix memory leak in error path * tag 'fbdev-fixes-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: video: of: fix memory leak fbdev: broadsheetfb: fix memory leak OMAPDSS: panel-sony-acx565akm: Export OF module alias information fbdev: omap2: connector-dvi: use of_get_i2c_adapter_by_node interface tridentfb: Fix set_lwidth on TGUI9440 and CYBER9320 tridentfb: fix hang on Blade3D with CONFIG_CC_OPTIMIZE_FOR_SIZE video: fbdev: mb862xx: Fix module autoload for OF platform driver video: fbdev: fsl: Fix the sleep function for FSL DIU module
Unified · Split
| @@ -752,7 +752,7 @@ static ssize_t broadsheet_loadstore_waveform(struct device *dev, · 751 unmodified lines | ||
| 752 | 752 | if ((fw_entry->size < 8*1024) || (fw_entry->size > 64*1024)) { |
| 753 | 753 | dev_err(dev, "Invalid waveform\n"); |
| 754 | 754 | err = -EINVAL; |
| 755 | − goto err_failed; | |
| 755 | + goto err_fw; | |
| 756 | 756 | } |
| 757 | 757 | |
| 758 | 758 | mutex_lock(&(par->io_lock)); |
| @@ -762,13 +762,15 @@ static ssize_t broadsheet_loadstore_waveform(struct device *dev, · 3 unmodified lines | ||
| 762 | 762 | mutex_unlock(&(par->io_lock)); |
| 763 | 763 | if (err < 0) { |
| 764 | 764 | dev_err(dev, "Failed to store broadsheet waveform\n"); |
| 765 | − goto err_failed; | |
| 765 | + goto err_fw; | |
| 766 | 766 | } |
| 767 | 767 | |
| 768 | 768 | dev_info(dev, "Stored broadsheet waveform, size %zd\n", fw_entry->size); |
| 769 | 769 | |
| 770 | − return len; | |
| 770 | + err = len; | |
| 771 | 771 | |
| 772 | +err_fw: | |
| 773 | + release_firmware(fw_entry); | |
| 772 | 774 | err_failed: |
| 773 | 775 | return err; |
| 774 | 776 | } |
| @@ -1628,9 +1628,16 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state) · 1627 unmodified lines | ||
| 1628 | 1628 | static int fsl_diu_resume(struct platform_device *ofdev) |
| 1629 | 1629 | { |
| 1630 | 1630 | struct fsl_diu_data *data; |
| 1631 | + unsigned int i; | |
| 1631 | 1632 | |
| 1632 | 1633 | data = dev_get_drvdata(&ofdev->dev); |
| 1633 | − enable_lcdc(data->fsl_diu_info); | |
| 1634 | + | |
| 1635 | + fsl_diu_enable_interrupts(data); | |
| 1636 | + update_lcdc(data->fsl_diu_info); | |
| 1637 | + for (i = 0; i < NUM_AOIS; i++) { | |
| 1638 | + if (data->mfb[i].count) | |
| 1639 | + fsl_diu_enable_panel(&data->fsl_diu_info[i]); | |
| 1640 | + } | |
| 1634 | 1641 | |
| 1635 | 1642 | return 0; |
| 1636 | 1643 | } |
| @@ -831,6 +831,7 @@ static struct of_device_id of_platform_mb862xx_tbl[] = { · 830 unmodified lines | ||
| 831 | 831 | { .compatible = "fujitsu,coral", }, |
| 832 | 832 | { /* end */ } |
| 833 | 833 | }; |
| 834 | +MODULE_DEVICE_TABLE(of, of_platform_mb862xx_tbl); | |
| 834 | 835 | |
| 835 | 836 | static struct platform_driver of_platform_mb862xxfb_driver = { |
| 836 | 837 | .driver = { |
| @@ -294,7 +294,7 @@ static int dvic_probe_of(struct platform_device *pdev) · 293 unmodified lines | ||
| 294 | 294 | |
| 295 | 295 | adapter_node = of_parse_phandle(node, "ddc-i2c-bus", 0); |
| 296 | 296 | if (adapter_node) { |
| 297 | − adapter = of_find_i2c_adapter_by_node(adapter_node); | |
| 297 | + adapter = of_get_i2c_adapter_by_node(adapter_node); | |
| 298 | 298 | if (adapter == NULL) { |
| 299 | 299 | dev_err(&pdev->dev, "failed to parse ddc-i2c-bus\n"); |
| 300 | 300 | omap_dss_put_device(ddata->in); |
| @@ -898,6 +898,7 @@ static const struct of_device_id acx565akm_of_match[] = { · 897 unmodified lines | ||
| 898 | 898 | { .compatible = "omapdss,sony,acx565akm", }, |
| 899 | 899 | {}, |
| 900 | 900 | }; |
| 901 | +MODULE_DEVICE_TABLE(of, acx565akm_of_match); | |
| 901 | 902 | |
| 902 | 903 | static struct spi_driver acx565akm_driver = { |
| 903 | 904 | .driver = { |
| @@ -226,7 +226,7 @@ static void blade_image_blit(struct tridentfb_par *par, const char *data, · 225 unmodified lines | ||
| 226 | 226 | writemmr(par, DST1, point(x, y)); |
| 227 | 227 | writemmr(par, DST2, point(x + w - 1, y + h - 1)); |
| 228 | 228 | |
| 229 | − memcpy(par->io_virt + 0x10000, data, 4 * size); | |
| 229 | + iowrite32_rep(par->io_virt + 0x10000, data, size); | |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | static void blade_copy_rect(struct tridentfb_par *par, |
| @@ -673,8 +673,14 @@ static int get_nativex(struct tridentfb_par *par) · 440 unmodified lines | ||
| 673 | 673 | static inline void set_lwidth(struct tridentfb_par *par, int width) |
| 674 | 674 | { |
| 675 | 675 | write3X4(par, VGA_CRTC_OFFSET, width & 0xFF); |
| 676 | − write3X4(par, AddColReg, | |
| 677 | − (read3X4(par, AddColReg) & 0xCF) | ((width & 0x300) >> 4)); | |
| 676 | + /* chips older than TGUI9660 have only 1 width bit in AddColReg */ | |
| 677 | + /* touching the other one breaks I2C/DDC */ | |
| 678 | + if (par->chip_id == TGUI9440 || par->chip_id == CYBER9320) | |
| 679 | + write3X4(par, AddColReg, | |
| 680 | + (read3X4(par, AddColReg) & 0xEF) | ((width & 0x100) >> 4)); | |
| 681 | + else | |
| 682 | + write3X4(par, AddColReg, | |
| 683 | + (read3X4(par, AddColReg) & 0xCF) | ((width & 0x300) >> 4)); | |
| 678 | 684 | } |
| 679 | 685 | |
| 680 | 686 | /* For resolutions smaller than FP resolution stretch */ |
| @@ -210,6 +210,7 @@ struct display_timings *of_get_display_timings(struct device_node *np) · 209 unmodified lines | ||
| 210 | 210 | */ |
| 211 | 211 | pr_err("%s: error in timing %d\n", |
| 212 | 212 | of_node_full_name(np), disp->num_timings + 1); |
| 213 | + kfree(dt); | |
| 213 | 214 | goto timingfail; |
| 214 | 215 | } |
| 215 | 216 | |