Переглянути джерело

disp: msm: sde: get INTF TEAR IRQ offsets from device tree

The INTF TEAR IRQ block offsets can shift between targets. Therefore,
to allow dynamically setting these offsets they should be specified
in the sde device tree node qcom,sde-intf-tear-irq-off.

Change-Id: I2948bc6eaa31fe5e180379770d88e7be72b6d345
Signed-off-by: Steve Cohen <[email protected]>
Steve Cohen 6 роки тому
батько
коміт
df8c709d23
2 змінених файлів з 8 додано та 0 видалено
  1. 6 0
      msm/sde/sde_hw_catalog.c
  2. 2 0
      msm/sde/sde_hw_catalog.h

+ 6 - 0
msm/sde/sde_hw_catalog.c

@@ -277,6 +277,7 @@ enum {
 	INTF_LEN,
 	INTF_PREFETCH,
 	INTF_TYPE,
+	INTF_TE_IRQ,
 	INTF_PROP_MAX,
 };
 
@@ -709,6 +710,7 @@ static struct sde_prop_type intf_prop[] = {
 	{INTF_PREFETCH, "qcom,sde-intf-max-prefetch-lines", false,
 						PROP_TYPE_U32_ARRAY},
 	{INTF_TYPE, "qcom,sde-intf-type", false, PROP_TYPE_STRING_ARRAY},
+	{INTF_TE_IRQ, "qcom,sde-intf-tear-irq-off", false, PROP_TYPE_U32_ARRAY},
 };
 
 static struct sde_prop_type wb_prop[] = {
@@ -1973,6 +1975,10 @@ static int sde_intf_parse_dt(struct device_node *np,
 		if (IS_SDE_CTL_REV_100(sde_cfg->ctl_rev))
 			set_bit(SDE_INTF_INPUT_CTRL, &intf->features);
 
+		if (prop_exists[INTF_TE_IRQ])
+			intf->te_irq_offset = PROP_VALUE_ACCESS(prop_value,
+					INTF_TE_IRQ, i);
+
 		if (sde_cfg->has_intf_te)
 			set_bit(SDE_INTF_TE, &intf->features);
 	}

+ 2 - 0
msm/sde/sde_hw_catalog.h

@@ -951,12 +951,14 @@ struct sde_cdm_cfg   {
  * @type:              Interface type(DSI, DP, HDMI)
  * @controller_id:     Controller Instance ID in case of multiple of intf type
  * @prog_fetch_lines_worst_case	Worst case latency num lines needed to prefetch
+ * @te_irq_offset:     Register offset for INTF TE IRQ block
  */
 struct sde_intf_cfg  {
 	SDE_HW_BLK_INFO;
 	u32 type;   /* interface type*/
 	u32 controller_id;
 	u32 prog_fetch_lines_worst_case;
+	u32 te_irq_offset;
 };
 
 /**