Commit 0d1d4403 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull fbdev updates from Helge Deller:
 "The Termius 10x18 console bitmap font has been added. It is good
  match for modern 13-16 inch laptop displays with resolutions like
  1280x800 and 1440x900 pixels.

  The gbefb and tcx.c drivers got some fixes to restore X11 support,
  pxafb was not actually clamping input values and the ssd1307fb driver
  leaked memory in the failure path.

  The other patches convert some common drivers to use dev_info() and
  dev_dbg() instead of printk(). Summary:

  Framework updates:
   - fonts: Add Terminus 10x18 console font [Neilay Kharwadkar]

  Driver fixes:
   - gbefb: fix to use physical address instead of dma address [René Rebe]
   - tcx.c fix mem_map to correct smem_start offset [René Rebe]
   - pxafb: Fix multiple clamped values in pxafb_adjust_timing [Thorsten Blum]
   - ssd1307fb: fix potential page leak in ssd1307fb_probe() [Abdun Nihaal]

  Cleanups:
   - vga16fb: Request memory region [Javier Garcia]
   - vga16fb: replace printk() with dev_*() in probe [Vivek BalachandharTN]
   - vesafb, gxt4500fb, tridentfb: Use dev_dbg() instead of printk() [Javier Garcia]
   - i810: use dev_info() [Shi Hao]"

* tag 'fbdev-for-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe()
  fbdev: i810: use appopriate log interface dev_info
  fbdev: tridentfb: replace printk() with dev_*() in probe
  lib/fonts: Add Terminus 10x18 console font
  fbdev: pxafb: Fix multiple clamped values in pxafb_adjust_timing
  fbdev: tcx.c fix mem_map to correct smem_start offset
  fbdev: gxt4500fb: Use dev_err instead of printk
  fbdev: gbefb: fix to use physical address instead of dma address
  fbdev: vesafb: Use dev_* fn's instead printk
  fbdev: vga16fb: Request memory region
  fbdev: vga16fb: replace printk() with dev_*() in probe
parents c06c3038 16431266
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/dma-direct.h>
#include <linux/errno.h>
#include <linux/gfp.h>
#include <linux/fb.h>
@@ -65,7 +66,7 @@ struct gbefb_par {
static unsigned int gbe_mem_size = CONFIG_FB_GBE_MEM * 1024*1024;
static void *gbe_mem;
static dma_addr_t gbe_dma_addr;
static unsigned long gbe_mem_phys;
static phys_addr_t gbe_mem_phys;

static struct {
	uint16_t *cpu;
@@ -1183,7 +1184,7 @@ static int gbefb_probe(struct platform_device *p_dev)
			goto out_release_mem_region;
		}

		gbe_mem_phys = (unsigned long) gbe_dma_addr;
		gbe_mem_phys = dma_to_phys(&p_dev->dev, gbe_dma_addr);
	}

	par = info->par;
+1 −1
Original line number Diff line number Diff line
@@ -704,7 +704,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
	}
	info->var = var;
	if (gxt4500_set_par(info)) {
		printk(KERN_ERR "gxt4500: cannot set video mode\n");
		dev_err(&pdev->dev, "cannot set video mode\n");
		goto err_free_cmap;
	}

+23 −23
Original line number Diff line number Diff line
@@ -1012,7 +1012,7 @@ static int i810_check_params(struct fb_var_screeninfo *var,
						      var->bits_per_pixel);
			vidmem = line_length * info->var.yres;
			if (vxres < var->xres) {
				printk("i810fb: required video memory, "
				dev_info(&par->dev->dev, "required video memory, "
				       "%d bytes, for %dx%d-%d (virtual) "
				       "is out of range\n",
				       vidmem, vxres, vyres,
@@ -1067,7 +1067,7 @@ static int i810_check_params(struct fb_var_screeninfo *var,
				|(info->monspecs.hfmax-HFMAX)
				|(info->monspecs.vfmin-VFMIN)
				|(info->monspecs.vfmax-VFMAX);
			printk("i810fb: invalid video mode%s\n",
			dev_err(&par->dev->dev, "invalid video mode%s\n",
				default_sync ? "" : ". Specifying "
				"vsyncN/hsyncN parameters may help");
			retval = -EINVAL;
@@ -1674,19 +1674,19 @@ static int i810_alloc_agp_mem(struct fb_info *info)
	size = par->fb.size + par->iring.size;

	if (!(bridge = agp_backend_acquire(par->dev))) {
		printk("i810fb_alloc_fbmem: cannot acquire agpgart\n");
		dev_warn(&par->dev->dev, "cannot acquire agpgart\n");
		return -ENODEV;
	}
	if (!(par->i810_gtt.i810_fb_memory =
	      agp_allocate_memory(bridge, size >> 12, AGP_NORMAL_MEMORY))) {
		printk("i810fb_alloc_fbmem: can't allocate framebuffer "
		dev_warn(&par->dev->dev, "can't allocate framebuffer "
		       "memory\n");
		agp_backend_release(bridge);
		return -ENOMEM;
	}
	if (agp_bind_memory(par->i810_gtt.i810_fb_memory,
			    par->fb.offset)) {
		printk("i810fb_alloc_fbmem: can't bind framebuffer memory\n");
		dev_warn(&par->dev->dev, "can't bind framebuffer memory\n");
		agp_backend_release(bridge);
		return -EBUSY;
	}
@@ -1694,14 +1694,14 @@ static int i810_alloc_agp_mem(struct fb_info *info)
	if (!(par->i810_gtt.i810_cursor_memory =
	      agp_allocate_memory(bridge, par->cursor_heap.size >> 12,
				  AGP_PHYSICAL_MEMORY))) {
		printk("i810fb_alloc_cursormem:  can't allocate "
		dev_warn(&par->dev->dev, "can't allocate "
		       "cursor memory\n");
		agp_backend_release(bridge);
		return -ENOMEM;
	}
	if (agp_bind_memory(par->i810_gtt.i810_cursor_memory,
			    par->cursor_heap.offset)) {
		printk("i810fb_alloc_cursormem: cannot bind cursor memory\n");
		dev_warn(&par->dev->dev, "cannot bind cursor memory\n");
		agp_backend_release(bridge);
		return -EBUSY;
	}
@@ -1844,7 +1844,7 @@ static int i810_allocate_pci_resource(struct i810fb_par *par,
	int err;

	if ((err = pci_enable_device(par->dev))) {
		printk("i810fb_init: cannot enable device\n");
		dev_err(&par->dev->dev, "cannot enable device\n");
		return err;
	}
	par->res_flags |= PCI_DEVICE_ENABLED;
@@ -1859,14 +1859,14 @@ static int i810_allocate_pci_resource(struct i810fb_par *par,
		par->mmio_start_phys = pci_resource_start(par->dev, 0);
	}
	if (!par->aperture.size) {
		printk("i810fb_init: device is disabled\n");
		dev_warn(&par->dev->dev, "device is disabled\n");
		return -ENOMEM;
	}

	if (!request_mem_region(par->aperture.physical,
				par->aperture.size,
				i810_pci_list[entry->driver_data])) {
		printk("i810fb_init: cannot request framebuffer region\n");
		dev_warn(&par->dev->dev, "cannot request framebuffer region\n");
		return -ENODEV;
	}
	par->res_flags |= FRAMEBUFFER_REQ;
@@ -1874,14 +1874,14 @@ static int i810_allocate_pci_resource(struct i810fb_par *par,
	par->aperture.virtual = ioremap_wc(par->aperture.physical,
					   par->aperture.size);
	if (!par->aperture.virtual) {
		printk("i810fb_init: cannot remap framebuffer region\n");
		dev_warn(&par->dev->dev, "cannot remap framebuffer region\n");
		return -ENODEV;
	}

	if (!request_mem_region(par->mmio_start_phys,
				MMIO_SIZE,
				i810_pci_list[entry->driver_data])) {
		printk("i810fb_init: cannot request mmio region\n");
		dev_warn(&par->dev->dev, "cannot request mmio region\n");
		return -ENODEV;
	}
	par->res_flags |= MMIO_REQ;
@@ -1889,7 +1889,7 @@ static int i810_allocate_pci_resource(struct i810fb_par *par,
	par->mmio_start_virtual = ioremap(par->mmio_start_phys,
						  MMIO_SIZE);
	if (!par->mmio_start_virtual) {
		printk("i810fb_init: cannot remap mmio region\n");
		dev_warn(&par->dev->dev, "cannot remap mmio region\n");
		return -ENODEV;
	}

@@ -1921,12 +1921,12 @@ static void i810fb_find_init_mode(struct fb_info *info)
	}

	if (!err)
		printk("i810fb_init_pci: DDC probe successful\n");
		dev_info(&par->dev->dev, "DDC probe successful\n");

	fb_edid_to_monspecs(par->edid, specs);

	if (specs->modedb == NULL)
		printk("i810fb_init_pci: Unable to get Mode Database\n");
		dev_info(&par->dev->dev, "Unable to get Mode Database\n");

	fb_videomode_to_modelist(specs->modedb, specs->modedb_len,
				 &info->modelist);
@@ -2072,7 +2072,7 @@ static int i810fb_init_pci(struct pci_dev *dev,

	if (err < 0) {
    		i810fb_release_resource(info, par);
		printk("i810fb_init: cannot register framebuffer device\n");
		dev_warn(&par->dev->dev, "cannot register framebuffer device\n");
    		return err;
    	}

@@ -2084,10 +2084,10 @@ static int i810fb_init_pci(struct pci_dev *dev,
	vfreq = hfreq/(info->var.yres + info->var.upper_margin +
		       info->var.vsync_len + info->var.lower_margin);

      	printk("I810FB: fb%d         : %s v%d.%d.%d%s\n"
      	       "I810FB: Video RAM   : %dK\n"
	       "I810FB: Monitor     : H: %d-%d KHz V: %d-%d Hz\n"
	       "I810FB: Mode        : %dx%d-%dbpp@%dHz\n",
	dev_info(&par->dev->dev, "fb%d         : %s v%d.%d.%d%s\n"
		"Video RAM   : %dK\n"
		"Monitor     : H: %d-%d KHz V: %d-%d Hz\n"
		"Mode        : %dx%d-%dbpp@%dHz\n",
	       info->node,
	       i810_pci_list[entry->driver_data],
	       VERSION_MAJOR, VERSION_MINOR, VERSION_TEENIE, BRANCH_VERSION,
@@ -2137,7 +2137,7 @@ static void i810fb_remove_pci(struct pci_dev *dev)

	unregister_framebuffer(info);
	i810fb_release_resource(info, par);
	printk("cleanup_module:  unloaded i810 framebuffer device\n");
	dev_info(&par->dev->dev, "unloaded i810 framebuffer device\n");
}

#ifndef MODULE
+6 −6
Original line number Diff line number Diff line
@@ -419,12 +419,12 @@ static int pxafb_adjust_timing(struct pxafb_info *fbi,
	var->yres = max_t(int, var->yres, MIN_YRES);

	if (!(fbi->lccr0 & LCCR0_LCDT)) {
		clamp_val(var->hsync_len, 1, 64);
		clamp_val(var->vsync_len, 1, 64);
		clamp_val(var->left_margin,  1, 255);
		clamp_val(var->right_margin, 1, 255);
		clamp_val(var->upper_margin, 1, 255);
		clamp_val(var->lower_margin, 1, 255);
		var->hsync_len = clamp(var->hsync_len, 1, 64);
		var->vsync_len = clamp(var->vsync_len, 1, 64);
		var->left_margin  = clamp(var->left_margin,  1, 255);
		var->right_margin = clamp(var->right_margin, 1, 255);
		var->upper_margin = clamp(var->upper_margin, 1, 255);
		var->lower_margin = clamp(var->lower_margin, 1, 255);
	}

	/* make sure each line is aligned on word boundary */
+3 −1
Original line number Diff line number Diff line
@@ -680,7 +680,7 @@ static int ssd1307fb_probe(struct i2c_client *client)
	if (!ssd1307fb_defio) {
		dev_err(dev, "Couldn't allocate deferred io.\n");
		ret = -ENOMEM;
		goto fb_alloc_error;
		goto fb_defio_error;
	}

	ssd1307fb_defio->delay = HZ / refreshrate;
@@ -757,6 +757,8 @@ static int ssd1307fb_probe(struct i2c_client *client)
		regulator_disable(par->vbat_reg);
reset_oled_error:
	fb_deferred_io_cleanup(info);
fb_defio_error:
	__free_pages(vmem, get_order(vmem_size));
fb_alloc_error:
	framebuffer_release(info);
	return ret;
Loading