From f1b02cbfd498bab3a1cf38f7d872a77ca89c9c94 Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Fri, 12 Aug 2011 20:03:05 -0500 Subject: OMAP:DSSCOMP: Blank manager before turning off its display Flush displayed content by blanking the manager of the display to be turned off. Otherwise, we will be waiting for VSYNC on that display indefinitely to release the queued frames. Change-Id: I2a2b85e58f5373d968083dd47505e8285aa6b4fa Signed-off-by: Lajos Molnar --- drivers/video/omap2/dsscomp/device.c | 4 ++++ drivers/video/omap2/dsscomp/dsscomp.h | 3 +++ drivers/video/omap2/dsscomp/queue.c | 36 ++++++++++++++++++++++++++++++++--- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/drivers/video/omap2/dsscomp/device.c b/drivers/video/omap2/dsscomp/device.c index eb57c4a..773931a 100644 --- a/drivers/video/omap2/dsscomp/device.c +++ b/drivers/video/omap2/dsscomp/device.c @@ -369,6 +369,10 @@ static void fill_cache(struct dsscomp_dev *cdev) cdev->displays[i] = dssdev; dev_dbg(DEV(cdev), "display%lu=%s\n", i, dssdev->driver_name); + + cdev->state_notifiers[i].notifier_call = dsscomp_state_notifier; + blocking_notifier_chain_register(&dssdev->state_notifiers, + cdev->state_notifiers + i); } dev_info(DEV(cdev), "found %d displays and %d overlays\n", cdev->num_displays, cdev->num_ovls); diff --git a/drivers/video/omap2/dsscomp/dsscomp.h b/drivers/video/omap2/dsscomp/dsscomp.h index 6deeda0..82e50cd 100644 --- a/drivers/video/omap2/dsscomp/dsscomp.h +++ b/drivers/video/omap2/dsscomp/dsscomp.h @@ -59,6 +59,7 @@ struct dsscomp_dev { struct omap_overlay_manager *mgrs[MAX_MANAGERS]; u32 num_displays; struct omap_dss_device *displays[MAX_DISPLAYS]; + struct notifier_block state_notifiers[MAX_DISPLAYS]; }; extern int debug; @@ -112,6 +113,8 @@ void dsscomp_gralloc_exit(void); int dsscomp_gralloc_queue_ioctl(struct dsscomp_setup_dispc_data *d); int dsscomp_wait(struct dsscomp_sync_obj *sync, enum dsscomp_wait_phase phase, int timeout); +int dsscomp_state_notifier(struct notifier_block *nb, + unsigned long arg, void *ptr); /* basic operation - if not using queues */ int set_dss_ovl_info(struct dss2_ovl_info *oi); diff --git a/drivers/video/omap2/dsscomp/queue.c b/drivers/video/omap2/dsscomp/queue.c index 3616ccd..0f8c8a6 100644 --- a/drivers/video/omap2/dsscomp/queue.c +++ b/drivers/video/omap2/dsscomp/queue.c @@ -23,6 +23,7 @@ #include #include #include +#include #include