summaryrefslogtreecommitdiff
path: root/drivers/video/mcde/mcde_fb.c
diff options
context:
space:
mode:
authorNaveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>2011-08-26 21:33:14 +0530
committerRobert Marklund <robert.marklund@stericsson.com>2011-10-05 12:54:22 +0200
commit3c69334b1532f572cbf4502ce2caa120de16681a (patch)
treeb58dc6f0b5c4d17f8f49f709a2be60152be91c00 /drivers/video/mcde/mcde_fb.c
parent7500f0b439375d35a365fc869684b4552e4a7cf7 (diff)
mcde:Migrate the patches for kernel3.0
Migrate the following commits for mcde driver files 0c80403 video: mcde: Add sony display support for DB5500 42c4245 Revert "video: mcde: Add sony display support for DB5500" 190e10f video: mcde: check for driver at suspend - resume 8a5da1e video: mcde: Configure channels and overlays for DB5500 4b15316 video: mcde: apply color conversion for DPI mode 409f44a video: mcde: Add sony display support for DB5500 585663b video: mcde: don't fail on no VANA 04ad4ac video: av8100: Add HDMI AVI Infoframe 7587405 video: mcde: Add DB5500 V2 support 91406cb video: mcde: remove PDP config 6bf7c79 video: mcde: fix suspend crash if no channel state 6d71d02 video: av8100: Add new firmware version de0af16 mcde: fix crash on unsupported hardware version 5d46943 video: mcde: remove mdelay in DSI write bc272e8 video: av8100: Reduce power consumption 2a22b39 video: mcde: enable mcde channel for DSI command b441a21 video: mcde: enable reading > 1 byte in DCS cmd ST-Ericsson ID: 352334 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: NA Change-Id: If64e30ccb3bb789f0c6bc062d95623c4aad08be1 Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29549
Diffstat (limited to 'drivers/video/mcde/mcde_fb.c')
-rw-r--r--drivers/video/mcde/mcde_fb.c61
1 files changed, 36 insertions, 25 deletions
diff --git a/drivers/video/mcde/mcde_fb.c b/drivers/video/mcde/mcde_fb.c
index 628b10953f6..332e371d54b 100644
--- a/drivers/video/mcde/mcde_fb.c
+++ b/drivers/video/mcde/mcde_fb.c
@@ -485,6 +485,8 @@ static int apply_var(struct fb_info *fbi, struct mcde_display_device *ddev)
var = &fbi->var;
+ ddev->check_transparency = 60;
+
/* Reallocate memory */
line_len = (fbi->var.bits_per_pixel * var->xres_virtual) / 8;
line_len = ALIGN(line_len, MCDE_BUF_LINE_ALIGMENT);
@@ -564,31 +566,47 @@ static int mcde_fb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi)
static int mcde_fb_set_par(struct fb_info *fbi)
{
+ struct mcde_fb *mfb = to_mcde_fb(fbi);
+ struct mcde_display_device *ddev = fb_to_display(fbi);
dev_vdbg(fbi->dev, "%s\n", __func__);
- 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__);
+ if (mfb->ovlys[0]->state == NULL &&
+ ddev->fictive == false) {
+ printk(KERN_INFO "%s() - Enable fb %p\n",
+ __func__,
+ mfb->ovlys[0]);
+ mcde_dss_enable_overlay(mfb->ovlys[0]);
+ }
- /*Nothing to see here, move along*/
- return 0;
+ return apply_var(fbi, ddev);
}
-static int mcde_fb_setcmap(struct fb_cmap *cmap, struct fb_info *fbi)
+static int mcde_fb_blank(int blank, struct fb_info *fbi)
{
+ int ret = 0;
+ struct mcde_display_device *ddev = fb_to_display(fbi);
+
dev_vdbg(fbi->dev, "%s\n", __func__);
- /*Nothing to see here, move along*/
- return 0;
-}
+ if (ddev->fictive)
+ goto mcde_fb_blank_end;
+
+ switch (blank) {
+ case FB_BLANK_NORMAL:
+ case FB_BLANK_VSYNC_SUSPEND:
+ case FB_BLANK_HSYNC_SUSPEND:
+ case FB_BLANK_POWERDOWN:
+ mcde_dss_disable_display(ddev);
+ break;
+ case FB_BLANK_UNBLANK:
+ ret = mcde_dss_enable_display(ddev);
+ break;
+ default:
+ ret = -EINVAL;
+ }
-static int mcde_fb_blank(int blank, struct fb_info *fbi)
-{
- return 0;
+mcde_fb_blank_end:
+ return ret;
}
static int mcde_fb_pan_display(struct fb_var_screeninfo *var,
@@ -633,8 +651,6 @@ 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,
@@ -711,10 +727,6 @@ 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
@@ -771,10 +783,9 @@ void mcde_fb_destroy(struct mcde_display_device *dev)
mcde_dss_destroy_overlay(mfb->ovlys[i]);
}
- fb_dealloc_cmap(&dev->fbi->cmap);
-
#ifdef CONFIG_HAS_EARLYSUSPEND
- unregister_early_suspend(&mfb->early_suspend);
+ if (dev->fictive == false)
+ unregister_early_suspend(&mfb->early_suspend);
#endif
unregister_framebuffer(dev->fbi);
free_fb_mem(dev->fbi);