summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/msm/mdss.h2
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.c5
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.h6
-rw-r--r--drivers/video/fbdev/msm/mdss_smmu.h7
4 files changed, 14 insertions, 6 deletions
diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h
index 447e42bbb253..4b3eeca1bb8e 100644
--- a/drivers/video/fbdev/msm/mdss.h
+++ b/drivers/video/fbdev/msm/mdss.h
@@ -309,6 +309,8 @@ struct mdss_data_type {
bool has_pixel_ram;
bool needs_hist_vote;
bool has_ubwc;
+ bool has_wb_ubwc;
+ bool has_separate_rotator;
u32 default_ot_rd_limit;
u32 default_ot_wr_limit;
diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c
index 45fbeef2cb55..36c35d00ab7d 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp.c
@@ -2882,7 +2882,6 @@ static int mdss_mdp_parse_dt_mixer(struct platform_device *pdev)
u32 *mixer_offsets = NULL, *dspp_offsets = NULL,
*pingpong_offsets = NULL;
u32 is_virtual_mixer_req = false;
- u32 supports_separate_rotator = 0;
struct mdss_data_type *mdata = platform_get_drvdata(pdev);
@@ -2937,7 +2936,7 @@ static int mdss_mdp_parse_dt_mixer(struct platform_device *pdev)
if (rc)
goto parse_done;
- supports_separate_rotator = of_property_read_bool(pdev->dev.of_node,
+ mdata->has_separate_rotator = of_property_read_bool(pdev->dev.of_node,
"qcom,mdss-has-separate-rotator");
if (mdata->nmixers_wb) {
rc = mdss_mdp_parse_dt_handler(pdev, "qcom,mdss-mixer-wb-off",
@@ -2945,7 +2944,7 @@ static int mdss_mdp_parse_dt_mixer(struct platform_device *pdev)
mdata->nmixers_wb);
if (rc)
goto parse_done;
- } else if (!supports_separate_rotator) {
+ } else if (!mdata->has_separate_rotator) {
/*
* If writeback mixers are not available, put the number of
* writeback mixers equal to number of DMA pipes so that
diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h
index c5973a4b92bf..9505b18c5c45 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.h
+++ b/drivers/video/fbdev/msm/mdss_mdp.h
@@ -1106,6 +1106,12 @@ static inline bool mdss_mdp_is_ubwc_supported(struct mdss_data_type *mdata)
return mdata->has_ubwc;
}
+static inline bool mdss_mdp_is_wb_rotator_supported(
+ struct mdss_data_type *mdata)
+{
+ return mdata && !mdata->has_separate_rotator;
+}
+
static inline int mdss_mdp_is_cdm_supported(struct mdss_data_type *mdata,
u32 intf_type, u32 mixer_type)
{
diff --git a/drivers/video/fbdev/msm/mdss_smmu.h b/drivers/video/fbdev/msm/mdss_smmu.h
index 788bbff66a89..4000644e00b8 100644
--- a/drivers/video/fbdev/msm/mdss_smmu.h
+++ b/drivers/video/fbdev/msm/mdss_smmu.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2007-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -60,14 +60,15 @@ static inline bool is_mdss_smmu_compatible_device(const char *str)
* mdss_smmu_is_valid_domain_type()
*
* Used to check if rotator smmu domain is defined or not by checking if
- * vbif base is defined. As those are associated.
+ * vbif base is defined and wb rotator exists. As those are associated.
*/
static inline bool mdss_smmu_is_valid_domain_type(struct mdss_data_type *mdata,
int domain_type)
{
if ((domain_type == MDSS_IOMMU_DOMAIN_ROT_UNSECURE ||
domain_type == MDSS_IOMMU_DOMAIN_ROT_SECURE) &&
- !mdss_mdp_is_nrt_vbif_base_defined(mdata))
+ (!mdss_mdp_is_wb_rotator_supported(mdata) ||
+ !mdss_mdp_is_nrt_vbif_base_defined(mdata)))
return false;
return true;
}