summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUjwal Patel <ujwalp@codeaurora.org>2014-06-03 12:53:11 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:30:35 -0700
commit2bda05c8b03aab41bdb41418fbe8917e663fcb3d (patch)
tree86ab1f262e1959bb66f4270af88ad8f2f94435ba
parent25e578968854137bad69d77a394ce654a3dd5158 (diff)
msm: mdss: add fb sysfs property to indicate how to split layer
When source split is enabled, a layer can be split into two at layer mixer (LM) rather than splitting into two source pipes. But splitting at LM is not always optimal from power and performance aspects. Display panel properties and information about other system resource including other layers dictate the best balance between power and performance of this layer split. i.e 1080p video layer can always be sent through single pipe on 1440x2560 portrait panel but that leads to higher MDP clock compared splitting 1080p video layer into two source pipes. Since decision to split the layer into two is done by user-land, aid in their decision by providing information if they should split such layer or not. Change-Id: I1009412f127423aee3f083dd2ea879dbaf2ed2ae Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_fb.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
index 20470ef50d2f..3dc572b19fd8 100644
--- a/drivers/video/fbdev/msm/mdss_fb.c
+++ b/drivers/video/fbdev/msm/mdss_fb.c
@@ -527,6 +527,21 @@ static int mdss_fb_lpm_enable(struct msm_fb_data_type *mfd, int mode)
return 0;
}
+static ssize_t mdss_fb_get_src_split_info(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct fb_info *fbi = dev_get_drvdata(dev);
+ struct msm_fb_data_type *mfd = fbi->par;
+ int ret = 0;
+
+ if ((mfd->split_mode == MDP_SPLIT_MODE_LM) &&
+ (fbi->var.yres > 2048) && (fbi->var.yres > fbi->var.xres))
+ ret = scnprintf(buf, PAGE_SIZE,
+ "src_split_always\n");
+
+ return ret;
+}
+
static DEVICE_ATTR(msm_fb_type, S_IRUGO, mdss_fb_get_type, NULL);
static DEVICE_ATTR(msm_fb_split, S_IRUGO | S_IWUSR, mdss_fb_show_split,
mdss_fb_store_split);
@@ -535,6 +550,8 @@ static DEVICE_ATTR(idle_time, S_IRUGO | S_IWUSR | S_IWGRP,
mdss_fb_get_idle_time, mdss_fb_set_idle_time);
static DEVICE_ATTR(idle_notify, S_IRUGO, mdss_fb_get_idle_notify, NULL);
static DEVICE_ATTR(msm_fb_panel_info, S_IRUGO, mdss_fb_get_panel_info, NULL);
+static DEVICE_ATTR(msm_fb_src_split_info, S_IRUGO, mdss_fb_get_src_split_info,
+ NULL);
static struct attribute *mdss_fb_attrs[] = {
&dev_attr_msm_fb_type.attr,
@@ -543,6 +560,7 @@ static struct attribute *mdss_fb_attrs[] = {
&dev_attr_idle_time.attr,
&dev_attr_idle_notify.attr,
&dev_attr_msm_fb_panel_info.attr,
+ &dev_attr_msm_fb_src_split_info.attr,
NULL,
};