From aaa874a985158383c4b394c687c716ef26288741 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 15 Nov 2011 16:37:53 +0200 Subject: OMAPDSS: APPLY: rewrite overlay enable/disable Overlays are currently enabled and disabled with a boolean in the struct omap_overlay_info. The overlay info is set with ovl->set_overlay_info(), and made into use with mgr->apply(). This doesn't work properly, as the enable/disable status may affect also other overlays, for example when using fifo-merge. Thus the enabling and disabling of the overlay needs to be done outside the normal overlay configuration. This patch achieves that by doing the following things: 1) Add function pointers to struct omap_overlay: enable(), disable() and is_enabled(). These are used to do the obvious. The functions may block. 2) Move the "enabled" field from struct omap_overlay to ovl_priv_data. 3) Add a new route for settings to be applied to the HW, called "extra_info". The status of the normal info and extra_info are tracked separately. The point here is to allow the normal info to be changed and applied in non-blocking matter, whereas the extra_info can only be changed when holding the mutex. This makes it possible to, for example, set the overlay enable flag, apply it, and wait until the HW has taken the flag into use. This is not possible if the enable flag would be in the normal info, as a new value for the flag could be set at any time from the users of omapdss. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 6e3e7a7..9d01ff6 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -352,8 +352,6 @@ struct omap_dss_cpr_coefs { }; struct omap_overlay_info { - bool enabled; - u32 paddr; u32 p_uv_addr; /* for NV12 format */ u16 screen_width; @@ -391,6 +389,10 @@ struct omap_overlay { /* if true, info has been changed, but not applied() yet */ bool info_dirty; + int (*enable)(struct omap_overlay *ovl); + int (*disable)(struct omap_overlay *ovl); + bool (*is_enabled)(struct omap_overlay *ovl); + int (*set_manager)(struct omap_overlay *ovl, struct omap_overlay_manager *mgr); int (*unset_manager)(struct omap_overlay *ovl); -- cgit v1.1