Lines Matching refs:p
49 #define mmio_base (p->screen_base + 0x400000)
55 static void mm_write_xr(struct fb_info *p, u8 reg, u8 data) in mm_write_xr() argument
59 #define write_xr(num, val) mm_write_xr(p, num, val)
61 static void mm_write_fr(struct fb_info *p, u8 reg, u8 data) in mm_write_fr() argument
65 #define write_fr(num, val) mm_write_fr(p, num, val)
67 static void mm_write_cr(struct fb_info *p, u8 reg, u8 data) in mm_write_cr() argument
71 #define write_cr(num, val) mm_write_cr(p, num, val)
73 static void mm_write_gr(struct fb_info *p, u8 reg, u8 data) in mm_write_gr() argument
77 #define write_gr(num, val) mm_write_gr(p, num, val)
79 static void mm_write_sr(struct fb_info *p, u8 reg, u8 data) in mm_write_sr() argument
83 #define write_sr(num, val) mm_write_sr(p, num, val)
85 static void mm_write_ar(struct fb_info *p, u8 reg, u8 data) in mm_write_ar() argument
90 #define write_ar(num, val) mm_write_ar(p, num, val)
173 static void asiliant_set_timing(struct fb_info *p) in asiliant_set_timing() argument
175 unsigned hd = p->var.xres / 8; in asiliant_set_timing()
176 unsigned hs = (p->var.xres + p->var.right_margin) / 8; in asiliant_set_timing()
177 unsigned he = (p->var.xres + p->var.right_margin + p->var.hsync_len) / 8; in asiliant_set_timing()
178 unsigned ht = (p->var.left_margin + p->var.xres + p->var.right_margin + p->var.hsync_len) / 8; in asiliant_set_timing()
179 unsigned vd = p->var.yres; in asiliant_set_timing()
180 unsigned vs = p->var.yres + p->var.lower_margin; in asiliant_set_timing()
181 unsigned ve = p->var.yres + p->var.lower_margin + p->var.vsync_len; in asiliant_set_timing()
182 unsigned vt = p->var.upper_margin + p->var.yres + p->var.lower_margin + p->var.vsync_len; in asiliant_set_timing()
183 unsigned wd = (p->var.xres_virtual * ((p->var.bits_per_pixel+7)/8)) / 8; in asiliant_set_timing()
185 if ((p->var.xres == 640) && (p->var.yres == 480) && (p->var.pixclock == 39722)) { in asiliant_set_timing()
217 if (p->var.xres == 640) { in asiliant_set_timing()
225 struct fb_info *p) in asiliantfb_check_var() argument
271 static int asiliantfb_set_par(struct fb_info *p) in asiliantfb_set_par() argument
278 asiliant_calc_dclk2(&p->var.pixclock, &dclk2_m, &dclk2_n, &dclk2_div); in asiliantfb_set_par()
281 if (p->var.bits_per_pixel == 24) { in asiliantfb_set_par()
285 } else if (p->var.bits_per_pixel == 16) { in asiliantfb_set_par()
286 if (p->var.red.offset == 11) in asiliantfb_set_par()
292 } else if (p->var.bits_per_pixel == 8) { in asiliantfb_set_par()
298 p->fix.line_length = p->var.xres * (p->var.bits_per_pixel >> 3); in asiliantfb_set_par()
299 p->fix.visual = (p->var.bits_per_pixel == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; in asiliantfb_set_par()
304 asiliant_set_timing(p); in asiliantfb_set_par()
309 u_int transp, struct fb_info *p) in asiliantfb_setcolreg() argument
325 switch(p->var.red.offset) { in asiliantfb_setcolreg()
327 ((u32 *)(p->pseudo_palette))[regno] = in asiliantfb_setcolreg()
333 ((u32 *)(p->pseudo_palette))[regno] = in asiliantfb_setcolreg()
339 ((u32 *)(p->pseudo_palette))[regno] = in asiliantfb_setcolreg()
456 static void chips_hw_init(struct fb_info *p) in chips_hw_init() argument
509 static int init_asiliant(struct fb_info *p, unsigned long addr) in init_asiliant() argument
513 p->fix = asiliantfb_fix; in init_asiliant()
514 p->fix.smem_start = addr; in init_asiliant()
515 p->var = asiliantfb_var; in init_asiliant()
516 p->fbops = &asiliantfb_ops; in init_asiliant()
518 err = fb_alloc_cmap(&p->cmap, 256, 0); in init_asiliant()
524 err = register_framebuffer(p); in init_asiliant()
527 fb_dealloc_cmap(&p->cmap); in init_asiliant()
531 fb_info(p, "Asiliant 69000 frame buffer (%dK RAM detected)\n", in init_asiliant()
532 p->fix.smem_len / 1024); in init_asiliant()
535 chips_hw_init(p); in init_asiliant()
543 struct fb_info *p; in asiliantfb_pci_init() local
559 p = framebuffer_alloc(sizeof(u32) * 16, &dp->dev); in asiliantfb_pci_init()
560 if (!p) { in asiliantfb_pci_init()
564 p->pseudo_palette = p->par; in asiliantfb_pci_init()
565 p->par = NULL; in asiliantfb_pci_init()
567 p->screen_base = ioremap(addr, 0x800000); in asiliantfb_pci_init()
568 if (p->screen_base == NULL) { in asiliantfb_pci_init()
570 framebuffer_release(p); in asiliantfb_pci_init()
575 writeb(3, p->screen_base + 0x400784); in asiliantfb_pci_init()
577 err = init_asiliant(p, addr); in asiliantfb_pci_init()
579 iounmap(p->screen_base); in asiliantfb_pci_init()
581 framebuffer_release(p); in asiliantfb_pci_init()
585 pci_set_drvdata(dp, p); in asiliantfb_pci_init()
591 struct fb_info *p = pci_get_drvdata(dp); in asiliantfb_remove() local
593 unregister_framebuffer(p); in asiliantfb_remove()
594 fb_dealloc_cmap(&p->cmap); in asiliantfb_remove()
595 iounmap(p->screen_base); in asiliantfb_remove()
597 framebuffer_release(p); in asiliantfb_remove()