From 6f1f0c7b19ecb468824b79f9d181ef0da41b7d7d Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Fri, 17 Apr 2009 13:58:21 +0530 Subject: [PATCH 39/69] DSS2: Add sysfs entry to for the alpha blending support. Signed-off-by: Hardik Shah --- drivers/video/omap2/dss/manager.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index e0501c4..7965a84 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -192,6 +192,22 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr, return size; } +static ssize_t manager_alpha_blending_enabled_show( + struct omap_overlay_manager *mgr, char *buf) +{ + return snprintf(buf, PAGE_SIZE, "%d\n", + mgr->get_alpha_blending_status(mgr)); +} +static ssize_t manager_alpha_blending_enabled_store( + struct omap_overlay_manager *mgr, + const char *buf, size_t size) +{ + int enable; + if (sscanf(buf, "%d", &enable) != 1) + return -EINVAL; + mgr->enable_alpha_blending(mgr, enable); + return size; +} struct manager_attribute { @@ -215,6 +231,10 @@ static MANAGER_ATTR(color_key_value, S_IRUGO|S_IWUSR, manager_color_key_value_show, manager_color_key_value_store); static MANAGER_ATTR(color_key_enabled, S_IRUGO|S_IWUSR, manager_color_key_enabled_show, manager_color_key_enabled_store); +static MANAGER_ATTR(alpha_blending_enabled, S_IRUGO|S_IWUSR, + manager_alpha_blending_enabled_show, + manager_alpha_blending_enabled_store); + static struct attribute *manager_sysfs_attrs[] = { &manager_attr_name.attr, @@ -223,6 +243,7 @@ static struct attribute *manager_sysfs_attrs[] = { &manager_attr_color_key_type.attr, &manager_attr_color_key_value.attr, &manager_attr_color_key_enabled.attr, + &manager_attr_alpha_blending_enabled.attr, NULL }; -- 1.6.2.4