aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:49:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:49:07 -0400
commitb98adfccdf5f8dd34ae56a2d5adbe2c030bd4674 (patch)
tree1807a029520f550dd4f90c95ad0063bceb00d645 /drivers/video
parentba21fe71725f94792330ebc3034ef2b35a36276f (diff)
parent33573c0e3243aaa38b6ad96942de85a1b713c2ff (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (108 commits) sh: Fix occasional flush_cache_4096() stack corruption. sh: Calculate shm alignment at runtime. sh: dma-mapping compile fixes. sh: Initial vsyscall page support. sh: Clean up PAGE_SIZE definition for assembly use. sh: Selective flush_cache_mm() flushing. sh: More intelligent entry_mask/way_size calculation. sh: Support for L2 cache on newer SH-4A CPUs. sh: Update kexec support for API changes. sh: Optimized readsl()/writesl() support. sh: Report movli.l/movco.l capabilities. sh: CPU flags in AT_HWCAP in ELF auxvt. sh: Add support for 4K stacks. sh: Enable /proc/kcore support. sh: stack debugging support. sh: select CONFIG_EMBEDDED. sh: machvec rework. sh: Solution Engine SH7343 board support. sh: SH7710VoIPGW board support. sh: Enable verbose BUG() support. ...
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/hp680_bl.c4
-rw-r--r--drivers/video/console/Kconfig2
-rw-r--r--drivers/video/hitfb.c229
-rw-r--r--drivers/video/pvr2fb.c22
4 files changed, 197 insertions, 60 deletions
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index ffc72ae3ada8..fe1488374f62 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -20,7 +20,7 @@
20 20
21#include <asm/cpu/dac.h> 21#include <asm/cpu/dac.h>
22#include <asm/hp6xx/hp6xx.h> 22#include <asm/hp6xx/hp6xx.h>
23#include <asm/hd64461/hd64461.h> 23#include <asm/hd64461.h>
24 24
25#define HP680_MAX_INTENSITY 255 25#define HP680_MAX_INTENSITY 255
26#define HP680_DEFAULT_INTENSITY 10 26#define HP680_DEFAULT_INTENSITY 10
@@ -163,6 +163,6 @@ static void __exit hp680bl_exit(void)
163module_init(hp680bl_init); 163module_init(hp680bl_init);
164module_exit(hp680bl_exit); 164module_exit(hp680bl_exit);
165 165
166MODULE_AUTHOR("Andriy Skulysh <askulysh@image.kiev.ua>"); 166MODULE_AUTHOR("Andriy Skulysh <askulysh@gmail.com>");
167MODULE_DESCRIPTION("HP Jornada 680 Backlight Driver"); 167MODULE_DESCRIPTION("HP Jornada 680 Backlight Driver");
168MODULE_LICENSE("GPL"); 168MODULE_LICENSE("GPL");
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 4444bef68fba..aa3935df852a 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -6,7 +6,7 @@ menu "Console display driver support"
6 6
7config VGA_CONSOLE 7config VGA_CONSOLE
8 bool "VGA text console" if EMBEDDED || !X86 8 bool "VGA text console" if EMBEDDED || !X86
9 depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE 9 depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH
10 default y 10 default y
11 help 11 help
12 Saying Y here will allow you to use Linux in text mode through a 12 Saying Y here will allow you to use Linux in text mode through a
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index 4cc6b454265e..3afb472763c0 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -4,7 +4,7 @@
4 * (C) 1999 Mihai Spatar 4 * (C) 1999 Mihai Spatar
5 * (C) 2000 YAEGASHI Takeshi 5 * (C) 2000 YAEGASHI Takeshi
6 * (C) 2003, 2004 Paul Mundt 6 * (C) 2003, 2004 Paul Mundt
7 * (C) 2003, 2004 Andriy Skulysh 7 * (C) 2003, 2004, 2006 Andriy Skulysh
8 * 8 *
9 * This file is subject to the terms and conditions of the GNU General Public 9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for 10 * License. See the file COPYING in the main directory of this archive for
@@ -20,18 +20,16 @@
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/platform_device.h>
23#include <linux/fb.h> 24#include <linux/fb.h>
24 25
25#include <asm/machvec.h> 26#include <asm/machvec.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
27#include <asm/pgtable.h> 28#include <asm/pgtable.h>
28#include <asm/io.h> 29#include <asm/io.h>
29#include <asm/hd64461/hd64461.h> 30#include <asm/hd64461.h>
30
31#ifdef MACH_HP600
32#include <asm/cpu/dac.h> 31#include <asm/cpu/dac.h>
33#include <asm/hp6xx/hp6xx.h> 32#include <asm/hp6xx/hp6xx.h>
34#endif
35 33
36#define WIDTH 640 34#define WIDTH 640
37 35
@@ -45,7 +43,6 @@ static struct fb_var_screeninfo hitfb_var __initdata = {
45static struct fb_fix_screeninfo hitfb_fix __initdata = { 43static struct fb_fix_screeninfo hitfb_fix __initdata = {
46 .id = "Hitachi HD64461", 44 .id = "Hitachi HD64461",
47 .type = FB_TYPE_PACKED_PIXELS, 45 .type = FB_TYPE_PACKED_PIXELS,
48 .ypanstep = 8,
49 .accel = FB_ACCEL_NONE, 46 .accel = FB_ACCEL_NONE,
50}; 47};
51 48
@@ -73,26 +70,14 @@ static inline void hitfb_accel_set_dest(int truecolor, u16 dx, u16 dy,
73 if (truecolor) 70 if (truecolor)
74 saddr <<= 1; 71 saddr <<= 1;
75 72
76 fb_writew(width, HD64461_BBTDWR); 73 fb_writew(width-1, HD64461_BBTDWR);
77 fb_writew(height, HD64461_BBTDHR); 74 fb_writew(height-1, HD64461_BBTDHR);
78 75
79 fb_writew(saddr & 0xffff, HD64461_BBTDSARL); 76 fb_writew(saddr & 0xffff, HD64461_BBTDSARL);
80 fb_writew(saddr >> 16, HD64461_BBTDSARH); 77 fb_writew(saddr >> 16, HD64461_BBTDSARH);
81 78
82} 79}
83 80
84static inline void hitfb_accel_solidfill(int truecolor, u16 dx, u16 dy,
85 u16 width, u16 height, u16 color)
86{
87 hitfb_accel_set_dest(truecolor, dx, dy, width, height);
88
89 fb_writew(0x00f0, HD64461_BBTROPR);
90 fb_writew(16, HD64461_BBTMDR);
91 fb_writew(color, HD64461_GRSCR);
92
93 hitfb_accel_start(truecolor);
94}
95
96static inline void hitfb_accel_bitblt(int truecolor, u16 sx, u16 sy, u16 dx, 81static inline void hitfb_accel_bitblt(int truecolor, u16 sx, u16 sy, u16 dx,
97 u16 dy, u16 width, u16 height, u16 rop, 82 u16 dy, u16 width, u16 height, u16 rop,
98 u32 mask_addr) 83 u32 mask_addr)
@@ -100,6 +85,8 @@ static inline void hitfb_accel_bitblt(int truecolor, u16 sx, u16 sy, u16 dx,
100 u32 saddr, daddr; 85 u32 saddr, daddr;
101 u32 maddr = 0; 86 u32 maddr = 0;
102 87
88 height--;
89 width--;
103 fb_writew(rop, HD64461_BBTROPR); 90 fb_writew(rop, HD64461_BBTROPR);
104 if ((sy < dy) || ((sy == dy) && (sx <= dx))) { 91 if ((sy < dy) || ((sy == dy) && (sx <= dx))) {
105 saddr = WIDTH * (sy + height) + sx + width; 92 saddr = WIDTH * (sy + height) + sx + width;
@@ -146,6 +133,7 @@ static void hitfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
146 if (rect->rop != ROP_COPY) 133 if (rect->rop != ROP_COPY)
147 cfb_fillrect(p, rect); 134 cfb_fillrect(p, rect);
148 else { 135 else {
136 hitfb_accel_wait();
149 fb_writew(0x00f0, HD64461_BBTROPR); 137 fb_writew(0x00f0, HD64461_BBTROPR);
150 fb_writew(16, HD64461_BBTMDR); 138 fb_writew(16, HD64461_BBTMDR);
151 139
@@ -161,16 +149,15 @@ static void hitfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
161 rect->height); 149 rect->height);
162 hitfb_accel_start(0); 150 hitfb_accel_start(0);
163 } 151 }
164 hitfb_accel_wait();
165 } 152 }
166} 153}
167 154
168static void hitfb_copyarea(struct fb_info *p, const struct fb_copyarea *area) 155static void hitfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
169{ 156{
157 hitfb_accel_wait();
170 hitfb_accel_bitblt(p->var.bits_per_pixel == 16, area->sx, area->sy, 158 hitfb_accel_bitblt(p->var.bits_per_pixel == 16, area->sx, area->sy,
171 area->dx, area->dy, area->width, area->height, 159 area->dx, area->dy, area->width, area->height,
172 0x00cc, 0); 160 0x00cc, 0);
173 hitfb_accel_wait();
174} 161}
175 162
176static int hitfb_pan_display(struct fb_var_screeninfo *var, 163static int hitfb_pan_display(struct fb_var_screeninfo *var,
@@ -182,7 +169,7 @@ static int hitfb_pan_display(struct fb_var_screeninfo *var,
182 if (xoffset != 0) 169 if (xoffset != 0)
183 return -EINVAL; 170 return -EINVAL;
184 171
185 fb_writew(yoffset, HD64461_LCDCBAR); 172 fb_writew((yoffset*info->fix.line_length)>>10, HD64461_LCDCBAR);
186 173
187 return 0; 174 return 0;
188} 175}
@@ -192,12 +179,6 @@ int hitfb_blank(int blank_mode, struct fb_info *info)
192 unsigned short v; 179 unsigned short v;
193 180
194 if (blank_mode) { 181 if (blank_mode) {
195#ifdef MACH_HP600
196 sh_dac_disable(DAC_LCD_BRIGHTNESS);
197 v = fb_readw(HD64461_GPBDR);
198 v |= HD64461_GPBDR_LCDOFF;
199 fb_writew(v, HD64461_GPBDR);
200#endif
201 v = fb_readw(HD64461_LDR1); 182 v = fb_readw(HD64461_LDR1);
202 v &= ~HD64461_LDR1_DON; 183 v &= ~HD64461_LDR1_DON;
203 fb_writew(v, HD64461_LDR1); 184 fb_writew(v, HD64461_LDR1);
@@ -213,19 +194,18 @@ int hitfb_blank(int blank_mode, struct fb_info *info)
213 v = fb_readw(HD64461_STBCR); 194 v = fb_readw(HD64461_STBCR);
214 v &= ~HD64461_STBCR_SLCDST; 195 v &= ~HD64461_STBCR_SLCDST;
215 fb_writew(v, HD64461_STBCR); 196 fb_writew(v, HD64461_STBCR);
216#ifdef MACH_HP600
217 sh_dac_enable(DAC_LCD_BRIGHTNESS);
218 v = fb_readw(HD64461_GPBDR);
219 v &= ~HD64461_GPBDR_LCDOFF;
220 fb_writew(v, HD64461_GPBDR);
221#endif
222 v = fb_readw(HD64461_LDR1);
223 v |= HD64461_LDR1_DON;
224 fb_writew(v, HD64461_LDR1);
225 197
226 v = fb_readw(HD64461_LCDCCR); 198 v = fb_readw(HD64461_LCDCCR);
227 v &= ~HD64461_LCDCCR_MOFF; 199 v &= ~(HD64461_LCDCCR_MOFF | HD64461_LCDCCR_STREQ);
228 fb_writew(v, HD64461_LCDCCR); 200 fb_writew(v, HD64461_LCDCCR);
201
202 do {
203 v = fb_readw(HD64461_LCDCCR);
204 } while(v&HD64461_LCDCCR_STBACK);
205
206 v = fb_readw(HD64461_LDR1);
207 v |= HD64461_LDR1_DON;
208 fb_writew(v, HD64461_LDR1);
229 } 209 }
230 return 0; 210 return 0;
231} 211}
@@ -233,7 +213,7 @@ int hitfb_blank(int blank_mode, struct fb_info *info)
233static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green, 213static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green,
234 unsigned blue, unsigned transp, struct fb_info *info) 214 unsigned blue, unsigned transp, struct fb_info *info)
235{ 215{
236 if (regno >= info->cmap.len) 216 if (regno >= 256)
237 return 1; 217 return 1;
238 218
239 switch (info->var.bits_per_pixel) { 219 switch (info->var.bits_per_pixel) {
@@ -244,6 +224,8 @@ static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green,
244 fb_writew(blue >> 10, HD64461_CPTWDR); 224 fb_writew(blue >> 10, HD64461_CPTWDR);
245 break; 225 break;
246 case 16: 226 case 16:
227 if (regno >= 16)
228 return 1;
247 ((u32 *) (info->pseudo_palette))[regno] = 229 ((u32 *) (info->pseudo_palette))[regno] =
248 ((red & 0xf800)) | 230 ((red & 0xf800)) |
249 ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11); 231 ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11);
@@ -252,26 +234,113 @@ static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green,
252 return 0; 234 return 0;
253} 235}
254 236
237static int hitfb_sync(struct fb_info *info)
238{
239 hitfb_accel_wait();
240
241 return 0;
242}
243
244static int hitfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
245{
246 int maxy;
247
248 var->xres = info->var.xres;
249 var->xres_virtual = info->var.xres;
250 var->yres = info->var.yres;
251
252 if ((var->bits_per_pixel != 8) && (var->bits_per_pixel != 16))
253 var->bits_per_pixel = info->var.bits_per_pixel;
254
255 if (var->yres_virtual < var->yres)
256 var->yres_virtual = var->yres;
257
258 maxy = info->fix.smem_len / var->xres;
259
260 if (var->bits_per_pixel == 16)
261 maxy /= 2;
262
263 if (var->yres_virtual > maxy)
264 var->yres_virtual = maxy;
265
266 var->xoffset = 0;
267 var->yoffset = 0;
268
269 switch (var->bits_per_pixel) {
270 case 8:
271 var->red.offset = 0;
272 var->red.length = 8;
273 var->green.offset = 0;
274 var->green.length = 8;
275 var->blue.offset = 0;
276 var->blue.length = 8;
277 var->transp.offset = 0;
278 var->transp.length = 0;
279 break;
280 case 16: /* RGB 565 */
281 var->red.offset = 11;
282 var->red.length = 5;
283 var->green.offset = 5;
284 var->green.length = 6;
285 var->blue.offset = 0;
286 var->blue.length = 5;
287 var->transp.offset = 0;
288 var->transp.length = 0;
289 break;
290 }
291
292 return 0;
293}
294
295static int hitfb_set_par(struct fb_info *info)
296{
297 unsigned short ldr3;
298
299 switch (info->var.bits_per_pixel) {
300 case 8:
301 info->fix.line_length = info->var.xres;
302 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
303 info->fix.ypanstep = 16;
304 break;
305 case 16:
306 info->fix.line_length = info->var.xres*2;
307 info->fix.visual = FB_VISUAL_TRUECOLOR;
308 info->fix.ypanstep = 8;
309 break;
310 }
311
312 fb_writew(info->fix.line_length, HD64461_LCDCLOR);
313 ldr3 = fb_readw(HD64461_LDR3);
314 ldr3 &= ~15;
315 ldr3 |= (info->var.bits_per_pixel == 8) ? 4 : 8;
316 fb_writew(ldr3, HD64461_LDR3);
317 return 0;
318}
319
255static struct fb_ops hitfb_ops = { 320static struct fb_ops hitfb_ops = {
256 .owner = THIS_MODULE, 321 .owner = THIS_MODULE,
322 .fb_check_var = hitfb_check_var,
323 .fb_set_par = hitfb_set_par,
257 .fb_setcolreg = hitfb_setcolreg, 324 .fb_setcolreg = hitfb_setcolreg,
258 .fb_blank = hitfb_blank, 325 .fb_blank = hitfb_blank,
326 .fb_sync = hitfb_sync,
259 .fb_pan_display = hitfb_pan_display, 327 .fb_pan_display = hitfb_pan_display,
260 .fb_fillrect = hitfb_fillrect, 328 .fb_fillrect = hitfb_fillrect,
261 .fb_copyarea = hitfb_copyarea, 329 .fb_copyarea = hitfb_copyarea,
262 .fb_imageblit = cfb_imageblit, 330 .fb_imageblit = cfb_imageblit,
263}; 331};
264 332
265int __init hitfb_init(void) 333static int __init hitfb_probe(struct platform_device *dev)
266{ 334{
267 unsigned short lcdclor, ldr3, ldvndr; 335 unsigned short lcdclor, ldr3, ldvndr;
268 int size;
269 336
270 if (fb_get_options("hitfb", NULL)) 337 if (fb_get_options("hitfb", NULL))
271 return -ENODEV; 338 return -ENODEV;
272 339
340 hitfb_fix.mmio_start = CONFIG_HD64461_IOBASE+0x1000;
341 hitfb_fix.mmio_len = 0x1000;
273 hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000; 342 hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000;
274 hitfb_fix.smem_len = (MACH_HP690) ? 1024 * 1024 : 512 * 1024; 343 hitfb_fix.smem_len = 512 * 1024;
275 344
276 lcdclor = fb_readw(HD64461_LCDCLOR); 345 lcdclor = fb_readw(HD64461_LCDCLOR);
277 ldvndr = fb_readw(HD64461_LDVNDR); 346 ldvndr = fb_readw(HD64461_LDVNDR);
@@ -321,12 +390,12 @@ int __init hitfb_init(void)
321 fb_info.var = hitfb_var; 390 fb_info.var = hitfb_var;
322 fb_info.fix = hitfb_fix; 391 fb_info.fix = hitfb_fix;
323 fb_info.pseudo_palette = pseudo_palette; 392 fb_info.pseudo_palette = pseudo_palette;
324 fb_info.flags = FBINFO_DEFAULT; 393 fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
394 FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
325 395
326 fb_info.screen_base = (void *)hitfb_fix.smem_start; 396 fb_info.screen_base = (void *)hitfb_fix.smem_start;
327 397
328 size = (fb_info.var.bits_per_pixel == 8) ? 256 : 16; 398 fb_alloc_cmap(&fb_info.cmap, 256, 0);
329 fb_alloc_cmap(&fb_info.cmap, size, 0);
330 399
331 if (register_framebuffer(&fb_info) < 0) 400 if (register_framebuffer(&fb_info) < 0)
332 return -EINVAL; 401 return -EINVAL;
@@ -336,9 +405,75 @@ int __init hitfb_init(void)
336 return 0; 405 return 0;
337} 406}
338 407
408static int __devexit hitfb_remove(struct platform_device *dev)
409{
410 return unregister_framebuffer(&fb_info);
411}
412
413#ifdef CONFIG_PM
414static int hitfb_suspend(struct platform_device *dev, pm_message_t state)
415{
416 u16 v;
417
418 hitfb_blank(1,0);
419 v = fb_readw(HD64461_STBCR);
420 v |= HD64461_STBCR_SLCKE_IST;
421 fb_writew(v, HD64461_STBCR);
422
423 return 0;
424}
425
426static int hitfb_resume(struct platform_device *dev)
427{
428 u16 v;
429
430 v = fb_readw(HD64461_STBCR);
431 v &= ~HD64461_STBCR_SLCKE_OST;
432 msleep(100);
433 v = fb_readw(HD64461_STBCR);
434 v &= ~HD64461_STBCR_SLCKE_IST;
435 fb_writew(v, HD64461_STBCR);
436 hitfb_blank(0,0);
437
438 return 0;
439}
440#endif
441
442static struct platform_driver hitfb_driver = {
443 .probe = hitfb_probe,
444 .remove = __devexit_p(hitfb_remove),
445#ifdef CONFIG_PM
446 .suspend = hitfb_suspend,
447 .resume = hitfb_resume,
448#endif
449 .driver = {
450 .name = "hitfb",
451 },
452};
453
454static struct platform_device hitfb_device = {
455 .name = "hitfb",
456 .id = -1,
457};
458
459static int __init hitfb_init(void)
460{
461 int ret;
462
463 ret = platform_driver_register(&hitfb_driver);
464 if (!ret) {
465 ret = platform_device_register(&hitfb_device);
466 if (ret)
467 platform_driver_unregister(&hitfb_driver);
468 }
469 return ret;
470}
471
472
339static void __exit hitfb_exit(void) 473static void __exit hitfb_exit(void)
340{ 474{
341 unregister_framebuffer(&fb_info); 475 platform_device_unregister(&hitfb_device);
476 platform_driver_unregister(&hitfb_driver);
342} 477}
343 478
344module_init(hitfb_init); 479module_init(hitfb_init);
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index 940ba2be55e9..78dc59a1751b 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -187,7 +187,7 @@ static short do_blank = 0; /* (Un)Blank the screen */
187static unsigned int is_blanked = 0; /* Is the screen blanked? */ 187static unsigned int is_blanked = 0; /* Is the screen blanked? */
188 188
189#ifdef CONFIG_SH_STORE_QUEUES 189#ifdef CONFIG_SH_STORE_QUEUES
190static struct sq_mapping *pvr2fb_map; 190static unsigned long pvr2fb_map;
191#endif 191#endif
192 192
193#ifdef CONFIG_SH_DMA 193#ifdef CONFIG_SH_DMA
@@ -213,15 +213,17 @@ static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id, struct pt_regs *fp);
213static int pvr2_init_cable(void); 213static int pvr2_init_cable(void);
214static int pvr2_get_param(const struct pvr2_params *p, const char *s, 214static int pvr2_get_param(const struct pvr2_params *p, const char *s,
215 int val, int size); 215 int val, int size);
216#ifdef CONFIG_SH_DMA
216static ssize_t pvr2fb_write(struct file *file, const char *buf, 217static ssize_t pvr2fb_write(struct file *file, const char *buf,
217 size_t count, loff_t *ppos); 218 size_t count, loff_t *ppos);
219#endif
218 220
219static struct fb_ops pvr2fb_ops = { 221static struct fb_ops pvr2fb_ops = {
220 .owner = THIS_MODULE, 222 .owner = THIS_MODULE,
221 .fb_setcolreg = pvr2fb_setcolreg, 223 .fb_setcolreg = pvr2fb_setcolreg,
222 .fb_blank = pvr2fb_blank, 224 .fb_blank = pvr2fb_blank,
223 .fb_check_var = pvr2fb_check_var, 225 .fb_check_var = pvr2fb_check_var,
224 .fb_set_par = pvr2fb_set_par, 226 .fb_set_par = pvr2fb_set_par,
225#ifdef CONFIG_SH_DMA 227#ifdef CONFIG_SH_DMA
226 .fb_write = pvr2fb_write, 228 .fb_write = pvr2fb_write,
227#endif 229#endif
@@ -783,7 +785,7 @@ static int __init pvr2fb_common_init(void)
783 goto out_err; 785 goto out_err;
784 } 786 }
785 787
786 fb_memset((unsigned long)fb_info->screen_base, 0, pvr2_fix.smem_len); 788 fb_memset(fb_info->screen_base, 0, pvr2_fix.smem_len);
787 789
788 pvr2_fix.ypanstep = nopan ? 0 : 1; 790 pvr2_fix.ypanstep = nopan ? 0 : 1;
789 pvr2_fix.ywrapstep = nowrap ? 0 : 1; 791 pvr2_fix.ywrapstep = nowrap ? 0 : 1;
@@ -820,7 +822,7 @@ static int __init pvr2fb_common_init(void)
820 modememused >> 10, (unsigned long)(fb_info->fix.smem_len >> 10)); 822 modememused >> 10, (unsigned long)(fb_info->fix.smem_len >> 10));
821 printk("fb%d: Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n", 823 printk("fb%d: Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n",
822 fb_info->node, fb_info->var.xres, fb_info->var.yres, 824 fb_info->node, fb_info->var.xres, fb_info->var.yres,
823 fb_info->var.bits_per_pixel, 825 fb_info->var.bits_per_pixel,
824 get_line_length(fb_info->var.xres, fb_info->var.bits_per_pixel), 826 get_line_length(fb_info->var.xres, fb_info->var.bits_per_pixel),
825 (char *)pvr2_get_param(cables, NULL, cable_type, 3), 827 (char *)pvr2_get_param(cables, NULL, cable_type, 3),
826 (char *)pvr2_get_param(outputs, NULL, video_output, 3)); 828 (char *)pvr2_get_param(outputs, NULL, video_output, 3));
@@ -829,10 +831,10 @@ static int __init pvr2fb_common_init(void)
829 printk(KERN_NOTICE "fb%d: registering with SQ API\n", fb_info->node); 831 printk(KERN_NOTICE "fb%d: registering with SQ API\n", fb_info->node);
830 832
831 pvr2fb_map = sq_remap(fb_info->fix.smem_start, fb_info->fix.smem_len, 833 pvr2fb_map = sq_remap(fb_info->fix.smem_start, fb_info->fix.smem_len,
832 fb_info->fix.id); 834 fb_info->fix.id, pgprot_val(PAGE_SHARED));
833 835
834 printk(KERN_NOTICE "fb%d: Mapped video memory to SQ addr 0x%lx\n", 836 printk(KERN_NOTICE "fb%d: Mapped video memory to SQ addr 0x%lx\n",
835 fb_info->node, pvr2fb_map->sq_addr); 837 fb_info->node, pvr2fb_map);
836#endif 838#endif
837 839
838 return 0; 840 return 0;