Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static struct fb_info* mxcfb_init_fbinfo ( struct device *  dev,
struct fb_ops *  ops 
) [static, read]

Initializes the framebuffer information pointer. After allocating sufficient memory for the framebuffer structure, the fields are filled with custom information passed in from the configurable structures. This includes information such as bits per pixel, color maps, screen width/height and RGBA offsets.

Framebuffer structure initialized with our information

Definition at line 933 of file mxcfb_epson.c.

References mxcfb_info::pseudo_palette.

      struct fb_info *fbi;
      struct mxcfb_info *mxcfbi;

       * Allocate sufficient memory for the fb structure
      fbi = framebuffer_alloc(sizeof(struct mxcfb_info), dev);
      if (!fbi)
            return NULL;

      mxcfbi = (struct mxcfb_info *)fbi->par;

       * Fill in fb_info structure information
      fbi->var.xres = fbi->var.xres_virtual = MXCFB_SCREEN_WIDTH;
      fbi->var.yres = fbi->var.yres_virtual = MXCFB_SCREEN_HEIGHT;
      fbi->var.activate = FB_ACTIVATE_NOW;
      mxcfb_check_var(&fbi->var, fbi);


      fbi->fbops = ops;
      fbi->flags = FBINFO_FLAG_DEFAULT;
      fbi->pseudo_palette = mxcfbi->pseudo_palette;

       * Allocate colormap
      fb_alloc_cmap(&fbi->cmap, 16, 0);

      return fbi;

Generated by  Doxygen 1.6.0   Back to index