Browse Source

disp: msm: sde: add VBIF QoS remap settings for WB rotate

This change adds support for the device tree entry parsing and
programming of VBIF Qos remap settings in WB rotate use case.

Change-Id: I729abc3562b70bf85217130aebeeeabc2fca04da
Signed-off-by: Prabhanjan Kandula <[email protected]>
Prabhanjan Kandula 2 years ago
parent
commit
3e0575903c
3 changed files with 12 additions and 1 deletions
  1. 3 1
      msm/sde/sde_encoder_phys_wb.c
  2. 7 0
      msm/sde/sde_hw_catalog.c
  3. 2 0
      msm/sde/sde_hw_catalog.h

+ 3 - 1
msm/sde/sde_encoder_phys_wb.c

@@ -152,8 +152,10 @@ static void sde_encoder_phys_wb_set_qos_remap(struct sde_encoder_phys *phys_enc)
 	qos_params.num = hw_wb->idx - WB_0;
 	if (phys_enc->in_clone_mode)
 		qos_params.client_type = VBIF_CWB_CLIENT;
-	else if (usage_type == WB_USAGE_OFFLINE_WB || usage_type == WB_USAGE_ROT)
+	else if (usage_type == WB_USAGE_OFFLINE_WB)
 		qos_params.client_type = VBIF_OFFLINE_WB_CLIENT;
+	else if (usage_type == WB_USAGE_ROT)
+		qos_params.client_type = VBIF_WB_ROT_CLIENT;
 	else
 		qos_params.client_type = VBIF_NRT_CLIENT;
 

+ 7 - 0
msm/sde/sde_hw_catalog.c

@@ -511,6 +511,7 @@ enum {
 	VBIF_QOS_LUTDMA_REMAP,
 	VBIF_QOS_CNOC_REMAP,
 	VBIF_QOS_OFFLINE_WB_REMAP,
+	VBIF_QOS_WB_ROT_REMAP,
 	VBIF_PROP_MAX,
 };
 
@@ -971,6 +972,7 @@ static struct sde_prop_type vbif_prop[] = {
 	{VBIF_QOS_CNOC_REMAP, "qcom,sde-vbif-qos-cnoc-remap", false, PROP_TYPE_U32_ARRAY},
 	{VBIF_QOS_OFFLINE_WB_REMAP, "qcom,sde-vbif-qos-offline-wb-remap", false,
 		PROP_TYPE_U32_ARRAY},
+	{VBIF_QOS_WB_ROT_REMAP, "qcom,sde-vbif-qos-wb-rot-remap", false, PROP_TYPE_U32_ARRAY},
 };
 
 static struct sde_prop_type uidle_prop[] = {
@@ -3918,6 +3920,11 @@ static int sde_vbif_parse_dt(struct device_node *np,
 	if (rc)
 		goto end;
 
+	rc = _validate_dt_entry(np, &vbif_prop[VBIF_QOS_WB_ROT_REMAP], 1,
+			&prop_count[VBIF_QOS_WB_ROT_REMAP], NULL);
+	if (rc)
+		goto end;
+
 	sde_cfg->vbif_count = off_count;
 
 	rc = _read_dt_entry(np, vbif_prop, ARRAY_SIZE(vbif_prop), prop_count,

+ 2 - 0
msm/sde/sde_hw_catalog.h

@@ -1615,6 +1615,7 @@ struct sde_vbif_qos_tbl {
  * @VBIF_LUTDMA_CLIENT: LUTDMA client
  * @VBIF_CNOC_CLIENT: HW fence client
  * @VBIF_OFFLINE_WB_CLIENT: Offline WB client used in 2-pass composition
+ * @VBIF_WB_ROT_CLIENT: WB Rotation client used in 2-pass composition
  * @VBIF_MAX_CLIENT: max number of clients
  */
 enum sde_vbif_client_type {
@@ -1624,6 +1625,7 @@ enum sde_vbif_client_type {
 	VBIF_LUTDMA_CLIENT,
 	VBIF_CNOC_CLIENT,
 	VBIF_OFFLINE_WB_CLIENT,
+	VBIF_WB_ROT_CLIENT,
 	VBIF_MAX_CLIENT
 };