Commit be129fab authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-5.19/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes from Helge Deller:
 "Two bug fixes for the pxa3xx and intelfb drivers:

   - pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write

   - intelfb: Initialize value of stolen size

  The other changes are small cleanups, simplifications and
  documentation updates to the cirrusfb, skeletonfb, omapfb,
  intelfb, au1100fb and simplefb drivers"

* tag 'for-5.19/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  video: fbdev: omap: Remove duplicate 'the' in comment
  video: fbdev: omapfb: Align '*' in comment
  video: fbdev: simplefb: Check before clk_put() not needed
  video: fbdev: au1100fb: Drop unnecessary NULL ptr check
  video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
  video: fbdev: skeletonfb: Convert to generic power management
  video: fbdev: cirrusfb: Remove useless reference to PCI power management
  video: fbdev: intelfb: Initialize value of stolen size
  video: fbdev: intelfb: Use aperture size from pci_resource_len
  video: fbdev: skeletonfb: Fix syntax errors in comments
parents c0c6a7bd cb517733
...@@ -560,8 +560,7 @@ int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state) ...@@ -560,8 +560,7 @@ int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state)
/* Blank the LCD */ /* Blank the LCD */
au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info); au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info);
if (fbdev->lcdclk) clk_disable(fbdev->lcdclk);
clk_disable(fbdev->lcdclk);
memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs)); memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs));
...@@ -577,8 +576,7 @@ int au1100fb_drv_resume(struct platform_device *dev) ...@@ -577,8 +576,7 @@ int au1100fb_drv_resume(struct platform_device *dev)
memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs)); memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs));
if (fbdev->lcdclk) clk_enable(fbdev->lcdclk);
clk_enable(fbdev->lcdclk);
/* Unblank the LCD */ /* Unblank the LCD */
au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info); au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info);
......
...@@ -2184,12 +2184,6 @@ static struct pci_driver cirrusfb_pci_driver = { ...@@ -2184,12 +2184,6 @@ static struct pci_driver cirrusfb_pci_driver = {
.id_table = cirrusfb_pci_table, .id_table = cirrusfb_pci_table,
.probe = cirrusfb_pci_register, .probe = cirrusfb_pci_register,
.remove = cirrusfb_pci_unregister, .remove = cirrusfb_pci_unregister,
#ifdef CONFIG_PM
#if 0
.suspend = cirrusfb_pci_suspend,
.resume = cirrusfb_pci_resume,
#endif
#endif
}; };
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
......
...@@ -472,7 +472,7 @@ static int intelfb_pci_register(struct pci_dev *pdev, ...@@ -472,7 +472,7 @@ static int intelfb_pci_register(struct pci_dev *pdev,
struct fb_info *info; struct fb_info *info;
struct intelfb_info *dinfo; struct intelfb_info *dinfo;
int i, err, dvo; int i, err, dvo;
int aperture_size, stolen_size; int aperture_size, stolen_size = 0;
struct agp_kern_info gtt_info; struct agp_kern_info gtt_info;
int agp_memtype; int agp_memtype;
const char *s; const char *s;
...@@ -571,7 +571,7 @@ static int intelfb_pci_register(struct pci_dev *pdev, ...@@ -571,7 +571,7 @@ static int intelfb_pci_register(struct pci_dev *pdev,
return -ENODEV; return -ENODEV;
} }
if (intelfbhw_get_memory(pdev, &aperture_size,&stolen_size)) { if (intelfbhw_get_memory(pdev, &aperture_size, &stolen_size)) {
cleanup(dinfo); cleanup(dinfo);
return -ENODEV; return -ENODEV;
} }
......
...@@ -201,13 +201,11 @@ int intelfbhw_get_memory(struct pci_dev *pdev, int *aperture_size, ...@@ -201,13 +201,11 @@ int intelfbhw_get_memory(struct pci_dev *pdev, int *aperture_size,
case PCI_DEVICE_ID_INTEL_945GME: case PCI_DEVICE_ID_INTEL_945GME:
case PCI_DEVICE_ID_INTEL_965G: case PCI_DEVICE_ID_INTEL_965G:
case PCI_DEVICE_ID_INTEL_965GM: case PCI_DEVICE_ID_INTEL_965GM:
/* 915, 945 and 965 chipsets support a 256MB aperture. /*
Aperture size is determined by inspected the * 915, 945 and 965 chipsets support 64MB, 128MB or 256MB
base address of the aperture. */ * aperture. Determine size from PCI resource length.
if (pci_resource_start(pdev, 2) & 0x08000000) */
*aperture_size = MB(128); *aperture_size = pci_resource_len(pdev, 2);
else
*aperture_size = MB(256);
break; break;
default: default:
if ((tmp & INTEL_GMCH_MEM_MASK) == INTEL_GMCH_MEM_64M) if ((tmp & INTEL_GMCH_MEM_MASK) == INTEL_GMCH_MEM_64M)
......
...@@ -359,7 +359,7 @@ static void sossi_set_bits_per_cycle(int bpc) ...@@ -359,7 +359,7 @@ static void sossi_set_bits_per_cycle(int bpc)
int bus_pick_count, bus_pick_width; int bus_pick_count, bus_pick_width;
/* /*
* We set explicitly the the bus_pick_count as well, although * We set explicitly the bus_pick_count as well, although
* with remapping/reordering disabled it will be calculated by HW * with remapping/reordering disabled it will be calculated by HW
* as (32 / bus_pick_width). * as (32 / bus_pick_width).
*/ */
......
...@@ -143,7 +143,7 @@ int hdmi_phy_configure(struct hdmi_phy_data *phy, unsigned long hfbitclk, ...@@ -143,7 +143,7 @@ int hdmi_phy_configure(struct hdmi_phy_data *phy, unsigned long hfbitclk,
/* /*
* In OMAP5+, the HFBITCLK must be divided by 2 before issuing the * In OMAP5+, the HFBITCLK must be divided by 2 before issuing the
* HDMI_PHYPWRCMD_LDOON command. * HDMI_PHYPWRCMD_LDOON command.
*/ */
if (phy_feat->bist_ctrl) if (phy_feat->bist_ctrl)
REG_FLD_MOD(phy->base, HDMI_TXPHY_BIST_CONTROL, 1, 11, 11); REG_FLD_MOD(phy->base, HDMI_TXPHY_BIST_CONTROL, 1, 11, 11);
......
...@@ -381,7 +381,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff, ...@@ -381,7 +381,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff,
struct pxa3xx_gcu_batch *buffer; struct pxa3xx_gcu_batch *buffer;
struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file); struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
int words = count / 4; size_t words = count / 4;
/* Does not need to be atomic. There's a lock in user space, /* Does not need to be atomic. There's a lock in user space,
* but anyhow, this is just for statistics. */ * but anyhow, this is just for statistics. */
......
...@@ -237,8 +237,7 @@ static int simplefb_clocks_get(struct simplefb_par *par, ...@@ -237,8 +237,7 @@ static int simplefb_clocks_get(struct simplefb_par *par,
if (IS_ERR(clock)) { if (IS_ERR(clock)) {
if (PTR_ERR(clock) == -EPROBE_DEFER) { if (PTR_ERR(clock) == -EPROBE_DEFER) {
while (--i >= 0) { while (--i >= 0) {
if (par->clks[i]) clk_put(par->clks[i]);
clk_put(par->clks[i]);
} }
kfree(par->clks); kfree(par->clks);
return -EPROBE_DEFER; return -EPROBE_DEFER;
......
...@@ -96,7 +96,7 @@ static const struct fb_fix_screeninfo xxxfb_fix = { ...@@ -96,7 +96,7 @@ static const struct fb_fix_screeninfo xxxfb_fix = {
/* /*
* Modern graphical hardware not only supports pipelines but some * Modern graphical hardware not only supports pipelines but some
* also support multiple monitors where each display can have its * also support multiple monitors where each display can have
* its own unique data. In this case each display could be * its own unique data. In this case each display could be
* represented by a separate framebuffer device thus a separate * represented by a separate framebuffer device thus a separate
* struct fb_info. Now the struct xxx_par represents the graphics * struct fb_info. Now the struct xxx_par represents the graphics
...@@ -838,9 +838,9 @@ static void xxxfb_remove(struct pci_dev *dev) ...@@ -838,9 +838,9 @@ static void xxxfb_remove(struct pci_dev *dev)
* *
* See Documentation/driver-api/pm/devices.rst for more information * See Documentation/driver-api/pm/devices.rst for more information
*/ */
static int xxxfb_suspend(struct pci_dev *dev, pm_message_t msg) static int xxxfb_suspend(struct device *dev)
{ {
struct fb_info *info = pci_get_drvdata(dev); struct fb_info *info = dev_get_drvdata(dev);
struct xxxfb_par *par = info->par; struct xxxfb_par *par = info->par;
/* suspend here */ /* suspend here */
...@@ -853,9 +853,9 @@ static int xxxfb_suspend(struct pci_dev *dev, pm_message_t msg) ...@@ -853,9 +853,9 @@ static int xxxfb_suspend(struct pci_dev *dev, pm_message_t msg)
* *
* See Documentation/driver-api/pm/devices.rst for more information * See Documentation/driver-api/pm/devices.rst for more information
*/ */
static int xxxfb_resume(struct pci_dev *dev) static int xxxfb_resume(struct device *dev)
{ {
struct fb_info *info = pci_get_drvdata(dev); struct fb_info *info = dev_get_drvdata(dev);
struct xxxfb_par *par = info->par; struct xxxfb_par *par = info->par;
/* resume here */ /* resume here */
...@@ -873,14 +873,15 @@ static const struct pci_device_id xxxfb_id_table[] = { ...@@ -873,14 +873,15 @@ static const struct pci_device_id xxxfb_id_table[] = {
{ 0, } { 0, }
}; };
static SIMPLE_DEV_PM_OPS(xxxfb_pm_ops, xxxfb_suspend, xxxfb_resume);
/* For PCI drivers */ /* For PCI drivers */
static struct pci_driver xxxfb_driver = { static struct pci_driver xxxfb_driver = {
.name = "xxxfb", .name = "xxxfb",
.id_table = xxxfb_id_table, .id_table = xxxfb_id_table,
.probe = xxxfb_probe, .probe = xxxfb_probe,
.remove = xxxfb_remove, .remove = xxxfb_remove,
.suspend = xxxfb_suspend, /* optional but recommended */ .driver.pm = xxxfb_pm_ops, /* optional but recommended */
.resume = xxxfb_resume, /* optional but recommended */
}; };
MODULE_DEVICE_TABLE(pci, xxxfb_id_table); MODULE_DEVICE_TABLE(pci, xxxfb_id_table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment