aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Fekete <robert.fekete@stericsson.com>2011-07-01 11:28:05 +0200
committerJonas ABERG <jonas.aberg@stericsson.com>2011-07-04 07:45:08 +0200
commit44769ff573210e4022dd289f008388979d12835b (patch)
tree360d0c71313f9657c945cb5e7342e3a23a633b09
parentd44d6785e88e43240948ecb6a5a0f2eee788e7e2 (diff)
downloadlinux-2.6.38-lt-ux500-44769ff573210e4022dd289f008388979d12835b.tar.gz
video: mcde: Add fake color map functionality
Implements a non functional cmap functionality in order to make X11/fbdev happy. Lack of functionality will make no difference on modern panels due to the fact that most panels use 16 or more bits for color depth anyway. Corresponds to bug 803814 on Linaro-ubuntu ST-Ericsson ID: N/A ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: Not tested, ER 282779 Change-Id: I9080b6879641ebc2f051204a630ae152f8d73fc1 Signed-off-by: Robert Fekete <robert.fekete@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26353 Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r--drivers/video/mcde/mcde_fb.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/video/mcde/mcde_fb.c b/drivers/video/mcde/mcde_fb.c
index 3b464cd8024..a69b18e6a32 100644
--- a/drivers/video/mcde/mcde_fb.c
+++ b/drivers/video/mcde/mcde_fb.c
@@ -562,6 +562,23 @@ static int mcde_fb_set_par(struct fb_info *fbi)
return apply_var(fbi, fb_to_display(fbi));
}
+static int mcde_fb_setcolreg(unsigned regno, unsigned red, unsigned green,
+ unsigned blue, unsigned transp, struct fb_info *fbi)
+{
+ dev_vdbg(fbi->dev, "%s\n", __func__);
+
+ /*Nothing to see here, move along*/
+ return 0;
+}
+
+static int mcde_fb_setcmap(struct fb_cmap *cmap, struct fb_info *fbi)
+{
+ dev_vdbg(fbi->dev, "%s\n", __func__);
+
+ /*Nothing to see here, move along*/
+ return 0;
+}
+
static int mcde_fb_blank(int blank, struct fb_info *fbi)
{
return 0;
@@ -609,6 +626,8 @@ static struct fb_ops fb_ops = {
.fb_imageblit = sys_imageblit,
.fb_check_var = mcde_fb_check_var,
.fb_set_par = mcde_fb_set_par,
+ .fb_setcolreg = mcde_fb_setcolreg,
+ .fb_setcmap = mcde_fb_setcmap,
.fb_blank = mcde_fb_blank,
.fb_pan_display = mcde_fb_pan_display,
.fb_rotate = mcde_fb_rotate,
@@ -685,6 +704,10 @@ struct fb_info *mcde_fb_create(struct mcde_display_device *ddev,
if (ret)
goto fb_register_failed;
+ ret = fb_alloc_cmap(&fbi->cmap, 256, 0);
+ if (ret)
+ dev_warn(&ddev->dev, "%s: Allocate color map memory failed!\n", __func__);
+
ddev->fbi = fbi;
#ifdef CONFIG_HAS_EARLYSUSPEND
@@ -741,6 +764,8 @@ void mcde_fb_destroy(struct mcde_display_device *dev)
mcde_dss_destroy_overlay(mfb->ovlys[i]);
}
+ fb_dealloc_cmap(&dev->fbi->cmap);
+
unregister_framebuffer(dev->fbi);
free_fb_mem(dev->fbi);
framebuffer_release(dev->fbi);