Lines Matching +full:0 +full:- +full:9 +full:a +full:- +full:z

2  *  linux/drivers/video/fm2fb.c -- BSC FrameMaster II/Rainbow II frame buffer
5 * Copyright (C) 1998 Steffen A. Mork (linux-dev@morknet.de)
8 * Written for 2.0.x by Steffen A. Mork
27 * The BSC FrameMaster II (or Rainbow II) is a simple very dumb
35 * - PAL/NTSC
36 * - interlaced/non interlaced
37 * - composite sync/sync/sync over green
40 * - 768x576 (PAL)
41 * - 768x480 (NTSC)
53 * At relative address 0x1ffff8 of the frame buffers base address
54 * there exists a control register with the number of
58 * 0 1 0=interlaced/1=non interlaced
59 * 1 2 0=video out disabled/1=video out enabled
60 * 2 4 0=normal mode as jumpered via JP8/1=complement mode
61 * 3 8 0=read onboard ROM/1 normal operation (required)
67 * JP1 interlace selection (1-2 non interlaced/2-3 interlaced)
70 * JP4 modulate composite sync on green output (1-2 composite
71 * sync on green channel/2-3 normal composite sync)
73 * a white screen
74 * JP6 sync creation (1-2 composite sync/2-3 H-sync output)
75 * JP8 video mode (1-2 PAL/2-3 NTSC)
78 * FrameMaster II to a normal TV via SCART connector:
79 * JP1: 2-3
80 * JP4: 2-3
81 * JP6: 2-3
82 * JP8: 1-2 (means PAL for Europe)
89 * to a future X server. Except the pixel clock is really
92 * 9 pin female video connector:
97 * 4 H-sync TTL
98 * 5 V-sync TTL
102 * 9 ground
105 * The FrameMaster II was not designed to display a console
107 * color images. Imagine: When scroll up a text line there
110 * over the slow 16 bit wide Zorro2 bus! A scroll of one
112 * driver - he is at the limit!
120 #define FRAMEMASTER_SIZE 0x200000
121 #define FRAMEMASTER_REG 0x1ffff8
139 static int fm2fb_mode = -1;
141 #define FM2FB_MODE_PAL 0
147 768, 576, 768, 576, 0, 0, 32, 0,
148 { 16, 8, 0 }, { 8, 8, 0 }, { 0, 8, 0 }, { 24, 8, 0 },
149 0, FB_ACTIVATE_NOW, -1, -1, FB_ACCEL_NONE,
150 33333, 10, 102, 10, 5, 80, 34, FB_SYNC_COMP_HIGH_ACT, 0
152 /* 768 x 480, 32 bpp (NTSC - not supported yet */
153 768, 480, 768, 480, 0, 0, 32, 0,
154 { 16, 8, 0 }, { 8, 8, 0 }, { 0, 8, 0 }, { 24, 8, 0 },
155 0, FB_ACTIVATE_NOW, -1, -1, FB_ACCEL_NONE,
156 33333, 10, 102, 10, 5, 80, 34, FB_SYNC_COMP_HIGH_ACT, 0
184 fm2fb_reg[0] = t; in fm2fb_blank()
185 return 0; in fm2fb_blank()
189 * Set a single color register. The values supplied are already
191 * entries in the var structure). Return != 0 for invalid regno.
201 ((u32*)(info->pseudo_palette))[regno] = (red << 16) | in fm2fb_setcolreg()
205 return 0; in fm2fb_setcolreg()
212 static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id);
217 { 0 }
227 static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id) in fm2fb_probe() argument
234 is_fm = z->id == ZORRO_PROD_BSC_FRAMEMASTER_II; in fm2fb_probe()
236 if (!zorro_request_device(z,"fm2fb")) in fm2fb_probe()
237 return -ENXIO; in fm2fb_probe()
239 info = framebuffer_alloc(16 * sizeof(u32), &z->dev); in fm2fb_probe()
241 zorro_release_device(z); in fm2fb_probe()
242 return -ENOMEM; in fm2fb_probe()
245 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { in fm2fb_probe()
247 zorro_release_device(z); in fm2fb_probe()
248 return -ENOMEM; in fm2fb_probe()
252 fb_fix.smem_start = zorro_resource_start(z); in fm2fb_probe()
253 info->screen_base = ioremap(fb_fix.smem_start, FRAMEMASTER_SIZE); in fm2fb_probe()
255 fm2fb_reg = (unsigned char *)(info->screen_base+FRAMEMASTER_REG); in fm2fb_probe()
261 for (y = 0; y < 576; y++) { in fm2fb_probe()
262 for (x = 0; x < 96; x++) *ptr++ = 0xffffff;/* white */ in fm2fb_probe()
263 for (x = 0; x < 96; x++) *ptr++ = 0xffff00;/* yellow */ in fm2fb_probe()
264 for (x = 0; x < 96; x++) *ptr++ = 0x00ffff;/* cyan */ in fm2fb_probe()
265 for (x = 0; x < 96; x++) *ptr++ = 0x00ff00;/* green */ in fm2fb_probe()
266 for (x = 0; x < 96; x++) *ptr++ = 0xff00ff;/* magenta */ in fm2fb_probe()
267 for (x = 0; x < 96; x++) *ptr++ = 0xff0000;/* red */ in fm2fb_probe()
268 for (x = 0; x < 96; x++) *ptr++ = 0x0000ff;/* blue */ in fm2fb_probe()
269 for (x = 0; x < 96; x++) *ptr++ = 0x000000;/* black */ in fm2fb_probe()
271 fm2fb_blank(0, info); in fm2fb_probe()
273 if (fm2fb_mode == -1) in fm2fb_probe()
276 info->fbops = &fm2fb_ops; in fm2fb_probe()
277 info->var = fb_var_modes[fm2fb_mode]; in fm2fb_probe()
278 info->pseudo_palette = info->par; in fm2fb_probe()
279 info->par = NULL; in fm2fb_probe()
280 info->fix = fb_fix; in fm2fb_probe()
282 if (register_framebuffer(info) < 0) { in fm2fb_probe()
283 fb_dealloc_cmap(&info->cmap); in fm2fb_probe()
284 iounmap(info->screen_base); in fm2fb_probe()
286 zorro_release_device(z); in fm2fb_probe()
287 return -EINVAL; in fm2fb_probe()
290 return 0; in fm2fb_probe()
298 return 0; in fm2fb_setup()
306 return 0; in fm2fb_setup()
314 return -ENODEV; in fm2fb_init()