mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
Merge tag 'fbdev-for-6.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev fixes from Helge Deller: - atyfb: Avoid hard lock up when PLL not initialized (Daniel Palmer) - pvr2fb: Fix build error when CONFIG_PVR2_DMA enabled (Florian Fuchs) - bitblit: Fix out-of-bounds read in bit_putcs* (Junjie Cao) - valkyriefb: Fix reference count leak (Miaoqian Lin) - fbcon: Fix slab-use-after-free in fb_mode_is_equal (Quanmin Yan) - fb.h: Fix typo in "vertical" (Piyush Choudhary) * tag 'fbdev-for-6.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: atyfb: Check if pll_ops->init_pll failed fbcon: Set fb_display[i]->mode to NULL when the mode is released fbdev: bitblit: bound-check glyph index in bit_putcs* fbdev: pvr2fb: Fix leftover reference to ONCHIP_NR_DMA_CHANNELS fbdev: valkyriefb: Fix reference count leak in valkyriefb_init video: fb: Fix typo in comment in fb.h
This commit is contained in:
@@ -2614,8 +2614,12 @@ static int aty_init(struct fb_info *info)
|
||||
pr_cont("\n");
|
||||
}
|
||||
#endif
|
||||
if (par->pll_ops->init_pll)
|
||||
par->pll_ops->init_pll(info, &par->pll);
|
||||
if (par->pll_ops->init_pll) {
|
||||
ret = par->pll_ops->init_pll(info, &par->pll);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (par->pll_ops->resume_pll)
|
||||
par->pll_ops->resume_pll(info, &par->pll);
|
||||
|
||||
|
||||
@@ -79,12 +79,16 @@ static inline void bit_putcs_aligned(struct vc_data *vc, struct fb_info *info,
|
||||
struct fb_image *image, u8 *buf, u8 *dst)
|
||||
{
|
||||
u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
|
||||
unsigned int charcnt = vc->vc_font.charcount;
|
||||
u32 idx = vc->vc_font.width >> 3;
|
||||
u8 *src;
|
||||
|
||||
while (cnt--) {
|
||||
src = vc->vc_font.data + (scr_readw(s++)&
|
||||
charmask)*cellsize;
|
||||
u16 ch = scr_readw(s++) & charmask;
|
||||
|
||||
if (ch >= charcnt)
|
||||
ch = 0;
|
||||
src = vc->vc_font.data + (unsigned int)ch * cellsize;
|
||||
|
||||
if (attr) {
|
||||
update_attr(buf, src, attr, vc);
|
||||
@@ -112,14 +116,18 @@ static inline void bit_putcs_unaligned(struct vc_data *vc,
|
||||
u8 *dst)
|
||||
{
|
||||
u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
|
||||
unsigned int charcnt = vc->vc_font.charcount;
|
||||
u32 shift_low = 0, mod = vc->vc_font.width % 8;
|
||||
u32 shift_high = 8;
|
||||
u32 idx = vc->vc_font.width >> 3;
|
||||
u8 *src;
|
||||
|
||||
while (cnt--) {
|
||||
src = vc->vc_font.data + (scr_readw(s++)&
|
||||
charmask)*cellsize;
|
||||
u16 ch = scr_readw(s++) & charmask;
|
||||
|
||||
if (ch >= charcnt)
|
||||
ch = 0;
|
||||
src = vc->vc_font.data + (unsigned int)ch * cellsize;
|
||||
|
||||
if (attr) {
|
||||
update_attr(buf, src, attr, vc);
|
||||
|
||||
@@ -2810,6 +2810,25 @@ int fbcon_mode_deleted(struct fb_info *info,
|
||||
return found;
|
||||
}
|
||||
|
||||
static void fbcon_delete_mode(struct fb_videomode *m)
|
||||
{
|
||||
struct fbcon_display *p;
|
||||
|
||||
for (int i = first_fb_vc; i <= last_fb_vc; i++) {
|
||||
p = &fb_display[i];
|
||||
if (p->mode == m)
|
||||
p->mode = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void fbcon_delete_modelist(struct list_head *head)
|
||||
{
|
||||
struct fb_modelist *modelist;
|
||||
|
||||
list_for_each_entry(modelist, head, list)
|
||||
fbcon_delete_mode(&modelist->mode);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VT_HW_CONSOLE_BINDING
|
||||
static void fbcon_unbind(void)
|
||||
{
|
||||
|
||||
@@ -544,6 +544,7 @@ static void do_unregister_framebuffer(struct fb_info *fb_info)
|
||||
fb_info->pixmap.addr = NULL;
|
||||
}
|
||||
|
||||
fbcon_delete_modelist(&fb_info->modelist);
|
||||
fb_destroy_modelist(&fb_info->modelist);
|
||||
registered_fb[fb_info->node] = NULL;
|
||||
num_registered_fb--;
|
||||
|
||||
@@ -192,7 +192,7 @@ static unsigned long pvr2fb_map;
|
||||
|
||||
#ifdef CONFIG_PVR2_DMA
|
||||
static unsigned int shdma = PVR2_CASCADE_CHAN;
|
||||
static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS;
|
||||
static unsigned int pvr2dma = CONFIG_NR_ONCHIP_DMA_CHANNELS;
|
||||
#endif
|
||||
|
||||
static struct fb_videomode pvr2_modedb[] = {
|
||||
|
||||
@@ -329,11 +329,13 @@ static int __init valkyriefb_init(void)
|
||||
|
||||
if (of_address_to_resource(dp, 0, &r)) {
|
||||
printk(KERN_ERR "can't find address for valkyrie\n");
|
||||
of_node_put(dp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
frame_buffer_phys = r.start;
|
||||
cmap_regs_phys = r.start + 0x304000;
|
||||
of_node_put(dp);
|
||||
}
|
||||
#endif /* ppc (!CONFIG_MAC) */
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ void fbcon_suspended(struct fb_info *info);
|
||||
void fbcon_resumed(struct fb_info *info);
|
||||
int fbcon_mode_deleted(struct fb_info *info,
|
||||
struct fb_videomode *mode);
|
||||
void fbcon_delete_modelist(struct list_head *head);
|
||||
void fbcon_new_modelist(struct fb_info *info);
|
||||
void fbcon_get_requirement(struct fb_info *info,
|
||||
struct fb_blit_caps *caps);
|
||||
@@ -38,6 +39,7 @@ static inline void fbcon_suspended(struct fb_info *info) {}
|
||||
static inline void fbcon_resumed(struct fb_info *info) {}
|
||||
static inline int fbcon_mode_deleted(struct fb_info *info,
|
||||
struct fb_videomode *mode) { return 0; }
|
||||
static inline void fbcon_delete_modelist(struct list_head *head) {}
|
||||
static inline void fbcon_new_modelist(struct fb_info *info) {}
|
||||
static inline void fbcon_get_requirement(struct fb_info *info,
|
||||
struct fb_blit_caps *caps) {}
|
||||
|
||||
@@ -319,7 +319,7 @@ enum {
|
||||
#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */
|
||||
#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */
|
||||
#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */
|
||||
#define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */
|
||||
#define FB_VBLANK_HAVE_VSYNC 0x100 /* vertical syncs can be detected */
|
||||
|
||||
struct fb_vblank {
|
||||
__u32 flags; /* FB_VBLANK flags */
|
||||
|
||||
Reference in New Issue
Block a user