msm: mdss: Enable rotator smmu domain based on DT setting
To support new v4l2 rotator driver, rotator smmu domains in MDSS driver will be enabled based on device tree boolean setting. This allows smmu to be associated with MDSS driver or external rotator driver for MDS block, such as 3.0.0 onward, with a separate rotator block, or for MDSS block, pre 2.0.0, with built-in writeback rotator. CRs-Fixed: 973961 Change-Id: I68ac7b1b89485d1ce46bdb1c1739c3306a7d7d89 Signed-off-by: Alan Kwong <akwong@codeaurora.org> [dkeitel@codeaurora.org: fixed minor whitspace conflict.] Signed-off-by: David Keitel <dkeitel@codeaurora.org>
This commit is contained in:
parent
ba9fc59027
commit
11c42c9d08
4 changed files with 14 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue