Lines Matching full:gp
30 static int gfb_get_props(struct gfb_info *gp) in gfb_get_props() argument
32 gp->width = of_getintprop_default(gp->of_node, "width", 0); in gfb_get_props()
33 gp->height = of_getintprop_default(gp->of_node, "height", 0); in gfb_get_props()
34 gp->depth = of_getintprop_default(gp->of_node, "depth", 32); in gfb_get_props()
36 if (!gp->width || !gp->height) { in gfb_get_props()
38 gp->of_node); in gfb_get_props()
69 static int gfb_set_fbinfo(struct gfb_info *gp) in gfb_set_fbinfo() argument
71 struct fb_info *info = gp->info; in gfb_set_fbinfo()
75 info->screen_base = gp->fb_base; in gfb_set_fbinfo()
76 info->screen_size = gp->fb_size; in gfb_set_fbinfo()
78 info->pseudo_palette = gp->pseudo_palette; in gfb_set_fbinfo()
82 info->fix.smem_start = gp->fb_base_phys; in gfb_set_fbinfo()
83 info->fix.smem_len = gp->fb_size; in gfb_set_fbinfo()
85 if (gp->depth == 32 || gp->depth == 24) in gfb_set_fbinfo()
90 var->xres = gp->width; in gfb_set_fbinfo()
91 var->yres = gp->height; in gfb_set_fbinfo()
94 var->bits_per_pixel = gp->depth; in gfb_set_fbinfo()
117 struct gfb_info *gp; in gfb_probe() local
126 gp = info->par; in gfb_probe()
127 gp->info = info; in gfb_probe()
128 gp->of_node = dp; in gfb_probe()
130 gp->fb_base_phys = op->resource[6].start; in gfb_probe()
132 err = gfb_get_props(gp); in gfb_probe()
138 gp->fb_size = info->fix.line_length * gp->height; in gfb_probe()
140 gp->fb_base = of_ioremap(&op->resource[6], 0, in gfb_probe()
141 gp->fb_size, "gfb fb"); in gfb_probe()
142 if (!gp->fb_base) { in gfb_probe()
147 err = gfb_set_fbinfo(gp); in gfb_probe()
165 of_iounmap(&op->resource[6], gp->fb_base, gp->fb_size); in gfb_probe()