Lines Matching +full:0 +full:x3b0
23 * module parameter 'nologo={0|1}'
25 * - Revision 0.1.0 (6 Dec 1999): faster scrolling and minor fixes
47 #if 0
53 #if 0
65 #define HGA_TXT 0
73 static int hga_mode = -1; /* 0 = txt, 1 = gfx mode */
78 #define HGA_INDEX_PORT 0x3b4 /* Register select port */
79 #define HGA_VALUE_PORT 0x3b5 /* Register value port */
80 #define HGA_MODE_PORT 0x3b8 /* Mode control port */
81 #define HGA_STATUS_PORT 0x3ba /* Status and Config port */
82 #define HGA_GFX_PORT 0x3bf /* Graphics control port */
86 #define HGA_CURSOR_BLINKING 0x00
87 #define HGA_CURSOR_OFF 0x20
88 #define HGA_CURSOR_SLOWBLINK 0x60
90 #define HGA_MODE_GRAPHICS 0x02
91 #define HGA_MODE_VIDEO_EN 0x08
92 #define HGA_MODE_BLINK_EN 0x20
93 #define HGA_MODE_GFX_PAGE1 0x80
95 #define HGA_STATUS_HSYNC 0x01
96 #define HGA_STATUS_VSYNC 0x80
97 #define HGA_STATUS_VIDEO 0x08
99 #define HGA_CONFIG_COL132 0x08
100 #define HGA_GFX_MODE_EN 0x01
101 #define HGA_GFX_PAGE_EN 0x02
115 .red = {0, 1, 0},
116 .green = {0, 1, 0},
117 .blue = {0, 1, 0},
118 .transp = {0, 0, 0},
134 static int release_io_port = 0;
135 static int release_io_ports = 0;
136 static bool nologo = 0;
153 outb_p(reg+1, HGA_INDEX_PORT); outb_p(val & 0xff, HGA_VALUE_PORT); in write_hga_w()
166 unsigned char fillchar = 0xbf; /* magic */ in hga_clear_screen()
173 fillchar = 0x00; in hga_clear_screen()
175 if (fillchar != 0xbf) in hga_clear_screen()
185 outb_p(0x00, HGA_GFX_PORT); in hga_txt_mode()
186 outb_p(0x00, HGA_STATUS_PORT); in hga_txt_mode()
188 write_hga_b(0x61, 0x00); /* horizontal total */ in hga_txt_mode()
189 write_hga_b(0x50, 0x01); /* horizontal displayed */ in hga_txt_mode()
190 write_hga_b(0x52, 0x02); /* horizontal sync pos */ in hga_txt_mode()
191 write_hga_b(0x0f, 0x03); /* horizontal sync width */ in hga_txt_mode()
193 write_hga_b(0x19, 0x04); /* vertical total */ in hga_txt_mode()
194 write_hga_b(0x06, 0x05); /* vertical total adjust */ in hga_txt_mode()
195 write_hga_b(0x19, 0x06); /* vertical displayed */ in hga_txt_mode()
196 write_hga_b(0x19, 0x07); /* vertical sync pos */ in hga_txt_mode()
198 write_hga_b(0x02, 0x08); /* interlace mode */ in hga_txt_mode()
199 write_hga_b(0x0d, 0x09); /* maximum scanline */ in hga_txt_mode()
200 write_hga_b(0x0c, 0x0a); /* cursor start */ in hga_txt_mode()
201 write_hga_b(0x0d, 0x0b); /* cursor end */ in hga_txt_mode()
203 write_hga_w(0x0000, 0x0c); /* start address */ in hga_txt_mode()
204 write_hga_w(0x0000, 0x0e); /* cursor location */ in hga_txt_mode()
215 outb_p(0x00, HGA_STATUS_PORT); in hga_gfx_mode()
219 write_hga_b(0x35, 0x00); /* horizontal total */ in hga_gfx_mode()
220 write_hga_b(0x2d, 0x01); /* horizontal displayed */ in hga_gfx_mode()
221 write_hga_b(0x2e, 0x02); /* horizontal sync pos */ in hga_gfx_mode()
222 write_hga_b(0x07, 0x03); /* horizontal sync width */ in hga_gfx_mode()
224 write_hga_b(0x5b, 0x04); /* vertical total */ in hga_gfx_mode()
225 write_hga_b(0x02, 0x05); /* vertical total adjust */ in hga_gfx_mode()
226 write_hga_b(0x57, 0x06); /* vertical displayed */ in hga_gfx_mode()
227 write_hga_b(0x57, 0x07); /* vertical sync pos */ in hga_gfx_mode()
229 write_hga_b(0x02, 0x08); /* interlace mode */ in hga_gfx_mode()
230 write_hga_b(0x03, 0x09); /* maximum scanline */ in hga_gfx_mode()
231 write_hga_b(0x00, 0x0a); /* cursor start */ in hga_gfx_mode()
232 write_hga_b(0x00, 0x0b); /* cursor end */ in hga_gfx_mode()
234 write_hga_w(0x0000, 0x0c); /* start address */ in hga_gfx_mode()
235 write_hga_w(0x0000, 0x0e); /* cursor location */ in hga_gfx_mode()
249 for (x = 0; x < 10 ; x++) in hga_show_logo()
261 write_hga_w(base, 0x0c); /* start address */ in hga_pan()
272 outb_p(0x00, HGA_MODE_PORT); /* disable video */ in hga_blank()
281 int count = 0; in hga_card_detect()
285 hga_vram_len = 0x08000; in hga_card_detect()
287 hga_vram = ioremap(0xb0000, hga_vram_len); in hga_card_detect()
291 if (request_region(0x3b0, 12, "hgafb")) in hga_card_detect()
293 if (request_region(0x3bf, 1, "hgafb")) in hga_card_detect()
299 q = hga_vram + 0x01000; in hga_card_detect()
303 writew(0xaa55, p); if (readw(p) == 0xaa55) count++; in hga_card_detect()
304 writew(0x55aa, p); if (readw(p) == 0x55aa) count++; in hga_card_detect()
314 if (!test_hga_b(0x66, 0x0f)) /* cursor low register */ in hga_card_detect()
317 if (!test_hga_b(0x99, 0x0f)) /* cursor low register */ in hga_card_detect()
327 for (count=0; count < 50000 && p_save == q_save; count++) { in hga_card_detect()
335 switch (inb_p(HGA_STATUS_PORT) & 0x70) { in hga_card_detect()
336 case 0x10: in hga_card_detect()
340 case 0x50: in hga_card_detect()
349 return 0; in hga_card_detect()
352 release_region(0x3b0, 12); in hga_card_detect()
354 release_region(0x3bf, 1); in hga_card_detect()
368 * Returns: %0
376 return 0; in hgafb_open()
384 * Returns: %0
391 return 0; in hgafb_release()
407 * Returns: %0
415 return 0; in hgafb_setcolreg()
427 * Returns: %0 on success or %-EINVAL for failure.
445 return 0; in hgafb_pan_display()
453 * Blank the screen if blank_mode != 0, else unblank.
460 * Returns: %0
466 return 0; in hgafb_blank()
532 for (x = 0; x < image->width; x+= 8) { in hgafb_imageblit()
578 info = framebuffer_alloc(0, &pdev->dev); in hgafb_probe()
590 info->monspecs.hfmin = 0; in hgafb_probe()
591 info->monspecs.hfmax = 0; in hgafb_probe()
594 info->monspecs.dpms = 0; in hgafb_probe()
598 if (register_framebuffer(info) < 0) { in hgafb_probe()
606 return 0; in hgafb_probe()
624 release_region(0x3b0, 12); in hgafb_remove()
627 release_region(0x3bf, 1); in hgafb_remove()
650 hgafb_device = platform_device_register_simple("hgafb", 0, NULL, 0); in hgafb_init()
677 module_param(nologo, bool, 0);
678 MODULE_PARM_DESC(nologo, "Disables startup logo if != 0 (default=0)");