Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull fbdev updates from Helge Deller:
"Many small but important fixes for special cases in the fbdev, fbcon
and vgacon code which were found with Syzkaller, Svace and other tools
by various people and teams (e.g. Linux Verification Center).

Some smaller code cleanups in the nvidiafb, arkfb, atyfb and viafb
drivers and two spelling fixes"

* tag 'fbdev-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var
fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var
fbdev: sstfb.rst: Fix spelling mistake
fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
fbcon: Make sure modelist not set on unregistered console
vgacon: Add check for vc_origin address range in vgacon_scroll()
fbdev: arkfb: Cast ics5342_init() allocation type
fbdev: nvidiafb: Correct const string length in nvidiafb_setup()
fbdev: atyfb: Remove unused PCI vendor ID
fbdev: carminefb: Fix spelling mistake of CARMINE_TOTAL_DIPLAY_MEM
fbdev: via: use new GPIO line value setter callbacks

+37 -28
+1 -1
Documentation/fb/sstfb.rst
··· 192 192 - Get rid of the previous paragraph. 193 193 - Buy more coffee. 194 194 - test/port to other arch. 195 - - try to add panning using tweeks with front and back buffer . 195 + - try to add panning using tweaks with front and back buffer. 196 196 - try to implement accel on voodoo2, this board can actually do a 197 197 lot in 2D even if it was sold as a 3D only board ... 198 198
+1 -1
drivers/video/console/vgacon.c
··· 1168 1168 c->vc_screenbuf_size - delta); 1169 1169 c->vc_origin = vga_vram_end - c->vc_screenbuf_size; 1170 1170 vga_rolled_over = 0; 1171 - } else 1171 + } else if (oldo - delta >= (unsigned long)c->vc_screenbuf) 1172 1172 c->vc_origin -= delta; 1173 1173 c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; 1174 1174 scr_memsetw((u16 *) (c->vc_origin), c->vc_video_erase_char,
+3 -2
drivers/video/fbdev/arkfb.c
··· 431 431 432 432 static struct dac_info * ics5342_init(dac_read_regs_t drr, dac_write_regs_t dwr, void *data) 433 433 { 434 - struct dac_info *info = kzalloc(sizeof(struct ics5342_info), GFP_KERNEL); 434 + struct ics5342_info *ics_info = kzalloc(sizeof(struct ics5342_info), GFP_KERNEL); 435 + struct dac_info *info = &ics_info->dac; 435 436 436 - if (! info) 437 + if (!ics_info) 437 438 return NULL; 438 439 439 440 info->dacops = &ics5342_ops;
+4 -4
drivers/video/fbdev/carminefb.c
··· 649 649 * is required for that largest resolution to avoid remaps at run 650 650 * time 651 651 */ 652 - if (carminefb_fix.smem_len > CARMINE_TOTAL_DIPLAY_MEM) 653 - carminefb_fix.smem_len = CARMINE_TOTAL_DIPLAY_MEM; 652 + if (carminefb_fix.smem_len > CARMINE_TOTAL_DISPLAY_MEM) 653 + carminefb_fix.smem_len = CARMINE_TOTAL_DISPLAY_MEM; 654 654 655 - else if (carminefb_fix.smem_len < CARMINE_TOTAL_DIPLAY_MEM) { 655 + else if (carminefb_fix.smem_len < CARMINE_TOTAL_DISPLAY_MEM) { 656 656 printk(KERN_ERR "carminefb: Memory bar is only %d bytes, %d " 657 657 "are required.", carminefb_fix.smem_len, 658 - CARMINE_TOTAL_DIPLAY_MEM); 658 + CARMINE_TOTAL_DISPLAY_MEM); 659 659 goto err_unmap_vregs; 660 660 } 661 661
+1 -1
drivers/video/fbdev/carminefb.h
··· 7 7 8 8 #define MAX_DISPLAY 2 9 9 #define CARMINE_DISPLAY_MEM (800 * 600 * 4) 10 - #define CARMINE_TOTAL_DIPLAY_MEM (CARMINE_DISPLAY_MEM * MAX_DISPLAY) 10 + #define CARMINE_TOTAL_DISPLAY_MEM (CARMINE_DISPLAY_MEM * MAX_DISPLAY) 11 11 12 12 #define CARMINE_USE_DISPLAY0 (1 << 0) 13 13 #define CARMINE_USE_DISPLAY1 (1 << 1)
+6 -1
drivers/video/fbdev/core/fbcon.c
··· 117 117 118 118 static struct fb_info *fbcon_info_from_console(int console) 119 119 { 120 + signed char fb; 120 121 WARN_CONSOLE_UNLOCKED(); 121 122 122 - return fbcon_registered_fb[con2fb_map[console]]; 123 + fb = con2fb_map[console]; 124 + if (fb < 0 || fb >= ARRAY_SIZE(fbcon_registered_fb)) 125 + return NULL; 126 + 127 + return fbcon_registered_fb[fb]; 123 128 } 124 129 125 130 static int logo_lines;
+1 -1
drivers/video/fbdev/core/fbcvt.c
··· 312 312 cvt.f_refresh = cvt.refresh; 313 313 cvt.interlace = 1; 314 314 315 - if (!cvt.xres || !cvt.yres || !cvt.refresh) { 315 + if (!cvt.xres || !cvt.yres || !cvt.refresh || cvt.f_refresh > INT_MAX) { 316 316 printk(KERN_INFO "fbcvt: Invalid input parameters\n"); 317 317 return 1; 318 318 }
+14 -8
drivers/video/fbdev/core/fbmem.c
··· 328 328 !list_empty(&info->modelist)) 329 329 ret = fb_add_videomode(&mode, &info->modelist); 330 330 331 - if (ret) 331 + if (ret) { 332 + info->var = old_var; 332 333 return ret; 334 + } 333 335 334 336 event.info = info; 335 337 event.data = &mode; ··· 390 388 391 389 static int do_register_framebuffer(struct fb_info *fb_info) 392 390 { 393 - int i; 391 + int i, err = 0; 394 392 struct fb_videomode mode; 395 393 396 394 if (fb_check_foreignness(fb_info)) ··· 399 397 if (num_registered_fb == FB_MAX) 400 398 return -ENXIO; 401 399 402 - num_registered_fb++; 403 400 for (i = 0 ; i < FB_MAX; i++) 404 401 if (!registered_fb[i]) 405 402 break; 403 + 404 + if (!fb_info->modelist.prev || !fb_info->modelist.next) 405 + INIT_LIST_HEAD(&fb_info->modelist); 406 + 407 + fb_var_to_videomode(&mode, &fb_info->var); 408 + err = fb_add_videomode(&mode, &fb_info->modelist); 409 + if (err < 0) 410 + return err; 411 + 406 412 fb_info->node = i; 407 413 refcount_set(&fb_info->count, 1); 408 414 mutex_init(&fb_info->lock); ··· 436 426 if (bitmap_empty(fb_info->pixmap.blit_y, FB_MAX_BLIT_HEIGHT)) 437 427 bitmap_fill(fb_info->pixmap.blit_y, FB_MAX_BLIT_HEIGHT); 438 428 439 - if (!fb_info->modelist.prev || !fb_info->modelist.next) 440 - INIT_LIST_HEAD(&fb_info->modelist); 441 - 442 429 if (fb_info->skip_vt_switch) 443 430 pm_vt_switch_required(fb_info->device, false); 444 431 else 445 432 pm_vt_switch_required(fb_info->device, true); 446 433 447 - fb_var_to_videomode(&mode, &fb_info->var); 448 - fb_add_videomode(&mode, &fb_info->modelist); 434 + num_registered_fb++; 449 435 registered_fb[i] = fb_info; 450 436 451 437 #ifdef CONFIG_GUMSTIX_AM200EPD
+1 -1
drivers/video/fbdev/nvidia/nvidia.c
··· 1484 1484 flatpanel = 1; 1485 1485 } else if (!strncmp(this_opt, "hwcur", 5)) { 1486 1486 hwcur = 1; 1487 - } else if (!strncmp(this_opt, "noaccel", 6)) { 1487 + } else if (!strncmp(this_opt, "noaccel", 7)) { 1488 1488 noaccel = 1; 1489 1489 } else if (!strncmp(this_opt, "noscale", 7)) { 1490 1490 noscale = 1;
+5 -5
drivers/video/fbdev/via/via-gpio.c
··· 81 81 /* 82 82 * GPIO access functions 83 83 */ 84 - static void via_gpio_set(struct gpio_chip *chip, unsigned int nr, 85 - int value) 84 + static int via_gpio_set(struct gpio_chip *chip, unsigned int nr, int value) 86 85 { 87 86 struct viafb_gpio_cfg *cfg = gpiochip_get_data(chip); 88 87 u8 reg; ··· 98 99 reg &= ~(0x10 << gpio->vg_mask_shift); 99 100 via_write_reg(VIASR, gpio->vg_port_index, reg); 100 101 spin_unlock_irqrestore(&cfg->vdev->reg_lock, flags); 102 + 103 + return 0; 101 104 } 102 105 103 106 static int via_gpio_dir_out(struct gpio_chip *chip, unsigned int nr, 104 107 int value) 105 108 { 106 - via_gpio_set(chip, nr, value); 107 - return 0; 109 + return via_gpio_set(chip, nr, value); 108 110 } 109 111 110 112 /* ··· 146 146 .label = "VIAFB onboard GPIO", 147 147 .owner = THIS_MODULE, 148 148 .direction_output = via_gpio_dir_out, 149 - .set = via_gpio_set, 149 + .set_rv = via_gpio_set, 150 150 .direction_input = via_gpio_dir_input, 151 151 .get = via_gpio_get, 152 152 .base = -1,
-3
include/video/mach64.h
··· 934 934 #define MEM_BNDRY_EN 0x00040000 935 935 936 936 #define ONE_MB 0x100000 937 - /* ATI PCI constants */ 938 - #define PCI_ATI_VENDOR_ID 0x1002 939 - 940 937 941 938 /* CNFG_CHIP_ID register constants */ 942 939 #define CFG_CHIP_TYPE 0x0000FFFF