mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-10 08:33:14 +00:00
fbdev fixes and updates for kernel 6.4-rc2:
- use after free fix in imsttfb (Zheng Wang) - fix error handling in arcfb (Zongjie Li) - lots of whitespace cleanups (Thomas Zimmermann) - add 1920x1080 modedb entry (me) -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZGAdYgAKCRD3ErUQojoP XxxaAQDEHzqPYzNomG3dttowRZs5qTLsFb+axPMNghlk/3bR2AEA/PX+SNQ3zRn7 ejlYc32i+zaDoIzX9Igtf9mx1E/kqQY= =12QA -----END PGP SIGNATURE----- Merge tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: - use after free fix in imsttfb (Zheng Wang) - fix error handling in arcfb (Zongjie Li) - lots of whitespace cleanups (Thomas Zimmermann) - add 1920x1080 modedb entry (me) * tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: stifb: Fix info entry in sti_struct on error path fbdev: modedb: Add 1920x1080 at 60 Hz video mode fbdev: imsttfb: Fix use after free bug in imsttfb_probe fbdev: vfb: Remove trailing whitespaces fbdev: valkyriefb: Remove trailing whitespaces fbdev: stifb: Remove trailing whitespaces fbdev: sa1100fb: Remove trailing whitespaces fbdev: platinumfb: Remove trailing whitespaces fbdev: p9100: Remove trailing whitespaces fbdev: maxinefb: Remove trailing whitespaces fbdev: macfb: Remove trailing whitespaces fbdev: hpfb: Remove trailing whitespaces fbdev: hgafb: Remove trailing whitespaces fbdev: g364fb: Remove trailing whitespaces fbdev: controlfb: Remove trailing whitespaces fbdev: cg14: Remove trailing whitespaces fbdev: atmel_lcdfb: Remove trailing whitespaces fbdev: 68328fb: Remove trailing whitespaces fbdev: arcfb: Fix error handling in arcfb_probe()
This commit is contained in:
commit
adfbf653a3
18 changed files with 202 additions and 192 deletions
|
@ -523,7 +523,7 @@ static int arcfb_probe(struct platform_device *dev)
|
||||||
|
|
||||||
info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
|
info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
|
||||||
if (!info)
|
if (!info)
|
||||||
goto err;
|
goto err_fb_alloc;
|
||||||
|
|
||||||
info->screen_base = (char __iomem *)videomemory;
|
info->screen_base = (char __iomem *)videomemory;
|
||||||
info->fbops = &arcfb_ops;
|
info->fbops = &arcfb_ops;
|
||||||
|
@ -535,7 +535,7 @@ static int arcfb_probe(struct platform_device *dev)
|
||||||
|
|
||||||
if (!dio_addr || !cio_addr || !c2io_addr) {
|
if (!dio_addr || !cio_addr || !c2io_addr) {
|
||||||
printk(KERN_WARNING "no IO addresses supplied\n");
|
printk(KERN_WARNING "no IO addresses supplied\n");
|
||||||
goto err1;
|
goto err_addr;
|
||||||
}
|
}
|
||||||
par->dio_addr = dio_addr;
|
par->dio_addr = dio_addr;
|
||||||
par->cio_addr = cio_addr;
|
par->cio_addr = cio_addr;
|
||||||
|
@ -551,12 +551,12 @@ static int arcfb_probe(struct platform_device *dev)
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
"arcfb: Failed req IRQ %d\n", par->irq);
|
"arcfb: Failed req IRQ %d\n", par->irq);
|
||||||
retval = -EBUSY;
|
retval = -EBUSY;
|
||||||
goto err1;
|
goto err_addr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
retval = register_framebuffer(info);
|
retval = register_framebuffer(info);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
goto err1;
|
goto err_register_fb;
|
||||||
platform_set_drvdata(dev, info);
|
platform_set_drvdata(dev, info);
|
||||||
fb_info(info, "Arc frame buffer device, using %dK of video memory\n",
|
fb_info(info, "Arc frame buffer device, using %dK of video memory\n",
|
||||||
videomemorysize >> 10);
|
videomemorysize >> 10);
|
||||||
|
@ -580,9 +580,12 @@ static int arcfb_probe(struct platform_device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err1:
|
|
||||||
|
err_register_fb:
|
||||||
|
free_irq(par->irq, info);
|
||||||
|
err_addr:
|
||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
err:
|
err_fb_alloc:
|
||||||
vfree(videomemory);
|
vfree(videomemory);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,6 +257,11 @@ static const struct fb_videomode modedb[] = {
|
||||||
{ NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,
|
{ NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,
|
||||||
FB_VMODE_DOUBLE },
|
FB_VMODE_DOUBLE },
|
||||||
|
|
||||||
|
/* 1920x1080 @ 60 Hz, 67.3 kHz hsync */
|
||||||
|
{ NULL, 60, 1920, 1080, 6734, 148, 88, 36, 4, 44, 5, 0,
|
||||||
|
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||||
|
FB_VMODE_NONINTERLACED },
|
||||||
|
|
||||||
/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
|
/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
|
||||||
{ NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
|
{ NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
|
||||||
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||||
|
|
|
@ -1347,7 +1347,7 @@ static const struct fb_ops imsttfb_ops = {
|
||||||
.fb_ioctl = imsttfb_ioctl,
|
.fb_ioctl = imsttfb_ioctl,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void init_imstt(struct fb_info *info)
|
static int init_imstt(struct fb_info *info)
|
||||||
{
|
{
|
||||||
struct imstt_par *par = info->par;
|
struct imstt_par *par = info->par;
|
||||||
__u32 i, tmp, *ip, *end;
|
__u32 i, tmp, *ip, *end;
|
||||||
|
@ -1420,7 +1420,7 @@ static void init_imstt(struct fb_info *info)
|
||||||
|| !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) {
|
|| !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) {
|
||||||
printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel);
|
printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel);
|
||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
return;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(info->fix.id, "IMS TT (%s)", par->ramdac == IBM ? "IBM" : "TVP");
|
sprintf(info->fix.id, "IMS TT (%s)", par->ramdac == IBM ? "IBM" : "TVP");
|
||||||
|
@ -1456,12 +1456,13 @@ static void init_imstt(struct fb_info *info)
|
||||||
|
|
||||||
if (register_framebuffer(info) < 0) {
|
if (register_framebuffer(info) < 0) {
|
||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
return;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = (read_reg_le32(par->dc_regs, SSTATUS) & 0x0f00) >> 8;
|
tmp = (read_reg_le32(par->dc_regs, SSTATUS) & 0x0f00) >> 8;
|
||||||
fb_info(info, "%s frame buffer; %uMB vram; chip version %u\n",
|
fb_info(info, "%s frame buffer; %uMB vram; chip version %u\n",
|
||||||
info->fix.id, info->fix.smem_len >> 20, tmp);
|
info->fix.id, info->fix.smem_len >> 20, tmp);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
|
@ -1529,10 +1530,10 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
if (!par->cmap_regs)
|
if (!par->cmap_regs)
|
||||||
goto error;
|
goto error;
|
||||||
info->pseudo_palette = par->palette;
|
info->pseudo_palette = par->palette;
|
||||||
init_imstt(info);
|
ret = init_imstt(info);
|
||||||
|
if (!ret)
|
||||||
pci_set_drvdata(pdev, info);
|
pci_set_drvdata(pdev, info);
|
||||||
return 0;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (par->dc_regs)
|
if (par->dc_regs)
|
||||||
|
|
|
@ -1413,6 +1413,7 @@ out_err1:
|
||||||
iounmap(info->screen_base);
|
iounmap(info->screen_base);
|
||||||
out_err0:
|
out_err0:
|
||||||
kfree(fb);
|
kfree(fb);
|
||||||
|
sti->info = NULL;
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue