Skip to content

Commit 0a58282

Browse files
committed
Merge tag 'fbdev-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull fbdev updates from Tomi Valkeinen: - new 6x10 font - various small fixes and cleanups * tag 'fbdev-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (30 commits) fonts: Add 6x10 font videomode: provide dummy inline functions for !CONFIG_OF video/atmel_lcdfb: Introduce regulator support fbdev: sh_mobile_hdmi: Re-init regs before irq re-enable on resume framebuffer: fix screen corruption when copying framebuffer: fix border color arm, fbdev, omap2, LLVMLinux: Remove nested function from omapfb arm, fbdev, omap2, LLVMLinux: Remove nested function from omap2 dss video: fbdev: valkyriefb.c: use container_of to resolve fb_info_valkyrie from fb_info video: fbdev: pxafb.c: use container_of to resolve pxafb_info/layer from fb_info video: fbdev: cyber2000fb.c: use container_of to resolve cfb_info from fb_info video: fbdev: controlfb.c: use container_of to resolve fb_info_control from fb_info video: fbdev: sa1100fb.c: use container_of to resolve sa1100fb_info from fb_info video: fbdev: stifb.c: use container_of to resolve stifb_info from fb_info video: fbdev: sis: sis_main.c: Cleaning up missing null-terminate in conjunction with strncpy video: valkyriefb: Fix unused variable warning in set_valkyrie_clock() video: fbdev: use %*ph specifier to dump small buffers video: mx3fb: always enable BACKLIGHT_LCD_SUPPORT video: fbdev: au1200fb: delete double assignment video: fbdev: sis: delete double assignment ...
2 parents 8a5de18 + 33ac9db commit 0a58282

39 files changed

Lines changed: 3421 additions & 124 deletions

‎Documentation/devicetree/bindings/video/atmel,lcdc.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Required nodes:
2020
- default-mode: a videomode within the display with timing parameters
2121
as specified below.
2222

23+
Optional properties:
24+
- lcd-supply: Regulator for LCD supply voltage.
25+
2326
Example:
2427

2528
fb0: fb@0x00500000 {

‎drivers/video/console/bitblit.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
205205
static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
206206
int bottom_only)
207207
{
208-
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
209208
unsigned int cw = vc->vc_font.width;
210209
unsigned int ch = vc->vc_font.height;
211210
unsigned int rw = info->var.xres - (vc->vc_cols*cw);
@@ -214,7 +213,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
214213
unsigned int bs = info->var.yres - bh;
215214
struct fb_fillrect region;
216215

217-
region.color = attr_bgcol_ec(bgshift, vc, info);
216+
region.color = 0;
218217
region.rop = ROP_COPY;
219218

220219
if (rw && !bottom_only) {

‎drivers/video/console/fbcon_ccw.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,8 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
197197
unsigned int bh = info->var.xres - (vc->vc_rows*ch);
198198
unsigned int bs = vc->vc_rows*ch;
199199
struct fb_fillrect region;
200-
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
201200

202-
region.color = attr_bgcol_ec(bgshift,vc,info);
201+
region.color = 0;
203202
region.rop = ROP_COPY;
204203

205204
if (rw && !bottom_only) {

‎drivers/video/console/fbcon_cw.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
180180
unsigned int bh = info->var.xres - (vc->vc_rows*ch);
181181
unsigned int rs = info->var.yres - rw;
182182
struct fb_fillrect region;
183-
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
184183

185-
region.color = attr_bgcol_ec(bgshift,vc,info);
184+
region.color = 0;
186185
region.rop = ROP_COPY;
187186

188187
if (rw && !bottom_only) {

‎drivers/video/console/fbcon_ud.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
227227
unsigned int rw = info->var.xres - (vc->vc_cols*cw);
228228
unsigned int bh = info->var.yres - (vc->vc_rows*ch);
229229
struct fb_fillrect region;
230-
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
231230

232-
region.color = attr_bgcol_ec(bgshift,vc,info);
231+
region.color = 0;
233232
region.rop = ROP_COPY;
234233

235234
if (rw && !bottom_only) {

‎drivers/video/fbdev/Kconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2356,10 +2356,11 @@ config FB_MSM
23562356
config FB_MX3
23572357
tristate "MX3 Framebuffer support"
23582358
depends on FB && MX3_IPU
2359+
select BACKLIGHT_CLASS_DEVICE
2360+
select BACKLIGHT_LCD_SUPPORT
23592361
select FB_CFB_FILLRECT
23602362
select FB_CFB_COPYAREA
23612363
select FB_CFB_IMAGEBLIT
2362-
select BACKLIGHT_CLASS_DEVICE
23632364
default y
23642365
help
23652366
This is a framebuffer device for the i.MX31 LCD Controller. So

‎drivers/video/fbdev/atmel_lcdfb.c‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <linux/of_device.h>
2525
#include <linux/of_gpio.h>
2626
#include <video/of_display_timing.h>
27+
#include <linux/regulator/consumer.h>
2728
#include <video/videomode.h>
2829

2930
#include <mach/cpu.h>
@@ -60,6 +61,7 @@ struct atmel_lcdfb_info {
6061
struct atmel_lcdfb_pdata pdata;
6162

6263
struct atmel_lcdfb_config *config;
64+
struct regulator *reg_lcd;
6365
};
6466

6567
struct atmel_lcdfb_power_ctrl_gpio {
@@ -302,10 +304,24 @@ static void init_contrast(struct atmel_lcdfb_info *sinfo)
302304

303305
static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int on)
304306
{
307+
int ret;
305308
struct atmel_lcdfb_pdata *pdata = &sinfo->pdata;
306309

307310
if (pdata->atmel_lcdfb_power_control)
308311
pdata->atmel_lcdfb_power_control(pdata, on);
312+
else if (sinfo->reg_lcd) {
313+
if (on) {
314+
ret = regulator_enable(sinfo->reg_lcd);
315+
if (ret)
316+
dev_err(&sinfo->pdev->dev,
317+
"lcd regulator enable failed: %d\n", ret);
318+
} else {
319+
ret = regulator_disable(sinfo->reg_lcd);
320+
if (ret)
321+
dev_err(&sinfo->pdev->dev,
322+
"lcd regulator disable failed: %d\n", ret);
323+
}
324+
}
309325
}
310326

311327
static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
@@ -1195,6 +1211,10 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
11951211
if (!sinfo->config)
11961212
goto free_info;
11971213

1214+
sinfo->reg_lcd = devm_regulator_get(&pdev->dev, "lcd");
1215+
if (IS_ERR(sinfo->reg_lcd))
1216+
sinfo->reg_lcd = NULL;
1217+
11981218
info->flags = ATMEL_LCDFB_FBINFO_DEFAULT;
11991219
info->pseudo_palette = sinfo->pseudo_palette;
12001220
info->fbops = &atmel_lcdfb_ops;

‎drivers/video/fbdev/aty/aty128fb.c‎

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,61 @@ struct aty128_meminfo {
324324
};
325325

326326
/* various memory configurations */
327-
static const struct aty128_meminfo sdr_128 =
328-
{ 4, 4, 3, 3, 1, 3, 1, 16, 30, 16, "128-bit SDR SGRAM (1:1)" };
329-
static const struct aty128_meminfo sdr_64 =
330-
{ 4, 8, 3, 3, 1, 3, 1, 17, 46, 17, "64-bit SDR SGRAM (1:1)" };
331-
static const struct aty128_meminfo sdr_sgram =
332-
{ 4, 4, 1, 2, 1, 2, 1, 16, 24, 16, "64-bit SDR SGRAM (2:1)" };
333-
static const struct aty128_meminfo ddr_sgram =
334-
{ 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" };
327+
static const struct aty128_meminfo sdr_128 = {
328+
.ML = 4,
329+
.MB = 4,
330+
.Trcd = 3,
331+
.Trp = 3,
332+
.Twr = 1,
333+
.CL = 3,
334+
.Tr2w = 1,
335+
.LoopLatency = 16,
336+
.DspOn = 30,
337+
.Rloop = 16,
338+
.name = "128-bit SDR SGRAM (1:1)",
339+
};
340+
341+
static const struct aty128_meminfo sdr_64 = {
342+
.ML = 4,
343+
.MB = 8,
344+
.Trcd = 3,
345+
.Trp = 3,
346+
.Twr = 1,
347+
.CL = 3,
348+
.Tr2w = 1,
349+
.LoopLatency = 17,
350+
.DspOn = 46,
351+
.Rloop = 17,
352+
.name = "64-bit SDR SGRAM (1:1)",
353+
};
354+
355+
static const struct aty128_meminfo sdr_sgram = {
356+
.ML = 4,
357+
.MB = 4,
358+
.Trcd = 1,
359+
.Trp = 2,
360+
.Twr = 1,
361+
.CL = 2,
362+
.Tr2w = 1,
363+
.LoopLatency = 16,
364+
.DspOn = 24,
365+
.Rloop = 16,
366+
.name = "64-bit SDR SGRAM (2:1)",
367+
};
368+
369+
static const struct aty128_meminfo ddr_sgram = {
370+
.ML = 4,
371+
.MB = 4,
372+
.Trcd = 3,
373+
.Trp = 3,
374+
.Twr = 2,
375+
.CL = 3,
376+
.Tr2w = 1,
377+
.LoopLatency = 16,
378+
.DspOn = 31,
379+
.Rloop = 16,
380+
.name = "64-bit DDR SGRAM",
381+
};
335382

336383
static struct fb_fix_screeninfo aty128fb_fix = {
337384
.id = "ATY Rage128",

‎drivers/video/fbdev/au1200fb.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,6 @@ static void set_global(u_int cmd, struct au1200_lcd_global_regs_t *pdata)
12541254
pdata->brightness = 30;
12551255
}
12561256
divider = (lcd->pwmdiv & 0x3FFFF) + 1;
1257-
hi1 = (lcd->pwmhi >> 16) + 1;
12581257
hi1 = (((pdata->brightness & 0xFF)+1) * divider >> 8);
12591258
lcd->pwmhi &= 0xFFFF;
12601259
lcd->pwmhi |= (hi1 << 16);

‎drivers/video/fbdev/controlfb.c‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *i
218218
*/
219219
static int controlfb_set_par (struct fb_info *info)
220220
{
221-
struct fb_info_control *p = (struct fb_info_control *) info;
221+
struct fb_info_control *p =
222+
container_of(info, struct fb_info_control, info);
222223
struct fb_par_control par;
223224
int err;
224225

@@ -258,7 +259,8 @@ static int controlfb_pan_display(struct fb_var_screeninfo *var,
258259
struct fb_info *info)
259260
{
260261
unsigned int xoffset, hstep;
261-
struct fb_info_control *p = (struct fb_info_control *)info;
262+
struct fb_info_control *p =
263+
container_of(info, struct fb_info_control, info);
262264
struct fb_par_control *par = &p->par;
263265

264266
/*
@@ -309,7 +311,8 @@ static int controlfb_mmap(struct fb_info *info,
309311

310312
static int controlfb_blank(int blank_mode, struct fb_info *info)
311313
{
312-
struct fb_info_control *p = (struct fb_info_control *) info;
314+
struct fb_info_control *p =
315+
container_of(info, struct fb_info_control, info);
313316
unsigned ctrl;
314317

315318
ctrl = ld_le32(CNTRL_REG(p,ctrl));
@@ -342,7 +345,8 @@ static int controlfb_blank(int blank_mode, struct fb_info *info)
342345
static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
343346
u_int transp, struct fb_info *info)
344347
{
345-
struct fb_info_control *p = (struct fb_info_control *) info;
348+
struct fb_info_control *p =
349+
container_of(info, struct fb_info_control, info);
346350
__u8 r, g, b;
347351

348352
if (regno > 255)
@@ -833,7 +837,8 @@ static int control_var_to_par(struct fb_var_screeninfo *var,
833837
unsigned hperiod, hssync, hsblank, hesync, heblank, piped, heq, hlfln,
834838
hserr, vperiod, vssync, vesync, veblank, vsblank, vswin, vewin;
835839
unsigned long pixclock;
836-
struct fb_info_control *p = (struct fb_info_control *) fb_info;
840+
struct fb_info_control *p =
841+
container_of(fb_info, struct fb_info_control, info);
837842
struct control_regvals *r = &par->regvals;
838843

839844
switch (var->bits_per_pixel) {

0 commit comments

Comments
 (0)