diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 21:03:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 21:03:02 -0400 |
commit | 0a582821d4f8edf41d9b56ae057ee2002fc275f0 (patch) | |
tree | 199f0de91106f143c4ec62b6a8598383b422205b /drivers/video | |
parent | 8a5de18239e418fe7b1f36504834689f754d8ccc (diff) | |
parent | 33ac9dba859b07d40e9ec826057d20c857fdede5 (diff) |
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
...
Diffstat (limited to 'drivers/video')
32 files changed, 299 insertions, 123 deletions
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index 61b182bf32a2..dbfe4eecf12e 100644 --- a/drivers/video/console/bitblit.c +++ b/drivers/video/console/bitblit.c | |||
@@ -205,7 +205,6 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info, | |||
205 | static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, | 205 | static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, |
206 | int bottom_only) | 206 | int bottom_only) |
207 | { | 207 | { |
208 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; | ||
209 | unsigned int cw = vc->vc_font.width; | 208 | unsigned int cw = vc->vc_font.width; |
210 | unsigned int ch = vc->vc_font.height; | 209 | unsigned int ch = vc->vc_font.height; |
211 | unsigned int rw = info->var.xres - (vc->vc_cols*cw); | 210 | 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, | |||
214 | unsigned int bs = info->var.yres - bh; | 213 | unsigned int bs = info->var.yres - bh; |
215 | struct fb_fillrect region; | 214 | struct fb_fillrect region; |
216 | 215 | ||
217 | region.color = attr_bgcol_ec(bgshift, vc, info); | 216 | region.color = 0; |
218 | region.rop = ROP_COPY; | 217 | region.rop = ROP_COPY; |
219 | 218 | ||
220 | if (rw && !bottom_only) { | 219 | if (rw && !bottom_only) { |
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index 41b32ae23dac..5a3cbf6dff4d 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c | |||
@@ -197,9 +197,8 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
197 | unsigned int bh = info->var.xres - (vc->vc_rows*ch); | 197 | unsigned int bh = info->var.xres - (vc->vc_rows*ch); |
198 | unsigned int bs = vc->vc_rows*ch; | 198 | unsigned int bs = vc->vc_rows*ch; |
199 | struct fb_fillrect region; | 199 | struct fb_fillrect region; |
200 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; | ||
201 | 200 | ||
202 | region.color = attr_bgcol_ec(bgshift,vc,info); | 201 | region.color = 0; |
203 | region.rop = ROP_COPY; | 202 | region.rop = ROP_COPY; |
204 | 203 | ||
205 | if (rw && !bottom_only) { | 204 | if (rw && !bottom_only) { |
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c index a93670ef7f89..e7ee44db4e98 100644 --- a/drivers/video/console/fbcon_cw.c +++ b/drivers/video/console/fbcon_cw.c | |||
@@ -180,9 +180,8 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
180 | unsigned int bh = info->var.xres - (vc->vc_rows*ch); | 180 | unsigned int bh = info->var.xres - (vc->vc_rows*ch); |
181 | unsigned int rs = info->var.yres - rw; | 181 | unsigned int rs = info->var.yres - rw; |
182 | struct fb_fillrect region; | 182 | struct fb_fillrect region; |
183 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; | ||
184 | 183 | ||
185 | region.color = attr_bgcol_ec(bgshift,vc,info); | 184 | region.color = 0; |
186 | region.rop = ROP_COPY; | 185 | region.rop = ROP_COPY; |
187 | 186 | ||
188 | if (rw && !bottom_only) { | 187 | if (rw && !bottom_only) { |
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index ff0872c0498b..19e3714abfe8 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c | |||
@@ -227,9 +227,8 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
227 | unsigned int rw = info->var.xres - (vc->vc_cols*cw); | 227 | unsigned int rw = info->var.xres - (vc->vc_cols*cw); |
228 | unsigned int bh = info->var.yres - (vc->vc_rows*ch); | 228 | unsigned int bh = info->var.yres - (vc->vc_rows*ch); |
229 | struct fb_fillrect region; | 229 | struct fb_fillrect region; |
230 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; | ||
231 | 230 | ||
232 | region.color = attr_bgcol_ec(bgshift,vc,info); | 231 | region.color = 0; |
233 | region.rop = ROP_COPY; | 232 | region.rop = ROP_COPY; |
234 | 233 | ||
235 | if (rw && !bottom_only) { | 234 | if (rw && !bottom_only) { |
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index ccbe2ae22ac5..c7bf606a8706 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig | |||
@@ -2356,10 +2356,11 @@ config FB_MSM | |||
2356 | config FB_MX3 | 2356 | config FB_MX3 |
2357 | tristate "MX3 Framebuffer support" | 2357 | tristate "MX3 Framebuffer support" |
2358 | depends on FB && MX3_IPU | 2358 | depends on FB && MX3_IPU |
2359 | select BACKLIGHT_CLASS_DEVICE | ||
2360 | select BACKLIGHT_LCD_SUPPORT | ||
2359 | select FB_CFB_FILLRECT | 2361 | select FB_CFB_FILLRECT |
2360 | select FB_CFB_COPYAREA | 2362 | select FB_CFB_COPYAREA |
2361 | select FB_CFB_IMAGEBLIT | 2363 | select FB_CFB_IMAGEBLIT |
2362 | select BACKLIGHT_CLASS_DEVICE | ||
2363 | default y | 2364 | default y |
2364 | help | 2365 | help |
2365 | This is a framebuffer device for the i.MX31 LCD Controller. So | 2366 | This is a framebuffer device for the i.MX31 LCD Controller. So |
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c index 1d8bdb92939b..3bf403150a2d 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/of_device.h> | 24 | #include <linux/of_device.h> |
25 | #include <linux/of_gpio.h> | 25 | #include <linux/of_gpio.h> |
26 | #include <video/of_display_timing.h> | 26 | #include <video/of_display_timing.h> |
27 | #include <linux/regulator/consumer.h> | ||
27 | #include <video/videomode.h> | 28 | #include <video/videomode.h> |
28 | 29 | ||
29 | #include <mach/cpu.h> | 30 | #include <mach/cpu.h> |
@@ -60,6 +61,7 @@ struct atmel_lcdfb_info { | |||
60 | struct atmel_lcdfb_pdata pdata; | 61 | struct atmel_lcdfb_pdata pdata; |
61 | 62 | ||
62 | struct atmel_lcdfb_config *config; | 63 | struct atmel_lcdfb_config *config; |
64 | struct regulator *reg_lcd; | ||
63 | }; | 65 | }; |
64 | 66 | ||
65 | struct atmel_lcdfb_power_ctrl_gpio { | 67 | struct atmel_lcdfb_power_ctrl_gpio { |
@@ -302,10 +304,24 @@ static void init_contrast(struct atmel_lcdfb_info *sinfo) | |||
302 | 304 | ||
303 | static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int on) | 305 | static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int on) |
304 | { | 306 | { |
307 | int ret; | ||
305 | struct atmel_lcdfb_pdata *pdata = &sinfo->pdata; | 308 | struct atmel_lcdfb_pdata *pdata = &sinfo->pdata; |
306 | 309 | ||
307 | if (pdata->atmel_lcdfb_power_control) | 310 | if (pdata->atmel_lcdfb_power_control) |
308 | pdata->atmel_lcdfb_power_control(pdata, on); | 311 | 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 | } | ||
309 | } | 325 | } |
310 | 326 | ||
311 | static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { | 327 | static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { |
@@ -1195,6 +1211,10 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
1195 | if (!sinfo->config) | 1211 | if (!sinfo->config) |
1196 | goto free_info; | 1212 | goto free_info; |
1197 | 1213 | ||
1214 | sinfo->reg_lcd = devm_regulator_get(&pdev->dev, "lcd"); | ||
1215 | if (IS_ERR(sinfo->reg_lcd)) | ||
1216 | sinfo->reg_lcd = NULL; | ||
1217 | |||
1198 | info->flags = ATMEL_LCDFB_FBINFO_DEFAULT; | 1218 | info->flags = ATMEL_LCDFB_FBINFO_DEFAULT; |
1199 | info->pseudo_palette = sinfo->pseudo_palette; | 1219 | info->pseudo_palette = sinfo->pseudo_palette; |
1200 | info->fbops = &atmel_lcdfb_ops; | 1220 | info->fbops = &atmel_lcdfb_ops; |
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index ff6070170d01..aedf2fbf9bf6 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c | |||
@@ -324,14 +324,61 @@ struct aty128_meminfo { | |||
324 | }; | 324 | }; |
325 | 325 | ||
326 | /* various memory configurations */ | 326 | /* various memory configurations */ |
327 | static const struct aty128_meminfo sdr_128 = | 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)" }; | 328 | .ML = 4, |
329 | static const struct aty128_meminfo sdr_64 = | 329 | .MB = 4, |
330 | { 4, 8, 3, 3, 1, 3, 1, 17, 46, 17, "64-bit SDR SGRAM (1:1)" }; | 330 | .Trcd = 3, |
331 | static const struct aty128_meminfo sdr_sgram = | 331 | .Trp = 3, |
332 | { 4, 4, 1, 2, 1, 2, 1, 16, 24, 16, "64-bit SDR SGRAM (2:1)" }; | 332 | .Twr = 1, |
333 | static const struct aty128_meminfo ddr_sgram = | 333 | .CL = 3, |
334 | { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" }; | 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 | }; | ||
335 | 382 | ||
336 | static struct fb_fix_screeninfo aty128fb_fix = { | 383 | static struct fb_fix_screeninfo aty128fb_fix = { |
337 | .id = "ATY Rage128", | 384 | .id = "ATY Rage128", |
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 40494dbdf519..18600d4e1b3f 100644 --- a/drivers/video/fbdev/au1200fb.c +++ b/drivers/video/fbdev/au1200fb.c | |||
@@ -1254,7 +1254,6 @@ static void set_global(u_int cmd, struct au1200_lcd_global_regs_t *pdata) | |||
1254 | pdata->brightness = 30; | 1254 | pdata->brightness = 30; |
1255 | } | 1255 | } |
1256 | divider = (lcd->pwmdiv & 0x3FFFF) + 1; | 1256 | divider = (lcd->pwmdiv & 0x3FFFF) + 1; |
1257 | hi1 = (lcd->pwmhi >> 16) + 1; | ||
1258 | hi1 = (((pdata->brightness & 0xFF)+1) * divider >> 8); | 1257 | hi1 = (((pdata->brightness & 0xFF)+1) * divider >> 8); |
1259 | lcd->pwmhi &= 0xFFFF; | 1258 | lcd->pwmhi &= 0xFFFF; |
1260 | lcd->pwmhi |= (hi1 << 16); | 1259 | lcd->pwmhi |= (hi1 << 16); |
diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c index fdadef979238..080fdd2a70f3 100644 --- a/drivers/video/fbdev/controlfb.c +++ b/drivers/video/fbdev/controlfb.c | |||
@@ -218,7 +218,8 @@ static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *i | |||
218 | */ | 218 | */ |
219 | static int controlfb_set_par (struct fb_info *info) | 219 | static int controlfb_set_par (struct fb_info *info) |
220 | { | 220 | { |
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); | ||
222 | struct fb_par_control par; | 223 | struct fb_par_control par; |
223 | int err; | 224 | int err; |
224 | 225 | ||
@@ -258,7 +259,8 @@ static int controlfb_pan_display(struct fb_var_screeninfo *var, | |||
258 | struct fb_info *info) | 259 | struct fb_info *info) |
259 | { | 260 | { |
260 | unsigned int xoffset, hstep; | 261 | 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); | ||
262 | struct fb_par_control *par = &p->par; | 264 | struct fb_par_control *par = &p->par; |
263 | 265 | ||
264 | /* | 266 | /* |
@@ -309,7 +311,8 @@ static int controlfb_mmap(struct fb_info *info, | |||
309 | 311 | ||
310 | static int controlfb_blank(int blank_mode, struct fb_info *info) | 312 | static int controlfb_blank(int blank_mode, struct fb_info *info) |
311 | { | 313 | { |
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); | ||
313 | unsigned ctrl; | 316 | unsigned ctrl; |
314 | 317 | ||
315 | ctrl = ld_le32(CNTRL_REG(p,ctrl)); | 318 | ctrl = ld_le32(CNTRL_REG(p,ctrl)); |
@@ -342,7 +345,8 @@ static int controlfb_blank(int blank_mode, struct fb_info *info) | |||
342 | static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | 345 | static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, |
343 | u_int transp, struct fb_info *info) | 346 | u_int transp, struct fb_info *info) |
344 | { | 347 | { |
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); | ||
346 | __u8 r, g, b; | 350 | __u8 r, g, b; |
347 | 351 | ||
348 | if (regno > 255) | 352 | if (regno > 255) |
@@ -833,7 +837,8 @@ static int control_var_to_par(struct fb_var_screeninfo *var, | |||
833 | unsigned hperiod, hssync, hsblank, hesync, heblank, piped, heq, hlfln, | 837 | unsigned hperiod, hssync, hsblank, hesync, heblank, piped, heq, hlfln, |
834 | hserr, vperiod, vssync, vesync, veblank, vsblank, vswin, vewin; | 838 | hserr, vperiod, vssync, vesync, veblank, vsblank, vswin, vewin; |
835 | unsigned long pixclock; | 839 | 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); | ||
837 | struct control_regvals *r = &par->regvals; | 842 | struct control_regvals *r = &par->regvals; |
838 | 843 | ||
839 | switch (var->bits_per_pixel) { | 844 | switch (var->bits_per_pixel) { |
diff --git a/drivers/video/fbdev/core/cfbcopyarea.c b/drivers/video/fbdev/core/cfbcopyarea.c index bcb57235fcc7..6d4bfeecee35 100644 --- a/drivers/video/fbdev/core/cfbcopyarea.c +++ b/drivers/video/fbdev/core/cfbcopyarea.c | |||
@@ -55,8 +55,8 @@ bitcpy(struct fb_info *p, unsigned long __iomem *dst, unsigned dst_idx, | |||
55 | * If you suspect bug in this function, compare it with this simple | 55 | * If you suspect bug in this function, compare it with this simple |
56 | * memmove implementation. | 56 | * memmove implementation. |
57 | */ | 57 | */ |
58 | fb_memmove((char *)dst + ((dst_idx & (bits - 1))) / 8, | 58 | memmove((char *)dst + ((dst_idx & (bits - 1))) / 8, |
59 | (char *)src + ((src_idx & (bits - 1))) / 8, n / 8); | 59 | (char *)src + ((src_idx & (bits - 1))) / 8, n / 8); |
60 | return; | 60 | return; |
61 | #endif | 61 | #endif |
62 | 62 | ||
@@ -221,8 +221,8 @@ bitcpy_rev(struct fb_info *p, unsigned long __iomem *dst, unsigned dst_idx, | |||
221 | * If you suspect bug in this function, compare it with this simple | 221 | * If you suspect bug in this function, compare it with this simple |
222 | * memmove implementation. | 222 | * memmove implementation. |
223 | */ | 223 | */ |
224 | fb_memmove((char *)dst + ((dst_idx & (bits - 1))) / 8, | 224 | memmove((char *)dst + ((dst_idx & (bits - 1))) / 8, |
225 | (char *)src + ((src_idx & (bits - 1))) / 8, n / 8); | 225 | (char *)src + ((src_idx & (bits - 1))) / 8, n / 8); |
226 | return; | 226 | return; |
227 | #endif | 227 | #endif |
228 | 228 | ||
@@ -324,7 +324,10 @@ bitcpy_rev(struct fb_info *p, unsigned long __iomem *dst, unsigned dst_idx, | |||
324 | d0 = d0 << left | d1 >> right; | 324 | d0 = d0 << left | d1 >> right; |
325 | } | 325 | } |
326 | d0 = fb_rev_pixels_in_long(d0, bswapmask); | 326 | d0 = fb_rev_pixels_in_long(d0, bswapmask); |
327 | FB_WRITEL(comp(d0, FB_READL(dst), first), dst); | 327 | if (!first) |
328 | FB_WRITEL(d0, dst); | ||
329 | else | ||
330 | FB_WRITEL(comp(d0, FB_READL(dst), first), dst); | ||
328 | d0 = d1; | 331 | d0 = d1; |
329 | dst--; | 332 | dst--; |
330 | n -= dst_idx+1; | 333 | n -= dst_idx+1; |
diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c index 53444ac19fe0..60c3f0a16341 100644 --- a/drivers/video/fbdev/core/fbsysfs.c +++ b/drivers/video/fbdev/core/fbsysfs.c | |||
@@ -485,16 +485,8 @@ static ssize_t show_bl_curve(struct device *device, | |||
485 | 485 | ||
486 | mutex_lock(&fb_info->bl_curve_mutex); | 486 | mutex_lock(&fb_info->bl_curve_mutex); |
487 | for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8) | 487 | for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8) |
488 | len += snprintf(&buf[len], PAGE_SIZE, | 488 | len += snprintf(&buf[len], PAGE_SIZE, "%8ph\n", |
489 | "%02x %02x %02x %02x %02x %02x %02x %02x\n", | 489 | fb_info->bl_curve + i); |
490 | fb_info->bl_curve[i + 0], | ||
491 | fb_info->bl_curve[i + 1], | ||
492 | fb_info->bl_curve[i + 2], | ||
493 | fb_info->bl_curve[i + 3], | ||
494 | fb_info->bl_curve[i + 4], | ||
495 | fb_info->bl_curve[i + 5], | ||
496 | fb_info->bl_curve[i + 6], | ||
497 | fb_info->bl_curve[i + 7]); | ||
498 | mutex_unlock(&fb_info->bl_curve_mutex); | 490 | mutex_unlock(&fb_info->bl_curve_mutex); |
499 | 491 | ||
500 | return len; | 492 | return len; |
diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index b0a950f36970..99acf538a8b8 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c | |||
@@ -159,7 +159,7 @@ cyber2000_seqw(unsigned int reg, unsigned int val, struct cfb_info *cfb) | |||
159 | static void | 159 | static void |
160 | cyber2000fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | 160 | cyber2000fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) |
161 | { | 161 | { |
162 | struct cfb_info *cfb = (struct cfb_info *)info; | 162 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
163 | unsigned long dst, col; | 163 | unsigned long dst, col; |
164 | 164 | ||
165 | if (!(cfb->fb.var.accel_flags & FB_ACCELF_TEXT)) { | 165 | if (!(cfb->fb.var.accel_flags & FB_ACCELF_TEXT)) { |
@@ -191,7 +191,7 @@ cyber2000fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
191 | static void | 191 | static void |
192 | cyber2000fb_copyarea(struct fb_info *info, const struct fb_copyarea *region) | 192 | cyber2000fb_copyarea(struct fb_info *info, const struct fb_copyarea *region) |
193 | { | 193 | { |
194 | struct cfb_info *cfb = (struct cfb_info *)info; | 194 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
195 | unsigned int cmd = CO_CMD_L_PATTERN_FGCOL; | 195 | unsigned int cmd = CO_CMD_L_PATTERN_FGCOL; |
196 | unsigned long src, dst; | 196 | unsigned long src, dst; |
197 | 197 | ||
@@ -241,7 +241,7 @@ cyber2000fb_imageblit(struct fb_info *info, const struct fb_image *image) | |||
241 | 241 | ||
242 | static int cyber2000fb_sync(struct fb_info *info) | 242 | static int cyber2000fb_sync(struct fb_info *info) |
243 | { | 243 | { |
244 | struct cfb_info *cfb = (struct cfb_info *)info; | 244 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
245 | int count = 100000; | 245 | int count = 100000; |
246 | 246 | ||
247 | if (!(cfb->fb.var.accel_flags & FB_ACCELF_TEXT)) | 247 | if (!(cfb->fb.var.accel_flags & FB_ACCELF_TEXT)) |
@@ -276,7 +276,7 @@ static int | |||
276 | cyber2000fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | 276 | cyber2000fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, |
277 | u_int transp, struct fb_info *info) | 277 | u_int transp, struct fb_info *info) |
278 | { | 278 | { |
279 | struct cfb_info *cfb = (struct cfb_info *)info; | 279 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
280 | struct fb_var_screeninfo *var = &cfb->fb.var; | 280 | struct fb_var_screeninfo *var = &cfb->fb.var; |
281 | u32 pseudo_val; | 281 | u32 pseudo_val; |
282 | int ret = 1; | 282 | int ret = 1; |
@@ -758,7 +758,7 @@ cyber2000fb_decode_clock(struct par_info *hw, struct cfb_info *cfb, | |||
758 | static int | 758 | static int |
759 | cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | 759 | cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) |
760 | { | 760 | { |
761 | struct cfb_info *cfb = (struct cfb_info *)info; | 761 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
762 | struct par_info hw; | 762 | struct par_info hw; |
763 | unsigned int mem; | 763 | unsigned int mem; |
764 | int err; | 764 | int err; |
@@ -861,7 +861,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
861 | 861 | ||
862 | static int cyber2000fb_set_par(struct fb_info *info) | 862 | static int cyber2000fb_set_par(struct fb_info *info) |
863 | { | 863 | { |
864 | struct cfb_info *cfb = (struct cfb_info *)info; | 864 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
865 | struct fb_var_screeninfo *var = &cfb->fb.var; | 865 | struct fb_var_screeninfo *var = &cfb->fb.var; |
866 | struct par_info hw; | 866 | struct par_info hw; |
867 | unsigned int mem; | 867 | unsigned int mem; |
@@ -971,7 +971,7 @@ static int cyber2000fb_set_par(struct fb_info *info) | |||
971 | static int | 971 | static int |
972 | cyber2000fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | 972 | cyber2000fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) |
973 | { | 973 | { |
974 | struct cfb_info *cfb = (struct cfb_info *)info; | 974 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
975 | 975 | ||
976 | if (cyber2000fb_update_start(cfb, var)) | 976 | if (cyber2000fb_update_start(cfb, var)) |
977 | return -EINVAL; | 977 | return -EINVAL; |
@@ -1007,7 +1007,7 @@ cyber2000fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | |||
1007 | */ | 1007 | */ |
1008 | static int cyber2000fb_blank(int blank, struct fb_info *info) | 1008 | static int cyber2000fb_blank(int blank, struct fb_info *info) |
1009 | { | 1009 | { |
1010 | struct cfb_info *cfb = (struct cfb_info *)info; | 1010 | struct cfb_info *cfb = container_of(info, struct cfb_info, fb); |
1011 | unsigned int sync = 0; | 1011 | unsigned int sync = 0; |
1012 | int i; | 1012 | int i; |
1013 | 1013 | ||
diff --git a/drivers/video/fbdev/intelfb/intelfbhw.c b/drivers/video/fbdev/intelfb/intelfbhw.c index fbad61da359f..d31ed4e2c46f 100644 --- a/drivers/video/fbdev/intelfb/intelfbhw.c +++ b/drivers/video/fbdev/intelfb/intelfbhw.c | |||
@@ -1191,7 +1191,6 @@ int intelfbhw_mode_to_hw(struct intelfb_info *dinfo, | |||
1191 | vsync_end = vsync_start + var->vsync_len; | 1191 | vsync_end = vsync_start + var->vsync_len; |
1192 | vtotal = vsync_end + var->upper_margin; | 1192 | vtotal = vsync_end + var->upper_margin; |
1193 | vblank_start = vactive; | 1193 | vblank_start = vactive; |
1194 | vblank_end = vtotal; | ||
1195 | vblank_end = vsync_end + 1; | 1194 | vblank_end = vsync_end + 1; |
1196 | 1195 | ||
1197 | DBG_MSG("V: act %d, ss %d, se %d, tot %d bs %d, be %d\n", | 1196 | DBG_MSG("V: act %d, ss %d, se %d, tot %d bs %d, be %d\n", |
@@ -1859,7 +1858,7 @@ void intelfbhw_cursor_init(struct intelfb_info *dinfo) | |||
1859 | tmp = INREG(CURSOR_CONTROL); | 1858 | tmp = INREG(CURSOR_CONTROL); |
1860 | tmp &= ~(CURSOR_FORMAT_MASK | CURSOR_GAMMA_ENABLE | | 1859 | tmp &= ~(CURSOR_FORMAT_MASK | CURSOR_GAMMA_ENABLE | |
1861 | CURSOR_ENABLE | CURSOR_STRIDE_MASK); | 1860 | CURSOR_ENABLE | CURSOR_STRIDE_MASK); |
1862 | tmp = CURSOR_FORMAT_3C; | 1861 | tmp |= CURSOR_FORMAT_3C; |
1863 | OUTREG(CURSOR_CONTROL, tmp); | 1862 | OUTREG(CURSOR_CONTROL, tmp); |
1864 | OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.offset << 12); | 1863 | OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.offset << 12); |
1865 | tmp = (64 << CURSOR_SIZE_H_SHIFT) | | 1864 | tmp = (64 << CURSOR_SIZE_H_SHIFT) | |
diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c index 7116c5309c7d..62539ca1cfa9 100644 --- a/drivers/video/fbdev/matrox/matroxfb_base.c +++ b/drivers/video/fbdev/matrox/matroxfb_base.c | |||
@@ -1341,19 +1341,57 @@ struct video_board { | |||
1341 | struct matrox_switch* lowlevel; | 1341 | struct matrox_switch* lowlevel; |
1342 | }; | 1342 | }; |
1343 | #ifdef CONFIG_FB_MATROX_MILLENIUM | 1343 | #ifdef CONFIG_FB_MATROX_MILLENIUM |
1344 | static struct video_board vbMillennium = {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGA2064W, &matrox_millennium}; | 1344 | static struct video_board vbMillennium = { |
1345 | static struct video_board vbMillennium2 = {0x1000000, 0x0800000, FB_ACCEL_MATROX_MGA2164W, &matrox_millennium}; | 1345 | .maxvram = 0x0800000, |
1346 | static struct video_board vbMillennium2A = {0x1000000, 0x0800000, FB_ACCEL_MATROX_MGA2164W_AGP, &matrox_millennium}; | 1346 | .maxdisplayable = 0x0800000, |
1347 | .accelID = FB_ACCEL_MATROX_MGA2064W, | ||
1348 | .lowlevel = &matrox_millennium | ||
1349 | }; | ||
1350 | |||
1351 | static struct video_board vbMillennium2 = { | ||
1352 | .maxvram = 0x1000000, | ||
1353 | .maxdisplayable = 0x0800000, | ||
1354 | .accelID = FB_ACCEL_MATROX_MGA2164W, | ||
1355 | .lowlevel = &matrox_millennium | ||
1356 | }; | ||
1357 | |||
1358 | static struct video_board vbMillennium2A = { | ||
1359 | .maxvram = 0x1000000, | ||
1360 | .maxdisplayable = 0x0800000, | ||
1361 | .accelID = FB_ACCEL_MATROX_MGA2164W_AGP, | ||
1362 | .lowlevel = &matrox_millennium | ||
1363 | }; | ||
1347 | #endif /* CONFIG_FB_MATROX_MILLENIUM */ | 1364 | #endif /* CONFIG_FB_MATROX_MILLENIUM */ |
1348 | #ifdef CONFIG_FB_MATROX_MYSTIQUE | 1365 | #ifdef CONFIG_FB_MATROX_MYSTIQUE |
1349 | static struct video_board vbMystique = {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGA1064SG, &matrox_mystique}; | 1366 | static struct video_board vbMystique = { |
1367 | .maxvram = 0x0800000, | ||
1368 | .maxdisplayable = 0x0800000, | ||
1369 | .accelID = FB_ACCEL_MATROX_MGA1064SG, | ||
1370 | .lowlevel = &matrox_mystique | ||
1371 | }; | ||
1350 | #endif /* CONFIG_FB_MATROX_MYSTIQUE */ | 1372 | #endif /* CONFIG_FB_MATROX_MYSTIQUE */ |
1351 | #ifdef CONFIG_FB_MATROX_G | 1373 | #ifdef CONFIG_FB_MATROX_G |
1352 | static struct video_board vbG100 = {0x0800000, 0x0800000, FB_ACCEL_MATROX_MGAG100, &matrox_G100}; | 1374 | static struct video_board vbG100 = { |
1353 | static struct video_board vbG200 = {0x1000000, 0x1000000, FB_ACCEL_MATROX_MGAG200, &matrox_G100}; | 1375 | .maxvram = 0x0800000, |
1376 | .maxdisplayable = 0x0800000, | ||
1377 | .accelID = FB_ACCEL_MATROX_MGAG100, | ||
1378 | .lowlevel = &matrox_G100 | ||
1379 | }; | ||
1380 | |||
1381 | static struct video_board vbG200 = { | ||
1382 | .maxvram = 0x1000000, | ||
1383 | .maxdisplayable = 0x1000000, | ||
1384 | .accelID = FB_ACCEL_MATROX_MGAG200, | ||
1385 | .lowlevel = &matrox_G100 | ||
1386 | }; | ||
1354 | /* from doc it looks like that accelerator can draw only to low 16MB :-( Direct accesses & displaying are OK for | 1387 | /* from doc it looks like that accelerator can draw only to low 16MB :-( Direct accesses & displaying are OK for |
1355 | whole 32MB */ | 1388 | whole 32MB */ |
1356 | static struct video_board vbG400 = {0x2000000, 0x1000000, FB_ACCEL_MATROX_MGAG400, &matrox_G100}; | 1389 | static struct video_board vbG400 = { |
1390 | .maxvram = 0x2000000, | ||
1391 | .maxdisplayable = 0x1000000, | ||
1392 | .accelID = FB_ACCEL_MATROX_MGAG400, | ||
1393 | .lowlevel = &matrox_G100 | ||
1394 | }; | ||
1357 | #endif | 1395 | #endif |
1358 | 1396 | ||
1359 | #define DEVF_VIDEO64BIT 0x0001 | 1397 | #define DEVF_VIDEO64BIT 0x0001 |
diff --git a/drivers/video/fbdev/matrox/matroxfb_maven.c b/drivers/video/fbdev/matrox/matroxfb_maven.c index ee41a0f276b2..bf5ce04f9aea 100644 --- a/drivers/video/fbdev/matrox/matroxfb_maven.c +++ b/drivers/video/fbdev/matrox/matroxfb_maven.c | |||
@@ -201,21 +201,23 @@ struct matrox_pll_ctl { | |||
201 | }; | 201 | }; |
202 | 202 | ||
203 | static const struct matrox_pll_features2 maven1000_pll = { | 203 | static const struct matrox_pll_features2 maven1000_pll = { |
204 | 50000000, | 204 | .vco_freq_min = 50000000, |
205 | 300000000, | 205 | .vco_freq_max = 300000000, |
206 | 5, 128, | 206 | .feed_div_min = 5, |
207 | 3, 32, | 207 | .feed_div_max = 128, |
208 | 3 | 208 | .in_div_min = 3, |
209 | .in_div_max = 32, | ||
210 | .post_shift_max = 3 | ||
209 | }; | 211 | }; |
210 | 212 | ||
211 | static const struct matrox_pll_ctl maven_PAL = { | 213 | static const struct matrox_pll_ctl maven_PAL = { |
212 | 540000, | 214 | .ref_freq = 540000, |
213 | 50 | 215 | .den = 50 |
214 | }; | 216 | }; |
215 | 217 | ||
216 | static const struct matrox_pll_ctl maven_NTSC = { | 218 | static const struct matrox_pll_ctl maven_NTSC = { |
217 | 450450, /* 27027000/60 == 27000000/59.94005994 */ | 219 | .ref_freq = 450450, /* 27027000/60 == 27000000/59.94005994 */ |
218 | 60 | 220 | .den = 60 |
219 | }; | 221 | }; |
220 | 222 | ||
221 | static int matroxfb_PLL_mavenclock(const struct matrox_pll_features2* pll, | 223 | static int matroxfb_PLL_mavenclock(const struct matrox_pll_features2* pll, |
diff --git a/drivers/video/fbdev/msm/msm_fb.c b/drivers/video/fbdev/msm/msm_fb.c index 1374803fbcd9..2979d7e72126 100644 --- a/drivers/video/fbdev/msm/msm_fb.c +++ b/drivers/video/fbdev/msm/msm_fb.c | |||
@@ -569,8 +569,13 @@ static int msmfb_probe(struct platform_device *pdev) | |||
569 | mutex_init(&msmfb->panel_init_lock); | 569 | mutex_init(&msmfb->panel_init_lock); |
570 | init_waitqueue_head(&msmfb->frame_wq); | 570 | init_waitqueue_head(&msmfb->frame_wq); |
571 | INIT_WORK(&msmfb->resume_work, power_on_panel); | 571 | INIT_WORK(&msmfb->resume_work, power_on_panel); |
572 | msmfb->black = kzalloc(msmfb->fb->var.bits_per_pixel*msmfb->xres, | 572 | msmfb->black = devm_kzalloc(&pdev->dev, |
573 | GFP_KERNEL); | 573 | msmfb->fb->var.bits_per_pixel*msmfb->xres, |
574 | GFP_KERNEL); | ||
575 | if (!msmfb->black) { | ||
576 | ret = -ENOMEM; | ||
577 | goto error_register_framebuffer; | ||
578 | } | ||
574 | 579 | ||
575 | printk(KERN_INFO "msmfb_probe() installing %d x %d panel\n", | 580 | printk(KERN_INFO "msmfb_probe() installing %d x %d panel\n", |
576 | msmfb->xres, msmfb->yres); | 581 | msmfb->xres, msmfb->yres); |
@@ -589,6 +594,8 @@ static int msmfb_probe(struct platform_device *pdev) | |||
589 | 594 | ||
590 | msmfb->sleeping = WAKING; | 595 | msmfb->sleeping = WAKING; |
591 | 596 | ||
597 | platform_set_drvdata(pdev, msmfb); | ||
598 | |||
592 | return 0; | 599 | return 0; |
593 | 600 | ||
594 | error_register_framebuffer: | 601 | error_register_framebuffer: |
@@ -598,9 +605,23 @@ error_setup_fbmem: | |||
598 | return ret; | 605 | return ret; |
599 | } | 606 | } |
600 | 607 | ||
608 | static int msmfb_remove(struct platform_device *pdev) | ||
609 | { | ||
610 | struct msmfb_info *msmfb; | ||
611 | |||
612 | msmfb = platform_get_drvdata(pdev); | ||
613 | |||
614 | unregister_framebuffer(msmfb->fb); | ||
615 | iounmap(msmfb->fb->screen_base); | ||
616 | framebuffer_release(msmfb->fb); | ||
617 | |||
618 | return 0; | ||
619 | } | ||
620 | |||
601 | static struct platform_driver msm_panel_driver = { | 621 | static struct platform_driver msm_panel_driver = { |
602 | /* need to write remove */ | 622 | /* need to write remove */ |
603 | .probe = msmfb_probe, | 623 | .probe = msmfb_probe, |
624 | .remove = msmfb_remove, | ||
604 | .driver = {.name = "msm_panel"}, | 625 | .driver = {.name = "msm_panel"}, |
605 | }; | 626 | }; |
606 | 627 | ||
diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c index c645a0a0c341..5e97baf92721 100644 --- a/drivers/video/fbdev/mx3fb.c +++ b/drivers/video/fbdev/mx3fb.c | |||
@@ -1179,7 +1179,7 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var, | |||
1179 | 1179 | ||
1180 | /* | 1180 | /* |
1181 | * We enable the End of Frame interrupt, which will free a tx-descriptor, | 1181 | * We enable the End of Frame interrupt, which will free a tx-descriptor, |
1182 | * which we will need for the next device_prep_slave_sg(). The | 1182 | * which we will need for the next dmaengine_prep_slave_sg(). The |
1183 | * IRQ-handler will disable the IRQ again. | 1183 | * IRQ-handler will disable the IRQ again. |
1184 | */ | 1184 | */ |
1185 | init_completion(&mx3_fbi->flip_cmpl); | 1185 | init_completion(&mx3_fbi->flip_cmpl); |
diff --git a/drivers/video/fbdev/omap2/dss/dispc-compat.c b/drivers/video/fbdev/omap2/dss/dispc-compat.c index 83779c2b292a..633c461fbc6e 100644 --- a/drivers/video/fbdev/omap2/dss/dispc-compat.c +++ b/drivers/video/fbdev/omap2/dss/dispc-compat.c | |||
@@ -634,13 +634,14 @@ void dispc_mgr_disable_sync(enum omap_channel channel) | |||
634 | WARN_ON(1); | 634 | WARN_ON(1); |
635 | } | 635 | } |
636 | 636 | ||
637 | static inline void dispc_irq_wait_handler(void *data, u32 mask) | ||
638 | { | ||
639 | complete((struct completion *)data); | ||
640 | } | ||
641 | |||
637 | int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, | 642 | int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, |
638 | unsigned long timeout) | 643 | unsigned long timeout) |
639 | { | 644 | { |
640 | void dispc_irq_wait_handler(void *data, u32 mask) | ||
641 | { | ||
642 | complete((struct completion *)data); | ||
643 | } | ||
644 | 645 | ||
645 | int r; | 646 | int r; |
646 | DECLARE_COMPLETION_ONSTACK(completion); | 647 | DECLARE_COMPLETION_ONSTACK(completion); |
diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c index 56b92444c54f..b6f6ae1d4664 100644 --- a/drivers/video/fbdev/omap2/dss/dsi.c +++ b/drivers/video/fbdev/omap2/dss/dsi.c | |||
@@ -2571,7 +2571,10 @@ static int dsi_sync_vc_vp(struct platform_device *dsidev, int channel) | |||
2571 | { | 2571 | { |
2572 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 2572 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
2573 | DECLARE_COMPLETION_ONSTACK(completion); | 2573 | DECLARE_COMPLETION_ONSTACK(completion); |
2574 | struct dsi_packet_sent_handler_data vp_data = { dsidev, &completion }; | 2574 | struct dsi_packet_sent_handler_data vp_data = { |
2575 | .dsidev = dsidev, | ||
2576 | .completion = &completion | ||
2577 | }; | ||
2575 | int r = 0; | 2578 | int r = 0; |
2576 | u8 bit; | 2579 | u8 bit; |
2577 | 2580 | ||
@@ -2617,7 +2620,10 @@ static void dsi_packet_sent_handler_l4(void *data, u32 mask) | |||
2617 | static int dsi_sync_vc_l4(struct platform_device *dsidev, int channel) | 2620 | static int dsi_sync_vc_l4(struct platform_device *dsidev, int channel) |
2618 | { | 2621 | { |
2619 | DECLARE_COMPLETION_ONSTACK(completion); | 2622 | DECLARE_COMPLETION_ONSTACK(completion); |
2620 | struct dsi_packet_sent_handler_data l4_data = { dsidev, &completion }; | 2623 | struct dsi_packet_sent_handler_data l4_data = { |
2624 | .dsidev = dsidev, | ||
2625 | .completion = &completion | ||
2626 | }; | ||
2621 | int r = 0; | 2627 | int r = 0; |
2622 | 2628 | ||
2623 | r = dsi_register_isr_vc(dsidev, channel, dsi_packet_sent_handler_l4, | 2629 | r = dsi_register_isr_vc(dsidev, channel, dsi_packet_sent_handler_l4, |
diff --git a/drivers/video/fbdev/omap2/dss/manager-sysfs.c b/drivers/video/fbdev/omap2/dss/manager-sysfs.c index 37b59fe28dc8..a7414fb12830 100644 --- a/drivers/video/fbdev/omap2/dss/manager-sysfs.c +++ b/drivers/video/fbdev/omap2/dss/manager-sysfs.c | |||
@@ -44,6 +44,13 @@ static ssize_t manager_display_show(struct omap_overlay_manager *mgr, char *buf) | |||
44 | dssdev->name : "<none>"); | 44 | dssdev->name : "<none>"); |
45 | } | 45 | } |
46 | 46 | ||
47 | static int manager_display_match(struct omap_dss_device *dssdev, void *data) | ||
48 | { | ||
49 | const char *str = data; | ||
50 | |||
51 | return sysfs_streq(dssdev->name, str); | ||
52 | } | ||
53 | |||
47 | static ssize_t manager_display_store(struct omap_overlay_manager *mgr, | 54 | static ssize_t manager_display_store(struct omap_overlay_manager *mgr, |
48 | const char *buf, size_t size) | 55 | const char *buf, size_t size) |
49 | { | 56 | { |
@@ -52,17 +59,12 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr, | |||
52 | struct omap_dss_device *dssdev = NULL; | 59 | struct omap_dss_device *dssdev = NULL; |
53 | struct omap_dss_device *old_dssdev; | 60 | struct omap_dss_device *old_dssdev; |
54 | 61 | ||
55 | int match(struct omap_dss_device *dssdev, void *data) | ||
56 | { | ||
57 | const char *str = data; | ||
58 | return sysfs_streq(dssdev->name, str); | ||
59 | } | ||
60 | |||
61 | if (buf[size-1] == '\n') | 62 | if (buf[size-1] == '\n') |
62 | --len; | 63 | --len; |
63 | 64 | ||
64 | if (len > 0) | 65 | if (len > 0) |
65 | dssdev = omap_dss_find_device((void *)buf, match); | 66 | dssdev = omap_dss_find_device((void *)buf, |
67 | manager_display_match); | ||
66 | 68 | ||
67 | if (len > 0 && dssdev == NULL) | 69 | if (len > 0 && dssdev == NULL) |
68 | return -EINVAL; | 70 | return -EINVAL; |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index ec2d132c782d..15872433e0c6 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c | |||
@@ -273,16 +273,16 @@ static struct omapfb_colormode omapfb_colormodes[] = { | |||
273 | }, | 273 | }, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static bool cmp_component(struct fb_bitfield *f1, struct fb_bitfield *f2) | ||
277 | { | ||
278 | return f1->length == f2->length && | ||
279 | f1->offset == f2->offset && | ||
280 | f1->msb_right == f2->msb_right; | ||
281 | } | ||
282 | |||
276 | static bool cmp_var_to_colormode(struct fb_var_screeninfo *var, | 283 | static bool cmp_var_to_colormode(struct fb_var_screeninfo *var, |
277 | struct omapfb_colormode *color) | 284 | struct omapfb_colormode *color) |
278 | { | 285 | { |
279 | bool cmp_component(struct fb_bitfield *f1, struct fb_bitfield *f2) | ||
280 | { | ||
281 | return f1->length == f2->length && | ||
282 | f1->offset == f2->offset && | ||
283 | f1->msb_right == f2->msb_right; | ||
284 | } | ||
285 | |||
286 | if (var->bits_per_pixel == 0 || | 286 | if (var->bits_per_pixel == 0 || |
287 | var->red.length == 0 || | 287 | var->red.length == 0 || |
288 | var->blue.length == 0 || | 288 | var->blue.length == 0 || |
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index 1ecd9cec2921..a5acca88fa63 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c | |||
@@ -138,7 +138,7 @@ static int | |||
138 | pxafb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, | 138 | pxafb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, |
139 | u_int trans, struct fb_info *info) | 139 | u_int trans, struct fb_info *info) |
140 | { | 140 | { |
141 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 141 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); |
142 | u_int val; | 142 | u_int val; |
143 | 143 | ||
144 | if (regno >= fbi->palette_size) | 144 | if (regno >= fbi->palette_size) |
@@ -183,7 +183,7 @@ static int | |||
183 | pxafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | 183 | pxafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, |
184 | u_int trans, struct fb_info *info) | 184 | u_int trans, struct fb_info *info) |
185 | { | 185 | { |
186 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 186 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); |
187 | unsigned int val; | 187 | unsigned int val; |
188 | int ret = 1; | 188 | int ret = 1; |
189 | 189 | ||
@@ -456,7 +456,7 @@ static int pxafb_adjust_timing(struct pxafb_info *fbi, | |||
456 | */ | 456 | */ |
457 | static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | 457 | static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) |
458 | { | 458 | { |
459 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 459 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); |
460 | struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev); | 460 | struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev); |
461 | int err; | 461 | int err; |
462 | 462 | ||
@@ -494,7 +494,7 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
494 | */ | 494 | */ |
495 | static int pxafb_set_par(struct fb_info *info) | 495 | static int pxafb_set_par(struct fb_info *info) |
496 | { | 496 | { |
497 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 497 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); |
498 | struct fb_var_screeninfo *var = &info->var; | 498 | struct fb_var_screeninfo *var = &info->var; |
499 | 499 | ||
500 | if (var->bits_per_pixel >= 16) | 500 | if (var->bits_per_pixel >= 16) |
@@ -533,7 +533,7 @@ static int pxafb_set_par(struct fb_info *info) | |||
533 | static int pxafb_pan_display(struct fb_var_screeninfo *var, | 533 | static int pxafb_pan_display(struct fb_var_screeninfo *var, |
534 | struct fb_info *info) | 534 | struct fb_info *info) |
535 | { | 535 | { |
536 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 536 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); |
537 | struct fb_var_screeninfo newvar; | 537 | struct fb_var_screeninfo newvar; |
538 | int dma = DMA_MAX + DMA_BASE; | 538 | int dma = DMA_MAX + DMA_BASE; |
539 | 539 | ||
@@ -566,7 +566,7 @@ static int pxafb_pan_display(struct fb_var_screeninfo *var, | |||
566 | */ | 566 | */ |
567 | static int pxafb_blank(int blank, struct fb_info *info) | 567 | static int pxafb_blank(int blank, struct fb_info *info) |
568 | { | 568 | { |
569 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 569 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); |
570 | int i; | 570 | int i; |
571 | 571 | ||
572 | switch (blank) { | 572 | switch (blank) { |
@@ -725,7 +725,7 @@ static struct pxafb_layer_ops ofb_ops[] = { | |||
725 | 725 | ||
726 | static int overlayfb_open(struct fb_info *info, int user) | 726 | static int overlayfb_open(struct fb_info *info, int user) |
727 | { | 727 | { |
728 | struct pxafb_layer *ofb = (struct pxafb_layer *)info; | 728 | struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb); |
729 | 729 | ||
730 | /* no support for framebuffer console on overlay */ | 730 | /* no support for framebuffer console on overlay */ |
731 | if (user == 0) | 731 | if (user == 0) |
@@ -743,7 +743,7 @@ static int overlayfb_open(struct fb_info *info, int user) | |||
743 | 743 | ||
744 | static int overlayfb_release(struct fb_info *info, int user) | 744 | static int overlayfb_release(struct fb_info *info, int user) |
745 | { | 745 | { |
746 | struct pxafb_layer *ofb = (struct pxafb_layer*) info; | 746 | struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb); |
747 | 747 | ||
748 | if (ofb->usage == 1) { | 748 | if (ofb->usage == 1) { |
749 | ofb->ops->disable(ofb); | 749 | ofb->ops->disable(ofb); |
@@ -760,7 +760,7 @@ static int overlayfb_release(struct fb_info *info, int user) | |||
760 | static int overlayfb_check_var(struct fb_var_screeninfo *var, | 760 | static int overlayfb_check_var(struct fb_var_screeninfo *var, |
761 | struct fb_info *info) | 761 | struct fb_info *info) |
762 | { | 762 | { |
763 | struct pxafb_layer *ofb = (struct pxafb_layer *)info; | 763 | struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb); |
764 | struct fb_var_screeninfo *base_var = &ofb->fbi->fb.var; | 764 | struct fb_var_screeninfo *base_var = &ofb->fbi->fb.var; |
765 | int xpos, ypos, pfor, bpp; | 765 | int xpos, ypos, pfor, bpp; |
766 | 766 | ||
@@ -836,7 +836,7 @@ static int overlayfb_check_video_memory(struct pxafb_layer *ofb) | |||
836 | 836 | ||
837 | static int overlayfb_set_par(struct fb_info *info) | 837 | static int overlayfb_set_par(struct fb_info *info) |
838 | { | 838 | { |
839 | struct pxafb_layer *ofb = (struct pxafb_layer *)info; | 839 | struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb); |
840 | struct fb_var_screeninfo *var = &info->var; | 840 | struct fb_var_screeninfo *var = &info->var; |
841 | int xpos, ypos, pfor, bpp, ret; | 841 | int xpos, ypos, pfor, bpp, ret; |
842 | 842 | ||
diff --git a/drivers/video/fbdev/riva/riva_hw.c b/drivers/video/fbdev/riva/riva_hw.c index 78fdbf5178d7..8bdf37f3013b 100644 --- a/drivers/video/fbdev/riva/riva_hw.c +++ b/drivers/video/fbdev/riva/riva_hw.c | |||
@@ -430,7 +430,6 @@ static char nv3_arb(nv3_fifo_info * res_info, nv3_sim_state * state, nv3_arb_in | |||
430 | int mmisses, gmisses, vmisses, eburst_size, mburst_size; | 430 | int mmisses, gmisses, vmisses, eburst_size, mburst_size; |
431 | int refresh_cycle; | 431 | int refresh_cycle; |
432 | 432 | ||
433 | refresh_cycle = 0; | ||
434 | refresh_cycle = 2*(state->mclk_khz/state->pclk_khz) + 5; | 433 | refresh_cycle = 2*(state->mclk_khz/state->pclk_khz) + 5; |
435 | mmisses = 2; | 434 | mmisses = 2; |
436 | if (state->mem_aligned) gmisses = 2; | 435 | if (state->mem_aligned) gmisses = 2; |
diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c index 580c444ec301..9690216d38ff 100644 --- a/drivers/video/fbdev/sa1100fb.c +++ b/drivers/video/fbdev/sa1100fb.c | |||
@@ -268,7 +268,8 @@ static int | |||
268 | sa1100fb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, | 268 | sa1100fb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, |
269 | u_int trans, struct fb_info *info) | 269 | u_int trans, struct fb_info *info) |
270 | { | 270 | { |
271 | struct sa1100fb_info *fbi = (struct sa1100fb_info *)info; | 271 | struct sa1100fb_info *fbi = |
272 | container_of(info, struct sa1100fb_info, fb); | ||
272 | u_int val, ret = 1; | 273 | u_int val, ret = 1; |
273 | 274 | ||
274 | if (regno < fbi->palette_size) { | 275 | if (regno < fbi->palette_size) { |
@@ -289,7 +290,8 @@ static int | |||
289 | sa1100fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | 290 | sa1100fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, |
290 | u_int trans, struct fb_info *info) | 291 | u_int trans, struct fb_info *info) |
291 | { | 292 | { |
292 | struct sa1100fb_info *fbi = (struct sa1100fb_info *)info; | 293 | struct sa1100fb_info *fbi = |
294 | container_of(info, struct sa1100fb_info, fb); | ||
293 | unsigned int val; | 295 | unsigned int val; |
294 | int ret = 1; | 296 | int ret = 1; |
295 | 297 | ||
@@ -366,7 +368,8 @@ static inline unsigned int sa1100fb_display_dma_period(struct fb_var_screeninfo | |||
366 | static int | 368 | static int |
367 | sa1100fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | 369 | sa1100fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) |
368 | { | 370 | { |
369 | struct sa1100fb_info *fbi = (struct sa1100fb_info *)info; | 371 | struct sa1100fb_info *fbi = |
372 | container_of(info, struct sa1100fb_info, fb); | ||
370 | int rgbidx; | 373 | int rgbidx; |
371 | 374 | ||
372 | if (var->xres < MIN_XRES) | 375 | if (var->xres < MIN_XRES) |
@@ -433,7 +436,8 @@ static void sa1100fb_set_visual(struct sa1100fb_info *fbi, u32 visual) | |||
433 | */ | 436 | */ |
434 | static int sa1100fb_set_par(struct fb_info *info) | 437 | static int sa1100fb_set_par(struct fb_info *info) |
435 | { | 438 | { |
436 | struct sa1100fb_info *fbi = (struct sa1100fb_info *)info; | 439 | struct sa1100fb_info *fbi = |
440 | container_of(info, struct sa1100fb_info, fb); | ||
437 | struct fb_var_screeninfo *var = &info->var; | 441 | struct fb_var_screeninfo *var = &info->var; |
438 | unsigned long palette_mem_size; | 442 | unsigned long palette_mem_size; |
439 | 443 | ||
@@ -526,7 +530,8 @@ sa1100fb_set_cmap(struct fb_cmap *cmap, int kspc, int con, | |||
526 | */ | 530 | */ |
527 | static int sa1100fb_blank(int blank, struct fb_info *info) | 531 | static int sa1100fb_blank(int blank, struct fb_info *info) |
528 | { | 532 | { |
529 | struct sa1100fb_info *fbi = (struct sa1100fb_info *)info; | 533 | struct sa1100fb_info *fbi = |
534 | container_of(info, struct sa1100fb_info, fb); | ||
530 | int i; | 535 | int i; |
531 | 536 | ||
532 | dev_dbg(fbi->dev, "sa1100fb_blank: blank=%d\n", blank); | 537 | dev_dbg(fbi->dev, "sa1100fb_blank: blank=%d\n", blank); |
@@ -555,7 +560,8 @@ static int sa1100fb_blank(int blank, struct fb_info *info) | |||
555 | static int sa1100fb_mmap(struct fb_info *info, | 560 | static int sa1100fb_mmap(struct fb_info *info, |
556 | struct vm_area_struct *vma) | 561 | struct vm_area_struct *vma) |
557 | { | 562 | { |
558 | struct sa1100fb_info *fbi = (struct sa1100fb_info *)info; | 563 | struct sa1100fb_info *fbi = |
564 | container_of(info, struct sa1100fb_info, fb); | ||
559 | unsigned long off = vma->vm_pgoff << PAGE_SHIFT; | 565 | unsigned long off = vma->vm_pgoff << PAGE_SHIFT; |
560 | 566 | ||
561 | if (off < info->fix.smem_len) { | 567 | if (off < info->fix.smem_len) { |
diff --git a/drivers/video/fbdev/sh_mobile_hdmi.c b/drivers/video/fbdev/sh_mobile_hdmi.c index 9a33ee0413fb..7c72a3f02056 100644 --- a/drivers/video/fbdev/sh_mobile_hdmi.c +++ b/drivers/video/fbdev/sh_mobile_hdmi.c | |||
@@ -281,6 +281,7 @@ struct sh_hdmi { | |||
281 | u8 edid_block_addr; | 281 | u8 edid_block_addr; |
282 | u8 edid_segment_nr; | 282 | u8 edid_segment_nr; |
283 | u8 edid_blocks; | 283 | u8 edid_blocks; |
284 | int irq; | ||
284 | struct clk *hdmi_clk; | 285 | struct clk *hdmi_clk; |
285 | struct device *dev; | 286 | struct device *dev; |
286 | struct delayed_work edid_work; | 287 | struct delayed_work edid_work; |
@@ -1299,6 +1300,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev) | |||
1299 | hdmi->dev = &pdev->dev; | 1300 | hdmi->dev = &pdev->dev; |
1300 | hdmi->entity.owner = THIS_MODULE; | 1301 | hdmi->entity.owner = THIS_MODULE; |
1301 | hdmi->entity.ops = &sh_hdmi_ops; | 1302 | hdmi->entity.ops = &sh_hdmi_ops; |
1303 | hdmi->irq = irq; | ||
1302 | 1304 | ||
1303 | hdmi->hdmi_clk = clk_get(&pdev->dev, "ick"); | 1305 | hdmi->hdmi_clk = clk_get(&pdev->dev, "ick"); |
1304 | if (IS_ERR(hdmi->hdmi_clk)) { | 1306 | if (IS_ERR(hdmi->hdmi_clk)) { |
@@ -1415,12 +1417,11 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev) | |||
1415 | { | 1417 | { |
1416 | struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev)); | 1418 | struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev)); |
1417 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1419 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1418 | int irq = platform_get_irq(pdev, 0); | ||
1419 | 1420 | ||
1420 | snd_soc_unregister_codec(&pdev->dev); | 1421 | snd_soc_unregister_codec(&pdev->dev); |
1421 | 1422 | ||
1422 | /* No new work will be scheduled, wait for running ISR */ | 1423 | /* No new work will be scheduled, wait for running ISR */ |
1423 | free_irq(irq, hdmi); | 1424 | free_irq(hdmi->irq, hdmi); |
1424 | /* Wait for already scheduled work */ | 1425 | /* Wait for already scheduled work */ |
1425 | cancel_delayed_work_sync(&hdmi->edid_work); | 1426 | cancel_delayed_work_sync(&hdmi->edid_work); |
1426 | pm_runtime_put(&pdev->dev); | 1427 | pm_runtime_put(&pdev->dev); |
@@ -1435,10 +1436,49 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev) | |||
1435 | return 0; | 1436 | return 0; |
1436 | } | 1437 | } |
1437 | 1438 | ||
1439 | static int sh_hdmi_suspend(struct device *dev) | ||
1440 | { | ||
1441 | struct platform_device *pdev = to_platform_device(dev); | ||
1442 | struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev)); | ||
1443 | |||
1444 | disable_irq(hdmi->irq); | ||
1445 | /* Wait for already scheduled work */ | ||
1446 | cancel_delayed_work_sync(&hdmi->edid_work); | ||
1447 | return 0; | ||
1448 | } | ||
1449 | |||
1450 | static int sh_hdmi_resume(struct device *dev) | ||
1451 | { | ||
1452 | struct platform_device *pdev = to_platform_device(dev); | ||
1453 | struct sh_mobile_hdmi_info *pdata = dev_get_platdata(dev); | ||
1454 | struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev)); | ||
1455 | |||
1456 | /* Re-init interrupt polarity */ | ||
1457 | if (pdata->flags & HDMI_OUTPUT_PUSH_PULL) | ||
1458 | hdmi_bit_set(hdmi, 0x02, 0x02, HDMI_SYSTEM_CTRL); | ||
1459 | |||
1460 | if (pdata->flags & HDMI_OUTPUT_POLARITY_HI) | ||
1461 | hdmi_bit_set(hdmi, 0x01, 0x01, HDMI_SYSTEM_CTRL); | ||
1462 | |||
1463 | /* Re-init htop1 */ | ||
1464 | if (hdmi->htop1) | ||
1465 | sh_hdmi_htop1_init(hdmi); | ||
1466 | |||
1467 | /* Now it's safe to enable interrupts again */ | ||
1468 | enable_irq(hdmi->irq); | ||
1469 | return 0; | ||
1470 | } | ||
1471 | |||
1472 | static const struct dev_pm_ops sh_hdmi_pm_ops = { | ||
1473 | .suspend = sh_hdmi_suspend, | ||
1474 | .resume = sh_hdmi_resume, | ||
1475 | }; | ||
1476 | |||
1438 | static struct platform_driver sh_hdmi_driver = { | 1477 | static struct platform_driver sh_hdmi_driver = { |
1439 | .remove = __exit_p(sh_hdmi_remove), | 1478 | .remove = __exit_p(sh_hdmi_remove), |
1440 | .driver = { | 1479 | .driver = { |
1441 | .name = "sh-mobile-hdmi", | 1480 | .name = "sh-mobile-hdmi", |
1481 | .pm = &sh_hdmi_pm_ops, | ||
1442 | }, | 1482 | }, |
1443 | }; | 1483 | }; |
1444 | 1484 | ||
diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c index a89e3cafd5ad..295e0dedaf1f 100644 --- a/drivers/video/fbdev/sis/init301.c +++ b/drivers/video/fbdev/sis/init301.c | |||
@@ -1714,7 +1714,7 @@ SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sh | |||
1714 | SiS_Pr->PanelVCLKIdx315 = VCLK81_315; /* ? */ | 1714 | SiS_Pr->PanelVCLKIdx315 = VCLK81_315; /* ? */ |
1715 | } else { | 1715 | } else { |
1716 | SiS_Pr->PanelHT = 1688; SiS_Pr->PanelVT = 802; | 1716 | SiS_Pr->PanelHT = 1688; SiS_Pr->PanelVT = 802; |
1717 | SiS_Pr->PanelHRS = 48; SiS_Pr->PanelHRS = 112; | 1717 | SiS_Pr->PanelHRS = 48; SiS_Pr->PanelHRE = 112; |
1718 | SiS_Pr->PanelVRS = 3; SiS_Pr->PanelVRE = 6; | 1718 | SiS_Pr->PanelVRS = 3; SiS_Pr->PanelVRE = 6; |
1719 | SiS_Pr->PanelVCLKIdx300 = VCLK81_300; | 1719 | SiS_Pr->PanelVCLKIdx300 = VCLK81_300; |
1720 | SiS_Pr->PanelVCLKIdx315 = VCLK81_315; | 1720 | SiS_Pr->PanelVCLKIdx315 = VCLK81_315; |
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c index 4f5cf035ac3c..e5d11b1892e8 100644 --- a/drivers/video/fbdev/sis/sis_main.c +++ b/drivers/video/fbdev/sis/sis_main.c | |||
@@ -5830,7 +5830,7 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5830 | ivideo->cardnumber++; | 5830 | ivideo->cardnumber++; |
5831 | } | 5831 | } |
5832 | 5832 | ||
5833 | strncpy(ivideo->myid, chipinfo->chip_name, 30); | 5833 | strlcpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid)); |
5834 | 5834 | ||
5835 | ivideo->warncount = 0; | 5835 | ivideo->warncount = 0; |
5836 | ivideo->chip_id = pdev->device; | 5836 | ivideo->chip_id = pdev->device; |
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index cfe8a2f905c5..86621fabbb8b 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c | |||
@@ -918,7 +918,7 @@ static int | |||
918 | stifb_setcolreg(u_int regno, u_int red, u_int green, | 918 | stifb_setcolreg(u_int regno, u_int red, u_int green, |
919 | u_int blue, u_int transp, struct fb_info *info) | 919 | u_int blue, u_int transp, struct fb_info *info) |
920 | { | 920 | { |
921 | struct stifb_info *fb = (struct stifb_info *) info; | 921 | struct stifb_info *fb = container_of(info, struct stifb_info, info); |
922 | u32 color; | 922 | u32 color; |
923 | 923 | ||
924 | if (regno >= NR_PALETTE) | 924 | if (regno >= NR_PALETTE) |
@@ -978,7 +978,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green, | |||
978 | static int | 978 | static int |
979 | stifb_blank(int blank_mode, struct fb_info *info) | 979 | stifb_blank(int blank_mode, struct fb_info *info) |
980 | { | 980 | { |
981 | struct stifb_info *fb = (struct stifb_info *) info; | 981 | struct stifb_info *fb = container_of(info, struct stifb_info, info); |
982 | int enable = (blank_mode == 0) ? ENABLE : DISABLE; | 982 | int enable = (blank_mode == 0) ? ENABLE : DISABLE; |
983 | 983 | ||
984 | switch (fb->id) { | 984 | switch (fb->id) { |
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 77b890e4d296..046d51d83d74 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c | |||
@@ -1528,11 +1528,8 @@ static int dlfb_parse_vendor_descriptor(struct dlfb_data *dev, | |||
1528 | } | 1528 | } |
1529 | 1529 | ||
1530 | if (total_len > 5) { | 1530 | if (total_len > 5) { |
1531 | pr_info("vendor descriptor length:%x data:%02x %02x %02x %02x" \ | 1531 | pr_info("vendor descriptor length:%x data:%11ph\n", total_len, |
1532 | "%02x %02x %02x %02x %02x %02x %02x\n", | 1532 | desc); |
1533 | total_len, desc[0], | ||
1534 | desc[1], desc[2], desc[3], desc[4], desc[5], desc[6], | ||
1535 | desc[7], desc[8], desc[9], desc[10]); | ||
1536 | 1533 | ||
1537 | if ((desc[0] != total_len) || /* descriptor length */ | 1534 | if ((desc[0] != total_len) || /* descriptor length */ |
1538 | (desc[1] != 0x5f) || /* vendor descriptor type */ | 1535 | (desc[1] != 0x5f) || /* vendor descriptor type */ |
diff --git a/drivers/video/fbdev/valkyriefb.c b/drivers/video/fbdev/valkyriefb.c index 97cb9bd1d1dd..275fb98236d3 100644 --- a/drivers/video/fbdev/valkyriefb.c +++ b/drivers/video/fbdev/valkyriefb.c | |||
@@ -136,7 +136,8 @@ static struct fb_ops valkyriefb_ops = { | |||
136 | /* Sets the video mode according to info->var */ | 136 | /* Sets the video mode according to info->var */ |
137 | static int valkyriefb_set_par(struct fb_info *info) | 137 | static int valkyriefb_set_par(struct fb_info *info) |
138 | { | 138 | { |
139 | struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info; | 139 | struct fb_info_valkyrie *p = |
140 | container_of(info, struct fb_info_valkyrie, info); | ||
140 | volatile struct valkyrie_regs __iomem *valkyrie_regs = p->valkyrie_regs; | 141 | volatile struct valkyrie_regs __iomem *valkyrie_regs = p->valkyrie_regs; |
141 | struct fb_par_valkyrie *par = info->par; | 142 | struct fb_par_valkyrie *par = info->par; |
142 | struct valkyrie_regvals *init; | 143 | struct valkyrie_regvals *init; |
@@ -194,7 +195,8 @@ valkyriefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
194 | */ | 195 | */ |
195 | static int valkyriefb_blank(int blank_mode, struct fb_info *info) | 196 | static int valkyriefb_blank(int blank_mode, struct fb_info *info) |
196 | { | 197 | { |
197 | struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info; | 198 | struct fb_info_valkyrie *p = |
199 | container_of(info, struct fb_info_valkyrie, info); | ||
198 | struct fb_par_valkyrie *par = info->par; | 200 | struct fb_par_valkyrie *par = info->par; |
199 | struct valkyrie_regvals *init = par->init; | 201 | struct valkyrie_regvals *init = par->init; |
200 | 202 | ||
@@ -226,7 +228,8 @@ static int valkyriefb_blank(int blank_mode, struct fb_info *info) | |||
226 | static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | 228 | static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, |
227 | u_int transp, struct fb_info *info) | 229 | u_int transp, struct fb_info *info) |
228 | { | 230 | { |
229 | struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info; | 231 | struct fb_info_valkyrie *p = |
232 | container_of(info, struct fb_info_valkyrie, info); | ||
230 | volatile struct cmap_regs __iomem *cmap_regs = p->cmap_regs; | 233 | volatile struct cmap_regs __iomem *cmap_regs = p->cmap_regs; |
231 | struct fb_par_valkyrie *par = info->par; | 234 | struct fb_par_valkyrie *par = info->par; |
232 | 235 | ||
@@ -263,10 +266,10 @@ static inline int valkyrie_vram_reqd(int video_mode, int color_mode) | |||
263 | 266 | ||
264 | static void set_valkyrie_clock(unsigned char *params) | 267 | static void set_valkyrie_clock(unsigned char *params) |
265 | { | 268 | { |
269 | #ifdef CONFIG_ADB_CUDA | ||
266 | struct adb_request req; | 270 | struct adb_request req; |
267 | int i; | 271 | int i; |
268 | 272 | ||
269 | #ifdef CONFIG_ADB_CUDA | ||
270 | for (i = 0; i < 3; ++i) { | 273 | for (i = 0; i < 3; ++i) { |
271 | cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC, | 274 | cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC, |
272 | 0x50, i + 1, params[i]); | 275 | 0x50, i + 1, params[i]); |
@@ -465,7 +468,8 @@ static int valkyrie_var_to_par(struct fb_var_screeninfo *var, | |||
465 | { | 468 | { |
466 | int vmode, cmode; | 469 | int vmode, cmode; |
467 | struct valkyrie_regvals *init; | 470 | struct valkyrie_regvals *init; |
468 | struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) fb_info; | 471 | struct fb_info_valkyrie *p = |
472 | container_of(fb_info, struct fb_info_valkyrie, info); | ||
469 | 473 | ||
470 | if (mac_var_to_vmode(var, &vmode, &cmode) != 0) { | 474 | if (mac_var_to_vmode(var, &vmode, &cmode) != 0) { |
471 | printk(KERN_ERR "valkyriefb: can't do %dx%dx%d.\n", | 475 | printk(KERN_ERR "valkyriefb: can't do %dx%dx%d.\n", |
diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c index 048a66640b03..5f930aeccf1f 100644 --- a/drivers/video/fbdev/vermilion/vermilion.c +++ b/drivers/video/fbdev/vermilion/vermilion.c | |||
@@ -481,7 +481,6 @@ static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
481 | default: | 481 | default: |
482 | err = -ENODEV; | 482 | err = -ENODEV; |
483 | goto out_err_1; | 483 | goto out_err_1; |
484 | break; | ||
485 | } | 484 | } |
486 | 485 | ||
487 | info = &vinfo->info; | 486 | info = &vinfo->info; |
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index 5c098d5b4043..32d8275e4c88 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c | |||
@@ -233,8 +233,7 @@ struct display_timings *of_get_display_timings(struct device_node *np) | |||
233 | return disp; | 233 | return disp; |
234 | 234 | ||
235 | timingfail: | 235 | timingfail: |
236 | if (native_mode) | 236 | of_node_put(native_mode); |
237 | of_node_put(native_mode); | ||
238 | display_timings_release(disp); | 237 | display_timings_release(disp); |
239 | disp = NULL; | 238 | disp = NULL; |
240 | entryfail: | 239 | entryfail: |