summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-17 14:31:09 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 08:54:53 +0200
commitf17d04fbbb201c05700359e94e2747c210f99852 (patch)
tree7a2307dfc05b756ef940b8a2db7d734dc78967e5
parentfcc764dca80ead39b7391ff2c67a6b78de16d7a9 (diff)
downloadtalos-op-linux-f17d04fbbb201c05700359e94e2747c210f99852.tar.gz
talos-op-linux-f17d04fbbb201c05700359e94e2747c210f99852.zip
OMAPDSS: APPLY: add dss_mgr_simple_check()
Add dss_mgr_simple_check() which is used to check the validity of certain manager attributes. Only attributes that can be checked independently, without knowing the display being used, is done here (thus "simple"). We can use this function in dss_mgr_set_info(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/apply.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index dccddd264436..242cb1c983c0 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -834,11 +834,35 @@ out:
mutex_unlock(&apply_lock);
}
+static int dss_mgr_simple_check(struct omap_overlay_manager *mgr,
+ const struct omap_overlay_manager_info *info)
+{
+ if (dss_has_feature(FEAT_ALPHA_FIXED_ZORDER)) {
+ /*
+ * OMAP3 supports only graphics source transparency color key
+ * and alpha blending simultaneously. See TRM 15.4.2.4.2.2
+ * Alpha Mode.
+ */
+ if (info->partial_alpha_enabled && info->trans_enabled
+ && info->trans_key_type != OMAP_DSS_COLOR_KEY_GFX_DST) {
+ DSSERR("check_manager: illegal transparency key\n");
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
int dss_mgr_set_info(struct omap_overlay_manager *mgr,
struct omap_overlay_manager_info *info)
{
struct mgr_priv_data *mp = get_mgr_priv(mgr);
unsigned long flags;
+ int r;
+
+ r = dss_mgr_simple_check(mgr, info);
+ if (r)
+ return r;
spin_lock_irqsave(&data_lock, flags);
OpenPOWER on IntegriCloud