Skip to content

Commit adfbf65

Browse files
committed
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()
2 parents 046206b + 0bdf1ad commit adfbf65

File tree

18 files changed

+202
-192
lines changed

18 files changed

+202
-192
lines changed

drivers/video/fbdev/68328fb.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static u_long get_line_length(int xres_virtual, int bpp)
124124
* First part, xxxfb_check_var, must not write anything
125125
* to hardware, it should only verify and adjust var.
126126
* This means it doesn't alter par but it does use hardware
127-
* data from it to check this var.
127+
* data from it to check this var.
128128
*/
129129

130130
static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
@@ -182,7 +182,7 @@ static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
182182

183183
/*
184184
* Now that we checked it we alter var. The reason being is that the video
185-
* mode passed in might not work but slight changes to it might make it
185+
* mode passed in might not work but slight changes to it might make it
186186
* work. This way we let the user know what is acceptable.
187187
*/
188188
switch (var->bits_per_pixel) {
@@ -257,8 +257,8 @@ static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
257257
}
258258

259259
/* This routine actually sets the video mode. It's in here where we
260-
* the hardware state info->par and fix which can be affected by the
261-
* change in par. For this driver it doesn't do much.
260+
* the hardware state info->par and fix which can be affected by the
261+
* change in par. For this driver it doesn't do much.
262262
*/
263263
static int mc68x328fb_set_par(struct fb_info *info)
264264
{
@@ -295,7 +295,7 @@ static int mc68x328fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
295295
* {hardwarespecific} contains width of RAMDAC
296296
* cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset)
297297
* RAMDAC[X] is programmed to (red, green, blue)
298-
*
298+
*
299299
* Pseudocolor:
300300
* uses offset = 0 && length = RAMDAC register width.
301301
* var->{color}.offset is 0
@@ -384,7 +384,7 @@ static int mc68x328fb_pan_display(struct fb_var_screeninfo *var,
384384
}
385385

386386
/*
387-
* Most drivers don't need their own mmap function
387+
* Most drivers don't need their own mmap function
388388
*/
389389

390390
static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma)

drivers/video/fbdev/arcfb.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static int arcfb_probe(struct platform_device *dev)
523523

524524
info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
525525
if (!info)
526-
goto err;
526+
goto err_fb_alloc;
527527

528528
info->screen_base = (char __iomem *)videomemory;
529529
info->fbops = &arcfb_ops;
@@ -535,7 +535,7 @@ static int arcfb_probe(struct platform_device *dev)
535535

536536
if (!dio_addr || !cio_addr || !c2io_addr) {
537537
printk(KERN_WARNING "no IO addresses supplied\n");
538-
goto err1;
538+
goto err_addr;
539539
}
540540
par->dio_addr = dio_addr;
541541
par->cio_addr = cio_addr;
@@ -551,12 +551,12 @@ static int arcfb_probe(struct platform_device *dev)
551551
printk(KERN_INFO
552552
"arcfb: Failed req IRQ %d\n", par->irq);
553553
retval = -EBUSY;
554-
goto err1;
554+
goto err_addr;
555555
}
556556
}
557557
retval = register_framebuffer(info);
558558
if (retval < 0)
559-
goto err1;
559+
goto err_register_fb;
560560
platform_set_drvdata(dev, info);
561561
fb_info(info, "Arc frame buffer device, using %dK of video memory\n",
562562
videomemorysize >> 10);
@@ -580,9 +580,12 @@ static int arcfb_probe(struct platform_device *dev)
580580
}
581581

582582
return 0;
583-
err1:
583+
584+
err_register_fb:
585+
free_irq(par->irq, info);
586+
err_addr:
584587
framebuffer_release(info);
585-
err:
588+
err_fb_alloc:
586589
vfree(videomemory);
587590
return retval;
588591
}

drivers/video/fbdev/atmel_lcdfb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo)
317317
/**
318318
* atmel_lcdfb_alloc_video_memory - Allocate framebuffer memory
319319
* @sinfo: the frame buffer to allocate memory for
320-
*
320+
*
321321
* This function is called only from the atmel_lcdfb_probe()
322322
* so no locking by fb_info->mm_lock around smem_len setting is needed.
323323
*/

drivers/video/fbdev/cg14.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ static int cg14_probe(struct platform_device *op)
512512
is_8mb = (resource_size(&op->resource[1]) == (8 * 1024 * 1024));
513513

514514
BUILD_BUG_ON(sizeof(par->mmap_map) != sizeof(__cg14_mmap_map));
515-
515+
516516
memcpy(&par->mmap_map, &__cg14_mmap_map, sizeof(par->mmap_map));
517517

518518
for (i = 0; i < CG14_MMAP_ENTRIES; i++) {

drivers/video/fbdev/controlfb.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ struct fb_info_control {
113113
struct fb_info info;
114114
struct fb_par_control par;
115115
u32 pseudo_palette[16];
116-
116+
117117
struct cmap_regs __iomem *cmap_regs;
118118
unsigned long cmap_regs_phys;
119-
119+
120120
struct control_regs __iomem *control_regs;
121121
unsigned long control_regs_phys;
122122
unsigned long control_regs_size;
123-
123+
124124
__u8 __iomem *frame_buffer;
125125
unsigned long frame_buffer_phys;
126126
unsigned long fb_orig_base;
@@ -196,7 +196,7 @@ static void set_control_clock(unsigned char *params)
196196
while (!req.complete)
197197
cuda_poll();
198198
}
199-
#endif
199+
#endif
200200
}
201201

202202
/*
@@ -233,19 +233,19 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro
233233
if (p->par.xoffset != par->xoffset ||
234234
p->par.yoffset != par->yoffset)
235235
set_screen_start(par->xoffset, par->yoffset, p);
236-
236+
237237
return;
238238
}
239-
239+
240240
p->par = *par;
241241
cmode = p->par.cmode;
242242
r = &par->regvals;
243-
243+
244244
/* Turn off display */
245245
out_le32(CNTRL_REG(p,ctrl), 0x400 | par->ctrl);
246-
246+
247247
set_control_clock(r->clock_params);
248-
248+
249249
RADACAL_WRITE(0x20, r->radacal_ctrl);
250250
RADACAL_WRITE(0x21, p->control_use_bank2 ? 0 : 1);
251251
RADACAL_WRITE(0x10, 0);
@@ -254,7 +254,7 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro
254254
rp = &p->control_regs->vswin;
255255
for (i = 0; i < 16; ++i, ++rp)
256256
out_le32(&rp->r, r->regs[i]);
257-
257+
258258
out_le32(CNTRL_REG(p,pitch), par->pitch);
259259
out_le32(CNTRL_REG(p,mode), r->mode);
260260
out_le32(CNTRL_REG(p,vram_attr), p->vram_attr);
@@ -366,7 +366,7 @@ static int read_control_sense(struct fb_info_control *p)
366366
sense |= (in_le32(CNTRL_REG(p,mon_sense)) & 0x180) >> 7;
367367

368368
out_le32(CNTRL_REG(p,mon_sense), 077); /* turn off drivers */
369-
369+
370370
return sense;
371371
}
372372

@@ -558,17 +558,17 @@ static int control_var_to_par(struct fb_var_screeninfo *var,
558558
static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var)
559559
{
560560
struct control_regints *rv;
561-
561+
562562
rv = (struct control_regints *) par->regvals.regs;
563-
563+
564564
memset(var, 0, sizeof(*var));
565565
var->xres = par->xres;
566566
var->yres = par->yres;
567567
var->xres_virtual = par->vxres;
568568
var->yres_virtual = par->vyres;
569569
var->xoffset = par->xoffset;
570570
var->yoffset = par->yoffset;
571-
571+
572572
switch(par->cmode) {
573573
default:
574574
case CMODE_8:
@@ -634,7 +634,7 @@ static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *i
634634

635635
err = control_var_to_par(var, &par, info);
636636
if (err)
637-
return err;
637+
return err;
638638
control_par_to_var(&par, var);
639639

640640
return 0;
@@ -655,7 +655,7 @@ static int controlfb_set_par (struct fb_info *info)
655655
" control_var_to_par: %d.\n", err);
656656
return err;
657657
}
658-
658+
659659
control_set_hardware(p, &par);
660660

661661
info->fix.visual = (p->par.cmode == CMODE_8) ?
@@ -840,7 +840,7 @@ static int __init init_control(struct fb_info_control *p)
840840
int full, sense, vmode, cmode, vyres;
841841
struct fb_var_screeninfo var;
842842
int rc;
843-
843+
844844
printk(KERN_INFO "controlfb: ");
845845

846846
full = p->total_vram == 0x400000;

drivers/video/fbdev/core/modedb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ static const struct fb_videomode modedb[] = {
257257
{ NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,
258258
FB_VMODE_DOUBLE },
259259

260+
/* 1920x1080 @ 60 Hz, 67.3 kHz hsync */
261+
{ NULL, 60, 1920, 1080, 6734, 148, 88, 36, 4, 44, 5, 0,
262+
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
263+
FB_VMODE_NONINTERLACED },
264+
260265
/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
261266
{ NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
262267
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,

drivers/video/fbdev/g364fb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* This driver is based on tgafb.c
88
*
9-
* Copyright (C) 1997 Geert Uytterhoeven
9+
* Copyright (C) 1997 Geert Uytterhoeven
1010
* Copyright (C) 1995 Jay Estabrook
1111
*
1212
* This file is subject to the terms and conditions of the GNU General Public
@@ -28,7 +28,7 @@
2828
#include <asm/io.h>
2929
#include <asm/jazz.h>
3030

31-
/*
31+
/*
3232
* Various defines for the G364
3333
*/
3434
#define G364_MEM_BASE 0xe4400000
@@ -125,7 +125,7 @@ static const struct fb_ops g364fb_ops = {
125125
*
126126
* This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
127127
*/
128-
static int g364fb_pan_display(struct fb_var_screeninfo *var,
128+
static int g364fb_pan_display(struct fb_var_screeninfo *var,
129129
struct fb_info *info)
130130
{
131131
if (var->xoffset ||

drivers/video/fbdev/hgafb.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
22
* linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device
3-
*
3+
*
44
* Created 25 Nov 1999 by Ferenc Bakonyi (fero@drama.obuda.kando.hu)
55
* Based on skeletonfb.c by Geert Uytterhoeven and
66
* mdacon.c by Andrew Apted
77
*
88
* History:
99
*
1010
* - Revision 0.1.8 (23 Oct 2002): Ported to new framebuffer api.
11-
*
12-
* - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
11+
*
12+
* - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
1313
* being detected as Hercules. (Paul G.)
1414
* - Revision 0.1.6 (17 Aug 2000): new style structs
1515
* documentation
1616
* - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
1717
* minor fixes
18-
* - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
18+
* - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
1919
* HGA-only systems
2020
* - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure
2121
* screen is cleared after rmmod
@@ -143,7 +143,7 @@ static bool nologo = 0;
143143

144144
static void write_hga_b(unsigned int val, unsigned char reg)
145145
{
146-
outb_p(reg, HGA_INDEX_PORT);
146+
outb_p(reg, HGA_INDEX_PORT);
147147
outb_p(val, HGA_VALUE_PORT);
148148
}
149149

@@ -155,7 +155,7 @@ static void write_hga_w(unsigned int val, unsigned char reg)
155155

156156
static int test_hga_b(unsigned char val, unsigned char reg)
157157
{
158-
outb_p(reg, HGA_INDEX_PORT);
158+
outb_p(reg, HGA_INDEX_PORT);
159159
outb (val, HGA_VALUE_PORT);
160160
udelay(20); val = (inb_p(HGA_VALUE_PORT) == val);
161161
return val;
@@ -244,7 +244,7 @@ static void hga_show_logo(struct fb_info *info)
244244
void __iomem *dest = hga_vram;
245245
char *logo = linux_logo_bw;
246246
int x, y;
247-
247+
248248
for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup *
249249
for (x = 0; x < 10 ; x++)
250250
writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40));
@@ -255,7 +255,7 @@ static void hga_pan(unsigned int xoffset, unsigned int yoffset)
255255
{
256256
unsigned int base;
257257
unsigned long flags;
258-
258+
259259
base = (yoffset / 8) * 90 + xoffset;
260260
spin_lock_irqsave(&hga_reg_lock, flags);
261261
write_hga_w(base, 0x0c); /* start address */
@@ -310,7 +310,7 @@ static int hga_card_detect(void)
310310
/* Ok, there is definitely a card registering at the correct
311311
* memory location, so now we do an I/O port test.
312312
*/
313-
313+
314314
if (!test_hga_b(0x66, 0x0f)) /* cursor low register */
315315
goto error;
316316

@@ -321,15 +321,15 @@ static int hga_card_detect(void)
321321
* bit of the status register is changing. This test lasts for
322322
* approximately 1/10th of a second.
323323
*/
324-
324+
325325
p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
326326

327327
for (count=0; count < 50000 && p_save == q_save; count++) {
328328
q_save = inb(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
329329
udelay(2);
330330
}
331331

332-
if (p_save == q_save)
332+
if (p_save == q_save)
333333
goto error;
334334

335335
switch (inb_p(HGA_STATUS_PORT) & 0x70) {
@@ -415,7 +415,7 @@ static int hgafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
415415
* @info:pointer to fb_info object containing info for current hga board
416416
*
417417
* This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP
418-
* flag in @var. If input parameters are correct it calls hga_pan() to
418+
* flag in @var. If input parameters are correct it calls hga_pan() to
419419
* program the hardware. @info->var is updated to the new values.
420420
* A zero is returned on success and %-EINVAL for failure.
421421
*/
@@ -442,9 +442,9 @@ static int hgafb_pan_display(struct fb_var_screeninfo *var,
442442
* hgafb_blank - (un)blank the screen
443443
* @blank_mode:blanking method to use
444444
* @info:unused
445-
*
446-
* Blank the screen if blank_mode != 0, else unblank.
447-
* Implements VESA suspend and powerdown modes on hardware that supports
445+
*
446+
* Blank the screen if blank_mode != 0, else unblank.
447+
* Implements VESA suspend and powerdown modes on hardware that supports
448448
* disabling hsync/vsync:
449449
* @blank_mode == 2 means suspend vsync,
450450
* @blank_mode == 3 means suspend hsync,
@@ -539,15 +539,15 @@ static const struct fb_ops hgafb_ops = {
539539
.fb_copyarea = hgafb_copyarea,
540540
.fb_imageblit = hgafb_imageblit,
541541
};
542-
542+
543543
/* ------------------------------------------------------------------------- *
544544
*
545545
* Functions in fb_info
546-
*
546+
*
547547
* ------------------------------------------------------------------------- */
548548

549549
/* ------------------------------------------------------------------------- */
550-
550+
551551
/*
552552
* Initialization
553553
*/

0 commit comments

Comments
 (0)