Merge android-msm-pixel-4.19-rvc-qpr3 into android-msm-pixel-4.19

SBMerger: 351186807
Change-Id: Icdc986ff6ab7633405f459c99b017539d3722e3b
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
diff --git a/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c b/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c
index f76a6da..4c2e7b2 100644
--- a/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c
+++ b/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c
@@ -2850,8 +2850,16 @@
 	size_t len;
 	dma_addr_t iova;
 
+#ifdef CONFIG_DMA_API_DEBUG
+	// Allocating FW memory generates a warning when CONFIG_DMA_API_DEBUG is
+	// set. It causes kernel panic if CONFIG_PANIC_ON_WARN_DEFAULT_ENABLE is
+	// set. b/160928541
+	CAM_ERR(CAM_ICP, "CONFIG_DMA_API_DEBUG is set");
+	return -ENOMEM;
+#else
 	rc = cam_smmu_alloc_firmware(icp_hw_mgr.iommu_hdl,
 		&iova, &kvaddr, &len);
+#endif
 	if (rc)
 		return -ENOMEM;