Lines Matching full:fb

11 #include <linux/fb.h>
32 #define DRIVER_NAME "wm8505-fb"
35 struct wm8505fb_info, fb)
37 struct fb_info fb; member
54 writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR); in wm8505fb_init_hw()
55 writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR1); in wm8505fb_init_hw()
205 switch (fbi->fb.fix.visual) { in wm8505fb_setcolreg()
210 val = chan_to_field(red, &fbi->fb.var.red); in wm8505fb_setcolreg()
211 val |= chan_to_field(green, &fbi->fb.var.green); in wm8505fb_setcolreg()
212 val |= chan_to_field(blue, &fbi->fb.var.blue); in wm8505fb_setcolreg()
281 strcpy(fbi->fb.fix.id, DRIVER_NAME); in wm8505fb_probe()
283 fbi->fb.fix.type = FB_TYPE_PACKED_PIXELS; in wm8505fb_probe()
284 fbi->fb.fix.xpanstep = 1; in wm8505fb_probe()
285 fbi->fb.fix.ypanstep = 1; in wm8505fb_probe()
286 fbi->fb.fix.ywrapstep = 0; in wm8505fb_probe()
287 fbi->fb.fix.accel = FB_ACCEL_NONE; in wm8505fb_probe()
289 fbi->fb.fbops = &wm8505fb_ops; in wm8505fb_probe()
290 fbi->fb.flags = FBINFO_HWACCEL_COPYAREA in wm8505fb_probe()
296 fbi->fb.node = -1; in wm8505fb_probe()
300 fbi->fb.pseudo_palette = addr; in wm8505fb_probe()
318 fb_videomode_to_var(&fbi->fb.var, &mode); in wm8505fb_probe()
320 fbi->fb.var.nonstd = 0; in wm8505fb_probe()
321 fbi->fb.var.activate = FB_ACTIVATE_NOW; in wm8505fb_probe()
323 fbi->fb.var.height = -1; in wm8505fb_probe()
324 fbi->fb.var.width = -1; in wm8505fb_probe()
335 fbi->fb.var.xres_virtual = mode.xres; in wm8505fb_probe()
336 fbi->fb.var.yres_virtual = mode.yres * 2; in wm8505fb_probe()
337 fbi->fb.var.bits_per_pixel = bpp; in wm8505fb_probe()
339 fbi->fb.fix.smem_start = fb_mem_phys; in wm8505fb_probe()
340 fbi->fb.fix.smem_len = fb_mem_len; in wm8505fb_probe()
341 fbi->fb.screen_buffer = fb_mem_virt; in wm8505fb_probe()
342 fbi->fb.screen_size = fb_mem_len; in wm8505fb_probe()
345 ret = wm8505fb_set_par(&fbi->fb); in wm8505fb_probe()
351 if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { in wm8505fb_probe()
356 wm8505fb_init_hw(&fbi->fb); in wm8505fb_probe()
360 ret = register_framebuffer(&fbi->fb); in wm8505fb_probe()
364 if (fbi->fb.cmap.len) in wm8505fb_probe()
365 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_probe()
369 fb_info(&fbi->fb, "%s frame buffer at 0x%lx-0x%lx\n", in wm8505fb_probe()
370 fbi->fb.fix.id, fbi->fb.fix.smem_start, in wm8505fb_probe()
371 fbi->fb.fix.smem_start + fbi->fb.fix.smem_len - 1); in wm8505fb_probe()
380 unregister_framebuffer(&fbi->fb); in wm8505fb_remove()
384 if (fbi->fb.cmap.len) in wm8505fb_remove()
385 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_remove()
389 { .compatible = "wm,wm8505-fb", },