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