diff options
| author | Radhika Ranjan Soni <rrsoni@codeaurora.org> | 2014-05-14 12:44:06 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:30:08 -0700 |
| commit | fc0c415f2c8b167f73cbb539d383de36a0d2876b (patch) | |
| tree | 85d15944b4b0fd45e03fe6f3d8912e6e026fa2cd /drivers | |
| parent | 37b308cea99277675d59a9cc335a7ff99b0546bb (diff) | |
msm: mdss: add support for RT/NRT traffic
RT/NRT feature splits the AXI traffic over two AXI ports.
By diverting RT/NRT traffic to individual AXI ports, NRT
traffic can be throttled by NOC at SoC level based on AXI
port#. Having this capability can help tweak QoS based on
use-cases.
This change adds support to identify real time and
non-real time clients and acocrdingly program HW to take
care of routing the RT/NRT traffic to respective AXI ports.
Change-Id: Ic5d94423f125226539db9e21bc095dba803cc63e
Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss.h | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.c | 3 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_hwio.h | 3 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pipe.c | 37 |
4 files changed, 44 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h index b65b2c56df2c..f1797b79c7d8 100644 --- a/drivers/video/fbdev/msm/mdss.h +++ b/drivers/video/fbdev/msm/mdss.h @@ -122,6 +122,7 @@ struct mdss_data_type { u32 irq_buzy; u32 has_bwc; u32 has_decimation; + bool has_fixed_qos_arbiter_enabled; bool has_panic_ctrl; u32 wfd_mode; u32 has_no_lut_read; diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c index 4e952ddc0fbf..483e880416d0 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.c +++ b/drivers/video/fbdev/msm/mdss_mdp.c @@ -2462,6 +2462,9 @@ static int mdss_mdp_parse_dt_misc(struct platform_device *pdev) mdata->has_src_split = of_property_read_bool(pdev->dev.of_node, "qcom,mdss-has-source-split"); + mdata->has_fixed_qos_arbiter_enabled = + of_property_read_bool(pdev->dev.of_node, + "qcom,mdss-has-fixed-qos-arbiter-enabled"); mdata->idle_pc_enabled = of_property_read_bool(pdev->dev.of_node, "qcom,mdss-idle-power-collapse-enabled"); diff --git a/drivers/video/fbdev/msm/mdss_mdp_hwio.h b/drivers/video/fbdev/msm/mdss_mdp_hwio.h index 7fc4818444c6..cefa02191864 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_hwio.h +++ b/drivers/video/fbdev/msm/mdss_mdp_hwio.h @@ -614,4 +614,7 @@ enum mdss_mdp_pingpong_index { #define MDSS_VBIF_QOS_REMAP_BASE 0x020 #define MDSS_VBIF_QOS_REMAP_ENTRIES 0x4 + +#define MDSS_VBIF_FIXED_SORT_EN 0x30 +#define MDSS_VBIF_FIXED_SORT_SEL0 0x34 #endif diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index 65ee2a082c94..1147165aa1ec 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -567,6 +567,42 @@ static void mdss_mdp_qos_vbif_remapper_setup(struct mdss_data_type *mdata, mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF, false); } +/** + * mdss_mdp_fixed_qos_arbiter_setup - Program the RT/NRT registers based on + * real or non real time clients + * @mdata: Pointer to the global mdss data structure. + * @pipe: Pointer to source pipe struct to get xin id's. + * @is_realtime: To determine if pipe's client is real or + * non real time. + */ +static void mdss_mdp_fixed_qos_arbiter_setup(struct mdss_data_type *mdata, + struct mdss_mdp_pipe *pipe, bool is_realtime) +{ + u32 mask, reg_val; + + if (!mdata->has_fixed_qos_arbiter_enabled) + return; + + mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false); + mutex_lock(&mdata->reg_lock); + reg_val = readl_relaxed(mdata->vbif_base + MDSS_VBIF_FIXED_SORT_EN); + mask = 0x1 << pipe->xin_id; + reg_val |= mask; + + /* Enable the fixed sort for the client */ + writel_relaxed(reg_val, mdata->vbif_base + MDSS_VBIF_FIXED_SORT_EN); + reg_val = readl_relaxed(mdata->vbif_base + MDSS_VBIF_FIXED_SORT_SEL0); + mask = 0x1 << (pipe->xin_id * 2); + if (is_realtime) + reg_val &= ~mask; + else + reg_val |= mask; + /* Set the fixed_sort regs as per RT/NRT client */ + writel_relaxed(reg_val, mdata->vbif_base + MDSS_VBIF_FIXED_SORT_SEL0); + mutex_unlock(&mdata->reg_lock); + mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF, false); +} + static struct mdss_mdp_pipe *mdss_mdp_pipe_init(struct mdss_mdp_mixer *mixer, u32 type, u32 off, struct mdss_mdp_pipe *left_blend_pipe) { @@ -657,6 +693,7 @@ static struct mdss_mdp_pipe *mdss_mdp_pipe_init(struct mdss_mdp_mixer *mixer, is_realtime = !((mixer->ctl->intf_num == MDSS_MDP_NO_INTF) || mixer->rotator_mode); mdss_mdp_qos_vbif_remapper_setup(mdata, pipe, is_realtime); + mdss_mdp_fixed_qos_arbiter_setup(mdata, pipe, is_realtime); } else if (pipe_share) { /* * when there is no dedicated wfd blk, DMA pipe can be |
