Lines Matching refs:gp
29 static int gfb_get_props(struct gfb_info *gp)
31 gp->width = of_getintprop_default(gp->of_node, "width", 0);
32 gp->height = of_getintprop_default(gp->of_node, "height", 0);
33 gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
35 if (!gp->width || !gp->height) {
37 gp->of_node);
70 static int gfb_set_fbinfo(struct gfb_info *gp)
72 struct fb_info *info = gp->info;
77 info->screen_base = gp->fb_base;
78 info->screen_size = gp->fb_size;
80 info->pseudo_palette = gp->pseudo_palette;
84 info->fix.smem_start = gp->fb_base_phys;
85 info->fix.smem_len = gp->fb_size;
87 if (gp->depth == 32 || gp->depth == 24)
92 var->xres = gp->width;
93 var->yres = gp->height;
96 var->bits_per_pixel = gp->depth;
119 struct gfb_info *gp;
128 gp = info->par;
129 gp->info = info;
130 gp->of_node = dp;
132 gp->fb_base_phys = op->resource[6].start;
134 err = gfb_get_props(gp);
140 gp->fb_size = info->fix.line_length * gp->height;
142 gp->fb_base = of_ioremap(&op->resource[6], 0,
143 gp->fb_size, "gfb fb");
144 if (!gp->fb_base) {
149 err = gfb_set_fbinfo(gp);
167 of_iounmap(&op->resource[6], gp->fb_base, gp->fb_size);