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>
This commit is contained in:
parent
37b308cea9
commit
fc0c415f2c
5 changed files with 50 additions and 0 deletions
|
@ -238,6 +238,11 @@ Optional properties:
|
|||
pipes which have no scaling support.
|
||||
- qcom,mdss-has-decimation: Boolean property to indicate the presence of
|
||||
decimation feature in fetch.
|
||||
- qcom,mdss-has-fixed-qos-arbiter-enabled: Boolean property to indicate the
|
||||
presence of rt/nrt feature. This feature enables
|
||||
increased performance by prioritizing the real time
|
||||
(rt) traffic over non real time (nrt) traffic to
|
||||
access the memory.
|
||||
- qcom,mdss-has-source-split: Boolean property to indicate if source split
|
||||
feature is available or not.
|
||||
- qcom,mdss-ad-off: Array of offset addresses for the available
|
||||
|
@ -467,6 +472,7 @@ Example:
|
|||
qcom,mdss-has-non-scalar-rgb;
|
||||
qcom,mdss-has-bwc;
|
||||
qcom,mdss-has-decimation;
|
||||
qcom,mdss-has-fixed-qos-arbiter-enabled;
|
||||
qcom,mdss-has-source-split;
|
||||
qcom,mdss-wfd-mode = "intf";
|
||||
qcom,mdss-no-lut-read;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue