[PATCH 5/5] Revert "drm/i915: Fail driver probe when unable to load DRAM information"

José Roberto de Souza jose.souza at intel.com
Wed Jan 27 19:20:04 UTC 2021


This reverts commit a43cbdff3f629c5f9b6069a1e623c578a1c5ef15.
---
 drivers/gpu/drm/i915/i915_drv.c   |  6 +-----
 drivers/gpu/drm/i915/intel_dram.c | 13 ++++---------
 drivers/gpu/drm/i915/intel_dram.h |  2 +-
 3 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7ff58ea30c7c..aec0e870dc25 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -622,16 +622,12 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
 	 * Fill the dram structure to get the system dram info. This will be
 	 * used for memory latency calculation.
 	 */
-	ret = intel_dram_detect(dev_priv);
-	if (ret)
-		goto err_dram;
+	intel_dram_detect(dev_priv);
 
 	intel_bw_init_hw(dev_priv);
 
 	return 0;
 
-err_dram:
-	intel_gvt_driver_remove(dev_priv);
 err_msi:
 	if (pdev->msi_enabled)
 		pci_disable_msi(pdev);
diff --git a/drivers/gpu/drm/i915/intel_dram.c b/drivers/gpu/drm/i915/intel_dram.c
index 6a13cf39da99..73d256fc6830 100644
--- a/drivers/gpu/drm/i915/intel_dram.c
+++ b/drivers/gpu/drm/i915/intel_dram.c
@@ -484,7 +484,7 @@ static int gen12_get_dram_info(struct drm_i915_private *i915)
 	return icl_pcode_read_mem_global_info(i915);
 }
 
-int intel_dram_detect(struct drm_i915_private *i915)
+void intel_dram_detect(struct drm_i915_private *i915)
 {
 	struct dram_info *dram_info = &i915->dram_info;
 	int ret;
@@ -496,7 +496,7 @@ int intel_dram_detect(struct drm_i915_private *i915)
 	dram_info->wm_lv_0_adjust_needed = !IS_GEN9_LP(i915);
 
 	if (INTEL_GEN(i915) < 9 || !HAS_DISPLAY(i915))
-		return 0;
+		return;
 
 	if (INTEL_GEN(i915) >= 12)
 		ret = gen12_get_dram_info(i915);
@@ -506,18 +506,13 @@ int intel_dram_detect(struct drm_i915_private *i915)
 		ret = bxt_get_dram_info(i915);
 	else
 		ret = skl_get_dram_info(i915);
-
-	if (ret) {
-		drm_warn(&i915->drm, "Unable to load dram information\n");
-		return ret;
-	}
+	if (ret)
+		return;
 
 	drm_dbg_kms(&i915->drm, "DRAM channels: %u\n", dram_info->num_channels);
 
 	drm_dbg_kms(&i915->drm, "Watermark level 0 adjustment needed: %s\n",
 		    yesno(dram_info->wm_lv_0_adjust_needed));
-
-	return 0;
 }
 
 static u32 gen9_edram_size_mb(struct drm_i915_private *i915, u32 cap)
diff --git a/drivers/gpu/drm/i915/intel_dram.h b/drivers/gpu/drm/i915/intel_dram.h
index 2a0f283b1a1d..4ba13c13162c 100644
--- a/drivers/gpu/drm/i915/intel_dram.h
+++ b/drivers/gpu/drm/i915/intel_dram.h
@@ -9,6 +9,6 @@
 struct drm_i915_private;
 
 void intel_dram_edram_detect(struct drm_i915_private *i915);
-int intel_dram_detect(struct drm_i915_private *i915);
+void intel_dram_detect(struct drm_i915_private *i915);
 
 #endif /* __INTEL_DRAM_H__ */
-- 
2.30.0



More information about the Intel-gfx-trybot mailing list