ソースを参照

qcacmn: At set DMA mask skip IPA version check

Currently while setting DMA mask based on IPA HW version DMA
address bit mask is set. So when IPA is disabled at HW wrong
DMA bit mask is set which leads to allocation failures.

In this change skip IPA version check if IPA HW support is
absent.

Change-Id: I8e438ea012ca889f9d38f22b64207b2a9532a99b
CRs-Fixed: 2067774
Sravan Kumar Kairam 7 年 前
コミット
bd20096931
2 ファイル変更20 行追加0 行削除
  1. 16 0
      hif/inc/hif.h
  2. 4 0
      hif/src/snoc/if_snoc.c

+ 16 - 0
hif/inc/hif.h

@@ -760,6 +760,22 @@ enum ipa_hw_type hif_get_ipa_hw_type(void)
 {
 	return ipa_get_hw_type();
 }
+
+/**
+ * hif_get_ipa_present() - get IPA hw status
+ *
+ * This API return the IPA hw status.
+ *
+ * Return: true if IPA is present or false otherwise
+ */
+static inline
+bool hif_get_ipa_present(void)
+{
+	if (ipa_uc_reg_rdyCB(NULL) != -EPERM)
+		return true;
+	else
+		return false;
+}
 #endif
 int hif_bus_resume(struct hif_opaque_softc *hif_ctx);
 /**

+ 4 - 0
hif/src/snoc/if_snoc.c

@@ -241,6 +241,10 @@ static int hif_set_dma_coherent_mask(struct device *dev)
 {
 	uint8_t addr_bits;
 
+	if (false == hif_get_ipa_present())
+		return qdf_set_dma_coherent_mask(dev,
+					DMA_COHERENT_MASK_IPA_VER_3_AND_ABOVE);
+
 	if (hif_get_ipa_hw_type() < IPA_HW_v3_0)
 		addr_bits = DMA_COHERENT_MASK_BELOW_IPA_VER_3;
 	else