DSS2: Allocated memory for Color Look-up-table
authorVaibhav Hiremath <hvaibhav@ti.com>
Tue, 31 Mar 2009 13:08:31 +0000 (18:38 +0530)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 1 May 2009 16:44:58 +0000 (19:44 +0300)
We were not allocating memory for CMAP buffer and due to that
G_CMAP was failing, since it does check for size of CMAP buffer.

Called "fb_alloc_cmap" for llocating memory for CMAP.

We are currently not supporting 1,2,4,8 bpp, so meaning less
for us as of now. But for completeness this is required.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
drivers/video/omap2/omapfb/omapfb-main.c

index 44febef..afe40a9 100644 (file)
@@ -1525,6 +1525,11 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
                goto err;
 
        set_fb_fix(fbi);
                goto err;
 
        set_fb_fix(fbi);
+
+       r = fb_alloc_cmap(&fbi->cmap, 256, 0);
+       if (r)
+               dev_err(fbdev->dev, "unable to allocate color map memory\n");
+
 err:
        return r;
 }
 err:
        return r;
 }