diff options
author | Dandawate Saket <dsaket@ti.com> | 2012-06-05 23:24:46 +0530 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-11-19 21:10:47 +0100 |
commit | 6d69790b3dc7eb103d385bc45beb4b275b7f8414 (patch) | |
tree | e2636a336b5b3f350089d986305d3bb3b6e1cf75 | |
parent | 3ac6c5e878b5d5bee6c2f35f48c909ebd9be9961 (diff) | |
download | kernel_samsung_tuna-6d69790b3dc7eb103d385bc45beb4b275b7f8414.zip kernel_samsung_tuna-6d69790b3dc7eb103d385bc45beb4b275b7f8414.tar.gz kernel_samsung_tuna-6d69790b3dc7eb103d385bc45beb4b275b7f8414.tar.bz2 |
OMAP4 : DSSCOMP : Avoid pushing content if no panel is active
Currently we push content on a blanked manager in case it is
default display. This causes a lot of logging in dsscomp call
back when we apply blank to manager.
Check added to see if any dss device is active and then only
push data to panel.
Change-Id: Idffd022e293949bfea260a01b96b8f6eff8327d3
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
-rw-r--r-- | drivers/video/omap2/dsscomp/gralloc.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/video/omap2/dsscomp/gralloc.c b/drivers/video/omap2/dsscomp/gralloc.c index a3554e2..94774b9 100644 --- a/drivers/video/omap2/dsscomp/gralloc.c +++ b/drivers/video/omap2/dsscomp/gralloc.c @@ -32,6 +32,7 @@ #include <linux/earlysuspend.h> #endif static bool blanked; +static u32 dev_display_mask; #include <linux/ion.h> #include <plat/dma.h> @@ -285,6 +286,30 @@ static void dsscomp_gralloc_do_clone(struct work_struct *work) kfree(wk); } +static bool dsscomp_is_any_device_active() +{ + struct omap_dss_device *dssdev; + u32 display_ix; + for (display_ix = 0 ; display_ix < cdev->num_displays ; display_ix++) { + dssdev = cdev->displays[display_ix]; + if (dssdev && dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { + dev_display_mask |= 1 << display_ix; + return true; + } + } + + /* Blank all the mangers which were active before to + avoid lock ups of gralloc queue */ + for (display_ix = 0 ; display_ix < cdev->num_displays ; display_ix++) { + dssdev = cdev->displays[display_ix]; + if (dev_display_mask & 1 << display_ix) { + dev_display_mask &= ~(1 << display_ix); + dssdev->manager->blank(dssdev->manager, false); + } + } + return false; +} + int dsscomp_gralloc_queue(struct dsscomp_setup_dispc_data *d, struct tiler_pa_info **pas, bool early_callback, @@ -363,7 +388,7 @@ int dsscomp_gralloc_queue(struct dsscomp_setup_dispc_data *d, memset(comp, 0, sizeof(comp)); memset(ovl_new_use_mask, 0, sizeof(ovl_new_use_mask)); - if (skip) + if (skip || !dsscomp_is_any_device_active()) goto skip_comp; d->mode = DSSCOMP_SETUP_DISPLAY; |