Răsfoiți Sursa

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 <[email protected]>
Samantha Tran 6 ani în urmă
părinte
comite
c423e14b22
3 a modificat fișierele cu 15 adăugiri și 0 ștergeri
  1. 10 0
      msm/sde/sde_hw_catalog.c
  2. 3 0
      msm/sde/sde_hw_catalog.h
  3. 2 0
      msm/sde/sde_plane.c

+ 10 - 0
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,

+ 3 - 0
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;

+ 2 - 0
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))) ||