From c423e14b2257bae8e1979acfad0cf547205a5fcf Mon Sep 17 00:00:00 2001 From: Samantha Tran Date: Thu, 2 May 2019 11:27:42 -0700 Subject: [PATCH] disp: msm: sde: add per_pipe_bw_high option This change populates values for per_pipe_bw_high from the device tree. This value is exposed to userspace as the bandwidth per pipe available in the no VFE scenario. Change-Id: I61346ee55dfd4b6b0736ecf0b96e061f4f3934c3 Signed-off-by: Samantha Tran --- msm/sde/sde_hw_catalog.c | 10 ++++++++++ msm/sde/sde_hw_catalog.h | 3 +++ msm/sde/sde_plane.c | 2 ++ 3 files changed, 15 insertions(+) diff --git a/msm/sde/sde_hw_catalog.c b/msm/sde/sde_hw_catalog.c index 9052e0fe26..e2c84c5bf5 100644 --- a/msm/sde/sde_hw_catalog.c +++ b/msm/sde/sde_hw_catalog.c @@ -230,6 +230,7 @@ enum { SSPP_EXCL_RECT, SSPP_SMART_DMA, SSPP_MAX_PER_PIPE_BW, + SSPP_MAX_PER_PIPE_BW_HIGH, SSPP_PROP_MAX, }; @@ -544,6 +545,8 @@ static struct sde_prop_type sspp_prop[] = { PROP_TYPE_U32_ARRAY}, {SSPP_MAX_PER_PIPE_BW, "qcom,sde-max-per-pipe-bw-kbps", false, PROP_TYPE_U32_ARRAY}, + {SSPP_MAX_PER_PIPE_BW_HIGH, "qcom,sde-max-per-pipe-bw-high-kbps", false, + PROP_TYPE_U32_ARRAY}, }; static struct sde_prop_type vig_prop[] = { @@ -1515,6 +1518,13 @@ static int sde_sspp_parse_dt(struct device_node *np, else sblk->max_per_pipe_bw = DEFAULT_MAX_PER_PIPE_BW; + if (prop_exists[SSPP_MAX_PER_PIPE_BW_HIGH]) + sblk->max_per_pipe_bw_high = + PROP_VALUE_ACCESS(prop_value, + SSPP_MAX_PER_PIPE_BW_HIGH, i); + else + sblk->max_per_pipe_bw_high = sblk->max_per_pipe_bw; + for (j = 0; j < sde_cfg->mdp_count; j++) { sde_cfg->mdp[j].clk_ctrls[sspp->clk_ctrl].reg_off = PROP_BITVALUE_ACCESS(prop_value, diff --git a/msm/sde/sde_hw_catalog.h b/msm/sde/sde_hw_catalog.h index af77a6178b..c8e7920f18 100644 --- a/msm/sde/sde_hw_catalog.h +++ b/msm/sde/sde_hw_catalog.h @@ -577,6 +577,8 @@ struct sde_qos_lut_tbl { * @pixel_ram_size: size of latency hiding and de-tiling buffer in bytes * @smart_dma_priority: hw priority of rect1 of multirect pipe * @max_per_pipe_bw: maximum allowable bandwidth of this pipe in kBps + * @max_per_pipe_bw_high: maximum allowable bandwidth of this pipe in kBps + * in case of no VFE * @src_blk: * @scaler_blk: * @csc_blk: @@ -616,6 +618,7 @@ struct sde_sspp_sub_blks { u32 maxvdeciexp; /* max decimation is 2^value */ u32 smart_dma_priority; u32 max_per_pipe_bw; + u32 max_per_pipe_bw_high; struct sde_src_blk src_blk; struct sde_scaler_blk scaler_blk; struct sde_pp_blk csc_blk; diff --git a/msm/sde/sde_plane.c b/msm/sde/sde_plane.c index 5eced69d2b..935fb304e3 100644 --- a/msm/sde/sde_plane.c +++ b/msm/sde/sde_plane.c @@ -3508,6 +3508,8 @@ static void _sde_plane_install_properties(struct drm_plane *plane, psde->pipe_sblk->maxvdeciexp); sde_kms_info_add_keyint(info, "max_per_pipe_bw", psde->pipe_sblk->max_per_pipe_bw * 1000LL); + sde_kms_info_add_keyint(info, "max_per_pipe_bw_high", + psde->pipe_sblk->max_per_pipe_bw_high * 1000LL); if ((!master_plane_id && (psde->features & BIT(SDE_SSPP_INVERSE_PMA))) ||