Skip to contentSkip to conversation

Rename functions to match their entry points

RFC PATCH Superseded Janusz Krzysztofik 3 participants 11 messages Jul 10, 2019

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Rename functions to match their entry points

Need for this was identified while working on split of driver unbind path into _remove() and _release() parts. Consistency in function naming has been recognized as helpful when trying to work out which phase the code is in.

What I'm still not sure about is desired depth of that modification - how deep should we go down with renaming to not override meaningfull function names. Please advise if you think still more deep renaming makes sense.

Thanks,
Janusz

Janusz Krzysztofik (6):
drm/i915: Rename "_load"/"_unload" to match PCI entry points drm/i915: Replace "_load" with "_probe" consequently drm/i915: Propagate "_release" function name suffix down drm/i915: Propagate "_remove" function name suffix down drm/i915: Propagate "_probe" function name suffix down drm/i915: Rename "inject_load_failure" module parameter

 drivers/gpu/drm/i915/display/intel_bios.c     |   4 +-
 drivers/gpu/drm/i915/display/intel_bios.h     |   2 +-
 .../gpu/drm/i915/display/intel_connector.c    |   2 +-
 drivers/gpu/drm/i915/display/intel_display.c  |   2 +-
 .../drm/i915/display/intel_display_power.c    |   6 +-
 .../drm/i915/display/intel_display_power.h    |   2 +-
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |   2 +-
 drivers/gpu/drm/i915/i915_drv.c               | 111 +++++++++---------
 drivers/gpu/drm/i915/i915_drv.h               |  20 ++--
 drivers/gpu/drm/i915/i915_gem.c               |  12 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c           |   4 +-
 drivers/gpu/drm/i915/i915_gem_gtt.h           |   2 +-
 drivers/gpu/drm/i915/i915_params.c            |   2 +-
 drivers/gpu/drm/i915/i915_params.h            |   2 +-
 drivers/gpu/drm/i915/i915_pci.c               |   6 +-
 drivers/gpu/drm/i915/intel_gvt.c              |   7 +-
 drivers/gpu/drm/i915/intel_gvt.h              |   4 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.h       |   2 +-
 drivers/gpu/drm/i915/intel_uncore.c           |   2 +-
 drivers/gpu/drm/i915/intel_wopcm.c            |   2 +-
 21 files changed, 100 insertions(+), 98 deletions(-)
Signature · 1 line
2.21.0
#1 lore raw

RFC PATCH 1/6 drm/i915: Rename "_load"/"_unload" to match PCI entry points

Current names of i915_driver_load/unload() functions originate in legacy DRM stubs. Reduce nomenclature ambiguity by renaming them to match their current use as helpers called from PCI entry points.

Suggested by: Chris Wilson <[email protected]>

---
 drivers/gpu/drm/i915/i915_drv.c | 8 ++++----
 drivers/gpu/drm/i915/i915_drv.h | 4 ++--
 drivers/gpu/drm/i915/i915_pci.c | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +4 -4
index 12182d2fc03c..8b72ae7c1f5d 100644
@@ -1870,17 +1870,17 @@ static void i915_driver_destroy(struct drm_i915_private *i915)
 }
 
 /**
- * i915_driver_load - setup chip and create an initial config
+ * i915_driver_probe - setup chip and create an initial config
  * @pdev: PCI device
  * @ent: matching PCI ID entry
  *
- * The driver load routine has to do several things:
+ * The driver probe routine has to do several things:
  *   - drive output discovery via intel_modeset_init()
  *   - initialize the memory manager
  *   - allocate initial config memory
  *   - setup the DRM framebuffer with the allocated memory
  */
-int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
+int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	const struct intel_device_info *match_info =
 		(struct intel_device_info *)ent->driver_data;
@@ -1946,7 +1946,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return ret;
 }
 
-void i915_driver_unload(struct drm_device *dev)
+void i915_driver_remove(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct pci_dev *pdev = dev_priv->drm.pdev;
drivers/gpu/drm/i915/i915_drv.h +2 -2
index a9381e404fd5..ebb4c09f8817 100644
@@ -2395,9 +2395,9 @@ extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
 #endif
 extern const struct dev_pm_ops i915_pm_ops;
 
-extern int i915_driver_load(struct pci_dev *pdev,
+extern int i915_driver_probe(struct pci_dev *pdev,
 			    const struct pci_device_id *ent);
-extern void i915_driver_unload(struct drm_device *dev);
+extern void i915_driver_remove(struct drm_device *dev);
 
 extern void intel_engine_init_hangcheck(struct intel_engine_cs *engine);
 extern void intel_hangcheck_init(struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_pci.c +2 -2
index 94b588e0a1dd..786ca7b3439b 100644
@@ -848,7 +848,7 @@ static void i915_pci_remove(struct pci_dev *pdev)
 	if (!dev) /* driver load aborted, nothing to cleanup */
 		return;
 
-	i915_driver_unload(dev);
+	i915_driver_remove(dev);
 	drm_dev_put(dev);
 
 	pci_set_drvdata(pdev, NULL);
@@ -923,7 +923,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (vga_switcheroo_client_probe_defer(pdev))
 		return -EPROBE_DEFER;
 
-	err = i915_driver_load(pdev, ent);
+	err = i915_driver_probe(pdev, ent);
 	if (err)
 		return err;
 
Signature · 1 line
2.21.0
#2 lore raw

RFC PATCH 2/6 drm/i915: Replace "_load" with "_probe" consequently

In reply to Janusz Krzysztofik

Use the "_probe" nomenclature not only in i915_driver_probe() helper name but also in other related function / variable names for consistency. Only the userspace exposed name of a related module parameter is left untouched.

---
 .../gpu/drm/i915/display/intel_connector.c    |  2 +-
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |  2 +-
 drivers/gpu/drm/i915/i915_drv.c               | 20 +++++++++----------
 drivers/gpu/drm/i915/i915_drv.h               | 10 +++++-----
 drivers/gpu/drm/i915/i915_gem.c               |  8 ++++----
 drivers/gpu/drm/i915/i915_pci.c               |  2 +-
 drivers/gpu/drm/i915/intel_gvt.c              |  2 +-
 drivers/gpu/drm/i915/intel_uncore.c           |  2 +-
 drivers/gpu/drm/i915/intel_wopcm.c            |  2 +-
 9 files changed, 25 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/display/intel_connector.c +1 -1
index 41310f8e5a2a..d0163d86c42a 100644
@@ -118,7 +118,7 @@ int intel_connector_register(struct drm_connector *connector)
 	if (ret)
 		goto err;
 
-	if (i915_inject_load_failure()) {
+	if (i915_inject_probe_failure()) {
 		ret = -EFAULT;
 		goto err_backlight;
 	}
drivers/gpu/drm/i915/gt/intel_engine_cs.c +1 -1
index df5932f5f578..a17f0f812735 100644
@@ -426,7 +426,7 @@ int intel_engines_init_mmio(struct drm_i915_private *i915)
 	WARN_ON(engine_mask &
 		GENMASK(BITS_PER_TYPE(mask) - 1, I915_NUM_ENGINES));
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -ENODEV;
 
 	for (i = 0; i < ARRAY_SIZE(intel_engines); i++) {
drivers/gpu/drm/i915/i915_drv.c +10 -10
index 8b72ae7c1f5d..ad24957ad86d 100644
@@ -81,14 +81,14 @@
 static struct drm_driver driver;
 
 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
-static unsigned int i915_load_fail_count;
+static unsigned int i915_probe_fail_count;
 
-bool __i915_inject_load_failure(const char *func, int line)
+bool __i915_inject_probe_failure(const char *func, int line)
 {
-	if (i915_load_fail_count >= i915_modparams.inject_load_failure)
+	if (i915_probe_fail_count >= i915_modparams.inject_load_failure)
 		return false;
 
-	if (++i915_load_fail_count == i915_modparams.inject_load_failure) {
+	if (++i915_probe_fail_count == i915_modparams.inject_load_failure) {
 		DRM_INFO("Injecting failure at checkpoint %u [%s:%d]\n",
 			 i915_modparams.inject_load_failure, func, line);
 		i915_modparams.inject_load_failure = 0;
@@ -100,7 +100,7 @@ bool __i915_inject_load_failure(const char *func, int line)
 
 bool i915_error_injected(void)
 {
-	return i915_load_fail_count && !i915_modparams.inject_load_failure;
+	return i915_probe_fail_count && !i915_modparams.inject_load_failure;
 }
 
 #endif
@@ -681,7 +681,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 	int ret;
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -ENODEV;
 
 	if (HAS_DISPLAY(dev_priv)) {
@@ -897,7 +897,7 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv)
 {
 	int ret = 0;
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -ENODEV;
 
 	intel_device_info_subplatform_init(dev_priv);
@@ -991,7 +991,7 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
 {
 	int ret;
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -ENODEV;
 
 	if (i915_get_bridge_dev(dev_priv))
@@ -1535,7 +1535,7 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 	int ret;
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -ENODEV;
 
 	intel_device_info_runtime_init(dev_priv);
@@ -1941,7 +1941,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 out_pci_disable:
 	pci_disable_device(pdev);
 out_fini:
-	i915_load_error(dev_priv, "Device initialization failed (%d)\n", ret);
+	i915_probe_error(dev_priv, "Device initialization failed (%d)\n", ret);
 	i915_driver_destroy(dev_priv);
 	return ret;
 }
drivers/gpu/drm/i915/i915_drv.h +5 -5
index ebb4c09f8817..4deadec2e20b 100644
@@ -122,20 +122,20 @@
 
 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
 
-bool __i915_inject_load_failure(const char *func, int line);
-#define i915_inject_load_failure() \
-	__i915_inject_load_failure(__func__, __LINE__)
+bool __i915_inject_probe_failure(const char *func, int line);
+#define i915_inject_probe_failure() \
+	__i915_inject_probe_failure(__func__, __LINE__)
 
 bool i915_error_injected(void);
 
 #else
 
-#define i915_inject_load_failure() false
+#define i915_inject_probe_failure() false
 #define i915_error_injected() false
 
 #endif
 
-#define i915_load_error(i915, fmt, ...)					 \
+#define i915_probe_error(i915, fmt, ...)				   \
 	__i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \
 		      fmt, ##__VA_ARGS__)
 
drivers/gpu/drm/i915/i915_gem.c +4 -4
index 7ade42b8ec99..015208741405 100644
@@ -1515,12 +1515,12 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
 	if (ret)
 		goto err_gt;
 
-	if (i915_inject_load_failure()) {
+	if (i915_inject_probe_failure()) {
 		ret = -ENODEV;
 		goto err_gt;
 	}
 
-	if (i915_inject_load_failure()) {
+	if (i915_inject_probe_failure()) {
 		ret = -EIO;
 		goto err_gt;
 	}
@@ -1582,8 +1582,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
 		 * for all other failure, such as an allocation failure, bail.
 		 */
 		if (!i915_reset_failed(dev_priv)) {
-			i915_load_error(dev_priv,
-					"Failed to initialize GPU, declaring it wedged!\n");
+			i915_probe_error(dev_priv,
+					 "Failed to initialize GPU, declaring it wedged!\n");
 			i915_gem_set_wedged(dev_priv);
 		}
 
drivers/gpu/drm/i915/i915_pci.c +1 -1
index 786ca7b3439b..64301bf9e1a3 100644
@@ -927,7 +927,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (err)
 		return err;
 
-	if (i915_inject_load_failure()) {
+	if (i915_inject_probe_failure()) {
 		i915_pci_remove(pdev);
 		return -ENODEV;
 	}
drivers/gpu/drm/i915/intel_gvt.c +1 -1
index 1d7d26e4cf14..842ee26effd4 100644
@@ -95,7 +95,7 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)
 {
 	int ret;
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -ENODEV;
 
 	if (!i915_modparams.enable_gvt) {
drivers/gpu/drm/i915/intel_uncore.c +1 -1
index 4015e964c6fc..475ab3d4d91d 100644
@@ -1331,7 +1331,7 @@ static int __fw_domain_init(struct intel_uncore *uncore,
 	GEM_BUG_ON(domain_id >= FW_DOMAIN_ID_COUNT);
 	GEM_BUG_ON(uncore->fw_domain[domain_id]);
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -ENOMEM;
 
 	d = kzalloc(sizeof(*d), GFP_KERNEL);
drivers/gpu/drm/i915/intel_wopcm.c +1 -1
index 8c850785e4b4..a6bc15bc7be3 100644
@@ -177,7 +177,7 @@ int intel_wopcm_init(struct intel_wopcm *wopcm)
 
 	GEM_BUG_ON(!wopcm->size);
 
-	if (i915_inject_load_failure())
+	if (i915_inject_probe_failure())
 		return -E2BIG;
 
 	if (guc_fw_size >= wopcm->size) {
Signature · 1 line
2.21.0
#3 lore raw

RFC PATCH 3/6 drm/i915: Propagate "_release" function name suffix down

In reply to Janusz Krzysztofik

Replace mixed "_fini"/"_cleanup"/"_cleanup_hw" suffixes found in names of fucntions called from i915_driver_release() with "_release" suffix consistently. This provides better code readability, especially helpful when trying to work out which phase the code is in.

Functions names starting with "i915_driver_", i.e., those defined in drivers/gpu/dri/i915/i915_drv.c, just have their "cleanup" or "fini" parts of their names replaced with the "_release" suffix, while names of functions coming from other source files have been suffixed with "_driver_release" to avoid ambiguity with other possible .release entry points.

---
 drivers/gpu/drm/i915/i915_drv.c         | 33 +++++++++++++------------
 drivers/gpu/drm/i915/i915_drv.h         |  2 +-
 drivers/gpu/drm/i915/i915_gem.c         |  2 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c     |  4 +--
 drivers/gpu/drm/i915/i915_gem_gtt.h     |  2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c |  2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.h |  2 +-
 7 files changed, 24 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +17 -16
index ad24957ad86d..36c872220f68 100644
@@ -752,7 +752,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 cleanup_gem:
 	i915_gem_suspend(dev_priv);
 	i915_gem_fini_hw(dev_priv);
-	i915_gem_fini(dev_priv);
+	i915_gem_driver_release(dev_priv);
 cleanup_modeset:
 	intel_modeset_cleanup(dev);
 cleanup_irq:
@@ -962,10 +962,11 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv)
 }
 
 /**
- * i915_driver_cleanup_early - cleanup the setup done in i915_driver_init_early()
+ * i915_driver_early_release - cleanup the setup done in
+ *			       i915_driver_init_early()
  * @dev_priv: device private
  */
-static void i915_driver_cleanup_early(struct drm_i915_private *dev_priv)
+static void i915_driver_early_release(struct drm_i915_private *dev_priv)
 {
 	intel_irq_fini(dev_priv);
 	intel_power_domains_cleanup(dev_priv);
@@ -1028,10 +1029,10 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
 }
 
 /**
- * i915_driver_cleanup_mmio - cleanup the setup done in i915_driver_init_mmio()
+ * i915_driver_mmio_release - cleanup the setup done in i915_driver_init_mmio()
  * @dev_priv: device private
  */
-static void i915_driver_cleanup_mmio(struct drm_i915_private *dev_priv)
+static void i915_driver_mmio_release(struct drm_i915_private *dev_priv)
 {
 	intel_teardown_mchbar(dev_priv);
 	intel_uncore_fini_mmio(&dev_priv->uncore);
@@ -1684,7 +1685,7 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
 		pci_disable_msi(pdev);
 	pm_qos_remove_request(&dev_priv->pm_qos);
 err_ggtt:
-	i915_ggtt_cleanup_hw(dev_priv);
+	i915_ggtt_driver_release(dev_priv);
 err_perf:
 	i915_perf_fini(dev_priv);
 	return ret;
@@ -1929,15 +1930,15 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 out_cleanup_hw:
 	i915_driver_cleanup_hw(dev_priv);
-	i915_ggtt_cleanup_hw(dev_priv);
+	i915_ggtt_driver_release(dev_priv);
 
 	/* Paranoia: make sure we have disabled everything before we exit. */
 	intel_sanitize_gt_powersave(dev_priv);
 out_cleanup_mmio:
-	i915_driver_cleanup_mmio(dev_priv);
+	i915_driver_mmio_release(dev_priv);
 out_runtime_pm_put:
 	enable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
-	i915_driver_cleanup_early(dev_priv);
+	i915_driver_early_release(dev_priv);
 out_pci_disable:
 	pci_disable_device(pdev);
 out_fini:
@@ -2000,19 +2001,19 @@ static void i915_driver_release(struct drm_device *dev)
 
 	disable_rpm_wakeref_asserts(rpm);
 
-	i915_gem_fini(dev_priv);
+	i915_gem_driver_release(dev_priv);
 
-	i915_ggtt_cleanup_hw(dev_priv);
+	i915_ggtt_driver_release(dev_priv);
 
 	/* Paranoia: make sure we have disabled everything before we exit. */
 	intel_sanitize_gt_powersave(dev_priv);
 
-	i915_driver_cleanup_mmio(dev_priv);
+	i915_driver_mmio_release(dev_priv);
 
 	enable_rpm_wakeref_asserts(rpm);
-	intel_runtime_pm_cleanup(rpm);
+	intel_runtime_pm_driver_release(rpm);
 
-	i915_driver_cleanup_early(dev_priv);
+	i915_driver_early_release(dev_priv);
 	i915_driver_destroy(dev_priv);
 }
 
@@ -2205,7 +2206,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
 out:
 	enable_rpm_wakeref_asserts(rpm);
 	if (!dev_priv->uncore.user_forcewake.count)
-		intel_runtime_pm_cleanup(rpm);
+		intel_runtime_pm_driver_release(rpm);
 
 	return ret;
 }
@@ -2969,7 +2970,7 @@ static int intel_runtime_suspend(struct device *kdev)
 	}
 
 	enable_rpm_wakeref_asserts(rpm);
-	intel_runtime_pm_cleanup(rpm);
+	intel_runtime_pm_driver_release(rpm);
 
 	if (intel_uncore_arm_unclaimed_mmio_detection(&dev_priv->uncore))
 		DRM_ERROR("Unclaimed access detected prior to suspending\n");
drivers/gpu/drm/i915/i915_drv.h +1 -1
index 4deadec2e20b..be9a2adab5dc 100644
@@ -2538,7 +2538,7 @@ void i915_gem_init_mmio(struct drm_i915_private *i915);
 int __must_check i915_gem_init(struct drm_i915_private *dev_priv);
 int __must_check i915_gem_init_hw(struct drm_i915_private *dev_priv);
 void i915_gem_fini_hw(struct drm_i915_private *dev_priv);
-void i915_gem_fini(struct drm_i915_private *dev_priv);
+void i915_gem_driver_release(struct drm_i915_private *dev_priv);
 int i915_gem_wait_for_idle(struct drm_i915_private *dev_priv,
 			   unsigned int flags, long timeout);
 void i915_gem_suspend(struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_gem.c +1 -1
index 015208741405..51a0fbaa781b 100644
@@ -1620,7 +1620,7 @@ void i915_gem_fini_hw(struct drm_i915_private *dev_priv)
 	i915_gem_drain_freed_objects(dev_priv);
 }
 
-void i915_gem_fini(struct drm_i915_private *dev_priv)
+void i915_gem_driver_release(struct drm_i915_private *dev_priv)
 {
 	mutex_lock(&dev_priv->drm.struct_mutex);
 	intel_engines_cleanup(dev_priv);
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -2
index 236c964dd761..e8b156b14769 100644
@@ -2910,10 +2910,10 @@ static void ggtt_cleanup_hw(struct i915_ggtt *ggtt)
 }
 
 /**
- * i915_ggtt_cleanup_hw - Clean up GGTT hardware initialization
+ * i915_ggtt_driver_release - Clean up GGTT hardware initialization
  * @i915: i915 device
  */
-void i915_ggtt_cleanup_hw(struct drm_i915_private *i915)
+void i915_ggtt_driver_release(struct drm_i915_private *i915)
 {
 	struct pagevec *pvec;
 
drivers/gpu/drm/i915/i915_gem_gtt.h +1 -1
index 57a68ef4eda7..75c6f11d3df5 100644
@@ -617,7 +617,7 @@ int i915_ggtt_enable_hw(struct drm_i915_private *dev_priv);
 void i915_ggtt_enable_guc(struct drm_i915_private *i915);
 void i915_ggtt_disable_guc(struct drm_i915_private *i915);
 int i915_init_ggtt(struct drm_i915_private *dev_priv);
-void i915_ggtt_cleanup_hw(struct drm_i915_private *dev_priv);
+void i915_ggtt_driver_release(struct drm_i915_private *dev_priv);
 
 int i915_ppgtt_init_hw(struct intel_gt *gt);
 
drivers/gpu/drm/i915/intel_runtime_pm.c +1 -1
index 8d1aebc3e857..b2a05850ea42 100644
@@ -592,7 +592,7 @@ void intel_runtime_pm_disable(struct intel_runtime_pm *rpm)
 		pm_runtime_put(kdev);
 }
 
-void intel_runtime_pm_cleanup(struct intel_runtime_pm *rpm)
+void intel_runtime_pm_driver_release(struct intel_runtime_pm *rpm)
 {
 	int count = atomic_read(&rpm->wakeref_count);
 
drivers/gpu/drm/i915/intel_runtime_pm.h +1 -1
index 473c4850c01d..89f8d284239a 100644
@@ -173,7 +173,7 @@ enable_rpm_wakeref_asserts(struct intel_runtime_pm *rpm)
 void intel_runtime_pm_init_early(struct intel_runtime_pm *rpm);
 void intel_runtime_pm_enable(struct intel_runtime_pm *rpm);
 void intel_runtime_pm_disable(struct intel_runtime_pm *rpm);
-void intel_runtime_pm_cleanup(struct intel_runtime_pm *rpm);
+void intel_runtime_pm_driver_release(struct intel_runtime_pm *rpm);
 
 intel_wakeref_t intel_runtime_pm_get(struct intel_runtime_pm *rpm);
 intel_wakeref_t intel_runtime_pm_get_if_in_use(struct intel_runtime_pm *rpm);
Signature · 1 line
2.21.0
#4 lore raw

RFC PATCH 4/6 drm/i915: Propagate "_remove" function name suffix down

In reply to Janusz Krzysztofik

Similar to the "_release" case, consistently replace mixed "_cleanup"/"_fini"/"_fini_hw" components found in names of functions called from i915_driver_remove() with "_remove" or "_driver_remove" suffixes for better code readability.

---
 drivers/gpu/drm/i915/display/intel_bios.c     |  4 ++--
 drivers/gpu/drm/i915/display/intel_bios.h     |  2 +-
 drivers/gpu/drm/i915/display/intel_display.c  |  2 +-
 .../drm/i915/display/intel_display_power.c    |  6 ++---
 .../drm/i915/display/intel_display_power.h    |  2 +-
 drivers/gpu/drm/i915/i915_drv.c               | 24 +++++++++----------
 drivers/gpu/drm/i915/i915_drv.h               |  4 ++--
 drivers/gpu/drm/i915/i915_gem.c               |  2 +-
 drivers/gpu/drm/i915/intel_gvt.c              |  5 ++--
 drivers/gpu/drm/i915/intel_gvt.h              |  4 ++--
 10 files changed, 28 insertions(+), 27 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +2 -2
index 0c9808132d67..3c725edc79ef 100644
@@ -1891,10 +1891,10 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
 }
 
 /**
- * intel_bios_cleanup - Free any resources allocated by intel_bios_init()
+ * intel_bios_driver_remove - Free any resources allocated by intel_bios_init()
  * @dev_priv: i915 device instance
  */
-void intel_bios_cleanup(struct drm_i915_private *dev_priv)
+void intel_bios_driver_remove(struct drm_i915_private *dev_priv)
 {
 	kfree(dev_priv->vbt.child_dev);
 	dev_priv->vbt.child_dev = NULL;
drivers/gpu/drm/i915/display/intel_bios.h +1 -1
index 0b7be6389a07..4969189e620f 100644
@@ -228,7 +228,7 @@ struct mipi_pps_data {
 } __packed;
 
 void intel_bios_init(struct drm_i915_private *dev_priv);
-void intel_bios_cleanup(struct drm_i915_private *dev_priv);
+void intel_bios_driver_remove(struct drm_i915_private *dev_priv);
 bool intel_bios_is_valid_vbt(const void *buf, size_t size);
 bool intel_bios_is_tv_present(struct drm_i915_private *dev_priv);
 bool intel_bios_is_lvds_present(struct drm_i915_private *dev_priv, u8 *i2c_pin);
drivers/gpu/drm/i915/display/intel_display.c +1 -1
index f09eda75711a..47dd682c9a62 100644
@@ -17062,7 +17062,7 @@ static void intel_hpd_poll_fini(struct drm_device *dev)
 	drm_connector_list_iter_end(&conn_iter);
 }
 
-void intel_modeset_cleanup(struct drm_device *dev)
+void intel_modeset_driver_remove(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = to_i915(dev);
 
drivers/gpu/drm/i915/display/intel_display_power.c +3 -3
index 7437fc71d289..5f4939a9ca90 100644
@@ -4427,7 +4427,7 @@ static void intel_power_domains_verify_state(struct drm_i915_private *dev_priv);
  *
  * It will return with power domains disabled (to be enabled later by
  * intel_power_domains_enable()) and must be paired with
- * intel_power_domains_fini_hw().
+ * intel_power_domains_driver_remove().
  */
 void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
 {
@@ -4479,7 +4479,7 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
 }
 
 /**
- * intel_power_domains_fini_hw - deinitialize hw power domain state
+ * intel_power_domains_driver_remove - deinitialize hw power domain state
  * @i915: i915 device instance
  *
  * De-initializes the display power domain HW state. It also ensures that the
@@ -4489,7 +4489,7 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
  * intel_power_domains_disable()) and must be paired with
  * intel_power_domains_init_hw().
  */
-void intel_power_domains_fini_hw(struct drm_i915_private *i915)
+void intel_power_domains_driver_remove(struct drm_i915_private *i915)
 {
 	intel_wakeref_t wakeref __maybe_unused =
 		fetch_and_zero(&i915->power_domains.wakeref);
drivers/gpu/drm/i915/display/intel_display_power.h +1 -1
index 8f43f7051a16..dbd1f5ef01d1 100644
@@ -214,7 +214,7 @@ void gen9_enable_dc5(struct drm_i915_private *dev_priv);
 int intel_power_domains_init(struct drm_i915_private *dev_priv);
 void intel_power_domains_cleanup(struct drm_i915_private *dev_priv);
 void intel_power_domains_init_hw(struct drm_i915_private *dev_priv, bool resume);
-void intel_power_domains_fini_hw(struct drm_i915_private *dev_priv);
+void intel_power_domains_driver_remove(struct drm_i915_private *dev_priv);
 void icl_display_core_init(struct drm_i915_private *dev_priv, bool resume);
 void icl_display_core_uninit(struct drm_i915_private *dev_priv);
 void intel_power_domains_enable(struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_drv.c +12 -12
index 36c872220f68..6e83fe96d930 100644
@@ -751,16 +751,16 @@ static int i915_load_modeset_init(struct drm_device *dev)
 
 cleanup_gem:
 	i915_gem_suspend(dev_priv);
-	i915_gem_fini_hw(dev_priv);
+	i915_gem_driver_remove(dev_priv);
 	i915_gem_driver_release(dev_priv);
 cleanup_modeset:
-	intel_modeset_cleanup(dev);
+	intel_modeset_driver_remove(dev);
 cleanup_irq:
 	intel_irq_uninstall(dev_priv);
 	intel_gmbus_teardown(dev_priv);
 cleanup_csr:
 	intel_csr_ucode_fini(dev_priv);
-	intel_power_domains_fini_hw(dev_priv);
+	intel_power_domains_driver_remove(dev_priv);
 	vga_switcheroo_unregister_client(pdev);
 cleanup_vga_client:
 	vga_client_register(pdev, NULL, NULL, NULL);
@@ -1692,10 +1692,10 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
 }
 
 /**
- * i915_driver_cleanup_hw - cleanup the setup done in i915_driver_init_hw()
+ * i915_driver_hw_remove - cleanup the setup done in i915_driver_hw_probe()
  * @dev_priv: device private
  */
-static void i915_driver_cleanup_hw(struct drm_i915_private *dev_priv)
+static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)
 {
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 
@@ -1929,7 +1929,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 
 out_cleanup_hw:
-	i915_driver_cleanup_hw(dev_priv);
+	i915_driver_hw_remove(dev_priv);
 	i915_ggtt_driver_release(dev_priv);
 
 	/* Paranoia: make sure we have disabled everything before we exit. */
@@ -1970,11 +1970,11 @@ void i915_driver_remove(struct drm_device *dev)
 
 	drm_atomic_helper_shutdown(dev);
 
-	intel_gvt_cleanup(dev_priv);
+	intel_gvt_driver_remove(dev_priv);
 
-	intel_modeset_cleanup(dev);
+	intel_modeset_driver_remove(dev);
 
-	intel_bios_cleanup(dev_priv);
+	intel_bios_driver_remove(dev_priv);
 
 	vga_switcheroo_unregister_client(pdev);
 	vga_client_register(pdev, NULL, NULL, NULL);
@@ -1985,11 +1985,11 @@ void i915_driver_remove(struct drm_device *dev)
 	cancel_delayed_work_sync(&dev_priv->gpu_error.hangcheck_work);
 	i915_reset_error_state(dev_priv);
 
-	i915_gem_fini_hw(dev_priv);
+	i915_gem_driver_remove(dev_priv);
 
-	intel_power_domains_fini_hw(dev_priv);
+	intel_power_domains_driver_remove(dev_priv);
 
-	i915_driver_cleanup_hw(dev_priv);
+	i915_driver_hw_remove(dev_priv);
 
 	enable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
 }
drivers/gpu/drm/i915/i915_drv.h +2 -2
index be9a2adab5dc..23d9853c5930 100644
@@ -2537,7 +2537,7 @@ bool i915_gem_unset_wedged(struct drm_i915_private *dev_priv);
 void i915_gem_init_mmio(struct drm_i915_private *i915);
 int __must_check i915_gem_init(struct drm_i915_private *dev_priv);
 int __must_check i915_gem_init_hw(struct drm_i915_private *dev_priv);
-void i915_gem_fini_hw(struct drm_i915_private *dev_priv);
+void i915_gem_driver_remove(struct drm_i915_private *dev_priv);
 void i915_gem_driver_release(struct drm_i915_private *dev_priv);
 int i915_gem_wait_for_idle(struct drm_i915_private *dev_priv,
 			   unsigned int flags, long timeout);
@@ -2693,7 +2693,7 @@ mkwrite_device_info(struct drm_i915_private *dev_priv)
 /* modesetting */
 extern void intel_modeset_init_hw(struct drm_device *dev);
 extern int intel_modeset_init(struct drm_device *dev);
-extern void intel_modeset_cleanup(struct drm_device *dev);
+extern void intel_modeset_driver_remove(struct drm_device *dev);
 extern int intel_modeset_vga_set_state(struct drm_i915_private *dev_priv,
 				       bool state);
 extern void intel_display_resume(struct drm_device *dev);
drivers/gpu/drm/i915/i915_gem.c +1 -1
index 51a0fbaa781b..37fe2ed2f582 100644
@@ -1600,7 +1600,7 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
 	return ret;
 }
 
-void i915_gem_fini_hw(struct drm_i915_private *dev_priv)
+void i915_gem_driver_remove(struct drm_i915_private *dev_priv)
 {
 	GEM_BUG_ON(dev_priv->gt.awake);
 
drivers/gpu/drm/i915/intel_gvt.c +3 -2
index 842ee26effd4..c66b2d8a6219 100644
@@ -122,13 +122,14 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)
 }
 
 /**
- * intel_gvt_cleanup - cleanup GVT components when i915 driver is unloading
+ * intel_gvt_driver_remove - cleanup GVT components when i915 driver is
+ *			     unbinding
  * @dev_priv: drm i915 private *
  *
  * This function is called at the i915 driver unloading stage, to shutdown
  * GVT components and release the related resources.
  */
-void intel_gvt_cleanup(struct drm_i915_private *dev_priv)
+void intel_gvt_driver_remove(struct drm_i915_private *dev_priv)
 {
 	if (!intel_gvt_active(dev_priv))
 		return;
drivers/gpu/drm/i915/intel_gvt.h +2 -2
index 85ce37eb7cd6..21d58f6b9e89 100644
@@ -28,7 +28,7 @@ struct drm_i915_private;
 
 #ifdef CONFIG_DRM_I915_GVT
 int intel_gvt_init(struct drm_i915_private *dev_priv);
-void intel_gvt_cleanup(struct drm_i915_private *dev_priv);
+void intel_gvt_driver_remove(struct drm_i915_private *dev_priv);
 int intel_gvt_init_device(struct drm_i915_private *dev_priv);
 void intel_gvt_clean_device(struct drm_i915_private *dev_priv);
 int intel_gvt_init_host(void);
@@ -38,7 +38,7 @@ static inline int intel_gvt_init(struct drm_i915_private *dev_priv)
 {
 	return 0;
 }
-static inline void intel_gvt_cleanup(struct drm_i915_private *dev_priv)
+static inline void intel_gvt_driver_remove(struct drm_i915_private *dev_priv)
 {
 }
 
Signature · 1 line
2.21.0
#5 lore raw

RFC PATCH 5/6 drm/i915: Propagate "_probe" function name suffix down

In reply to Janusz Krzysztofik

Similar to the "_release" and "_remove" cases, consequently replace "_init" components of names of functions called from i915_driver_probe() with "_probe" suffixes for better code readability.

---
 drivers/gpu/drm/i915/i915_drv.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +13 -13
index 6e83fe96d930..7241a7d14e9b 100644
@@ -675,7 +675,7 @@ static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {
 	.can_switch = i915_switcheroo_can_switch,
 };
 
-static int i915_load_modeset_init(struct drm_device *dev)
+static int i915_driver_modeset_probe(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct pci_dev *pdev = dev_priv->drm.pdev;
@@ -884,7 +884,7 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
 }
 
 /**
- * i915_driver_init_early - setup state not requiring device access
+ * i915_driver_early_probe - setup state not requiring device access
  * @dev_priv: device private
  *
  * Initialize everything that is a "SW-only" state, that is state not
@@ -893,7 +893,7 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
  * system memory allocation, setting up device specific attributes and
  * function hooks not requiring accessing the device.
  */
-static int i915_driver_init_early(struct drm_i915_private *dev_priv)
+static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
 {
 	int ret = 0;
 
@@ -963,7 +963,7 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv)
 
 /**
  * i915_driver_early_release - cleanup the setup done in
- *			       i915_driver_init_early()
+ *			       i915_driver_early_probe()
  * @dev_priv: device private
  */
 static void i915_driver_early_release(struct drm_i915_private *dev_priv)
@@ -980,7 +980,7 @@ static void i915_driver_early_release(struct drm_i915_private *dev_priv)
 }
 
 /**
- * i915_driver_init_mmio - setup device MMIO
+ * i915_driver_mmio_probe - setup device MMIO
  * @dev_priv: device private
  *
  * Setup minimal device state necessary for MMIO accesses later in the
@@ -988,7 +988,7 @@ static void i915_driver_early_release(struct drm_i915_private *dev_priv)
  * side effects or exposing the driver via kernel internal or user space
  * interfaces.
  */
-static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
+static int i915_driver_mmio_probe(struct drm_i915_private *dev_priv)
 {
 	int ret;
 
@@ -1029,7 +1029,7 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
 }
 
 /**
- * i915_driver_mmio_release - cleanup the setup done in i915_driver_init_mmio()
+ * i915_driver_mmio_release - cleanup the setup done in i915_driver_mmio_probe()
  * @dev_priv: device private
  */
 static void i915_driver_mmio_release(struct drm_i915_private *dev_priv)
@@ -1525,13 +1525,13 @@ static void edram_detect(struct drm_i915_private *dev_priv)
 }
 
 /**
- * i915_driver_init_hw - setup state requiring device access
+ * i915_driver_hw_probe - setup state requiring device access
  * @dev_priv: device private
  *
  * Setup state that requires accessing the device, but doesn't require
  * exposing the driver via kernel internal or userspace interfaces.
  */
-static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
+static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
 {
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 	int ret;
@@ -1900,7 +1900,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (ret)
 		goto out_fini;
 
-	ret = i915_driver_init_early(dev_priv);
+	ret = i915_driver_early_probe(dev_priv);
 	if (ret < 0)
 		goto out_pci_disable;
 
@@ -1908,15 +1908,15 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	i915_detect_vgpu(dev_priv);
 
-	ret = i915_driver_init_mmio(dev_priv);
+	ret = i915_driver_mmio_probe(dev_priv);
 	if (ret < 0)
 		goto out_runtime_pm_put;
 
-	ret = i915_driver_init_hw(dev_priv);
+	ret = i915_driver_hw_probe(dev_priv);
 	if (ret < 0)
 		goto out_cleanup_mmio;
 
-	ret = i915_load_modeset_init(&dev_priv->drm);
+	ret = i915_driver_modeset_probe(&dev_priv->drm);
 	if (ret < 0)
 		goto out_cleanup_hw;
 
Signature · 1 line
2.21.0
#6 lore raw

RFC PATCH 6/6 drm/i915: Rename "inject_load_failure" module parameter

In reply to Janusz Krzysztofik

Use the "probe" nomenclature for consistency with internally used names of functions and variables.

Requires adjustment of IGT tests and possibly affects other user custom applications.

---
 drivers/gpu/drm/i915/i915_drv.c    | 10 +++++-----
 drivers/gpu/drm/i915/i915_params.c |  2 +-
 drivers/gpu/drm/i915/i915_params.h |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +5 -5
index 7241a7d14e9b..3bac6be9f37d 100644
@@ -85,13 +85,13 @@ static unsigned int i915_probe_fail_count;
 
 bool __i915_inject_probe_failure(const char *func, int line)
 {
-	if (i915_probe_fail_count >= i915_modparams.inject_load_failure)
+	if (i915_probe_fail_count >= i915_modparams.inject_probe_failure)
 		return false;
 
-	if (++i915_probe_fail_count == i915_modparams.inject_load_failure) {
+	if (++i915_probe_fail_count == i915_modparams.inject_probe_failure) {
 		DRM_INFO("Injecting failure at checkpoint %u [%s:%d]\n",
-			 i915_modparams.inject_load_failure, func, line);
-		i915_modparams.inject_load_failure = 0;
+			 i915_modparams.inject_probe_failure, func, line);
+		i915_modparams.inject_probe_failure = 0;
 		return true;
 	}
 
@@ -100,7 +100,7 @@ bool __i915_inject_probe_failure(const char *func, int line)
 
 bool i915_error_injected(void)
 {
-	return i915_probe_fail_count && !i915_modparams.inject_load_failure;
+	return i915_probe_fail_count && !i915_modparams.inject_probe_failure;
 }
 
 #endif
drivers/gpu/drm/i915/i915_params.c +1 -1
index 296452f9efe4..59a6586dae15 100644
@@ -165,7 +165,7 @@ i915_param_named_unsafe(enable_dp_mst, bool, 0600,
 	"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");
 
 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
-i915_param_named_unsafe(inject_load_failure, uint, 0400,
+i915_param_named_unsafe(inject_probe_failure, uint, 0400,
 	"Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)");
 #endif
 
drivers/gpu/drm/i915/i915_params.h +1 -1
index d29ade3b7de6..8c887413fc70 100644
@@ -62,7 +62,7 @@ struct drm_printer;
 	param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO)) \
 	param(int, edp_vswing, 0) \
 	param(int, reset, 2) \
-	param(unsigned int, inject_load_failure, 0) \
+	param(unsigned int, inject_probe_failure, 0) \
 	param(int, fastboot, -1) \
 	param(int, enable_dpcd_backlight, 0) \
 	param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE) \
Signature · 1 line
2.21.0
#7 lore raw

✗ Fi.CI.CHECKPATCH: warning for Rename functions to match their entry points

In reply to Janusz Krzysztofik
== Series Details ==

== Series Details ==

Series: Rename functions to match their entry points
URL : https://patchwork.freedesktop.org/series/63498/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
918d25b99c3e drm/i915: Rename "_load"/"_unload" to match PCI entry points
-:56: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#56: FILE: drivers/gpu/drm/i915/i915_drv.h:2398:
+extern int i915_driver_probe(struct pci_dev *pdev,

-:57: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #57: FILE: drivers/gpu/drm/i915/i915_drv.h:2399:
+extern int i915_driver_probe(struct pci_dev *pdev,
const struct pci_device_id *ent);

-:59: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #59: FILE: drivers/gpu/drm/i915/i915_drv.h:2400:
+extern void i915_driver_remove(struct drm_device *dev);

total: 0 errors, 0 warnings, 3 checks, 55 lines checked 0d07a035491e drm/i915: Replace "_load" with "_probe" consequently a01c5039702d drm/i915: Propagate "_release" function name suffix down c899c5e11c03 drm/i915: Propagate "_remove" function name suffix down -:194: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #194: FILE: drivers/gpu/drm/i915/i915_drv.h:2695:
+extern void intel_modeset_driver_remove(struct drm_device *dev);

-:250: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #250: FILE: drivers/gpu/drm/i915/intel_gvt.h:41:
}
+static inline void intel_gvt_driver_remove(struct drm_i915_private *dev_priv)

total: 0 errors, 0 warnings, 2 checks, 183 lines checked
ac7ebaf5f172 drm/i915: Propagate "_probe" function name suffix down
accec2284e64 drm/i915: Rename "inject_load_failure" module parameter
-:55: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#55: FILE: drivers/gpu/drm/i915/i915_params.c:169:
+i915_param_named_unsafe(inject_probe_failure, uint, 0400,
"Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)");

total: 0 errors, 0 warnings, 1 checks, 41 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
In reply to Janusz Krzysztofik

Quoting Janusz Krzysztofik (2019-07-10 13:36:25)

Quoted 9 lines

Need for this was identified while working on split of driver unbind path into _remove() and _release() parts. Consistency in function naming has been recognized as helpful when trying to work out which phase the code is in.

What I'm still not sure about is desired depth of that modification - how deep should we go down with renaming to not override meaningfull function names. Please advise if you think still more deep renaming makes sense.

I did a double take over "driver_release" but by the end I was in agreement.

The early_release though, that is worth a bit of artistic license to say early_probe pairs with late_release.
-Chris

#9 lore raw
Quoted 11 lines · CEST Chris Wilson

Quoting Janusz Krzysztofik (2019-07-10 13:36:25)

Quoted 9 lines

Need for this was identified while working on split of driver unbind path into _remove() and _release() parts. Consistency in function naming has been recognized as helpful when trying to work out which phase the code is in.

What I'm still not sure about is desired depth of that modification - how deep should we go down with renaming to not override meaningfull function names. Please advise if you think still more deep renaming makes sense.

Quoted 5 lines

I did a double take over "driver_release" but by the end I was in agreement.

The early_release though, that is worth a bit of artistic license to say early_probe pairs with late_release.

OK, I'll fix it, as well as other issues pointed out by dim, and resubmit.

Thanks,
Janusz

Quoted 2 lines

-Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

✗ Fi.CI.BAT: failure for Rename functions to match their entry points

In reply to Janusz Krzysztofik
== Series Details ==

== Series Details ==

Series: Rename functions to match their entry points
URL : https://patchwork.freedesktop.org/series/63498/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6448 -> Patchwork_13599
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_13599 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_13599, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_13599:

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@reload-with-fault-injection:
- fi-kbl-8809g: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-kbl-8809g/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-kbl-8809g/igt@[email protected]
- fi-skl-gvtdvm: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-gvtdvm/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-gvtdvm/igt@[email protected]
- fi-byt-j1900: [PASS][5] -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-byt-j1900/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-byt-j1900/igt@[email protected]
- fi-cfl-guc: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-cfl-guc/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-cfl-guc/igt@[email protected]
- fi-cml-u: [PASS][9] -> [FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-cml-u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-cml-u/igt@[email protected]
- fi-skl-guc: [PASS][11] -> [FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-guc/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-guc/igt@[email protected]
- fi-cfl-8700k: [PASS][13] -> [FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-cfl-8700k/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-cfl-8700k/igt@[email protected]
- fi-skl-6700k2: [PASS][15] -> [FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-6700k2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-6700k2/igt@[email protected]
- fi-elk-e7500: [PASS][17] -> [FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-elk-e7500/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-elk-e7500/igt@[email protected]
- fi-apl-guc: [PASS][19] -> [FAIL][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-apl-guc/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-apl-guc/igt@[email protected]
- fi-bsw-kefka: [PASS][21] -> [FAIL][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bsw-kefka/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bsw-kefka/igt@[email protected]
- fi-icl-dsi: [PASS][23] -> [FAIL][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-icl-dsi/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-icl-dsi/igt@[email protected]
- fi-bwr-2160: [PASS][25] -> [FAIL][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bwr-2160/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bwr-2160/igt@[email protected]
- fi-skl-6770hq: [PASS][27] -> [FAIL][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-6770hq/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-6770hq/igt@[email protected]
- fi-skl-6600u: [PASS][29] -> [FAIL][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-6600u/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-6600u/igt@[email protected]
- fi-kbl-guc: [PASS][31] -> [FAIL][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-kbl-guc/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-kbl-guc/igt@[email protected]
- fi-cfl-8109u: [PASS][33] -> [FAIL][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-cfl-8109u/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-cfl-8109u/igt@[email protected]
- fi-skl-lmem: [PASS][35] -> [FAIL][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-lmem/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-lmem/igt@[email protected]
- fi-kbl-r: [PASS][37] -> [FAIL][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-kbl-r/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-kbl-r/igt@[email protected]
- fi-skl-6260u: [PASS][39] -> [FAIL][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-6260u/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-6260u/igt@[email protected]
- fi-byt-n2820: [PASS][41] -> [FAIL][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-byt-n2820/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-byt-n2820/igt@[email protected]
- fi-cml-u2: [PASS][43] -> [FAIL][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-cml-u2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-cml-u2/igt@[email protected]
- fi-bxt-dsi: [PASS][45] -> [FAIL][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bxt-dsi/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bxt-dsi/igt@[email protected]
- fi-hsw-4770: [PASS][47] -> [FAIL][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-hsw-4770/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-hsw-4770/igt@[email protected]
- fi-snb-2600: [PASS][49] -> [FAIL][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-snb-2600/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-snb-2600/igt@[email protected]
- fi-bxt-j4205: [PASS][51] -> [FAIL][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bxt-j4205/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bxt-j4205/igt@[email protected]
- fi-whl-u: [PASS][53] -> [FAIL][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-whl-u/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-whl-u/igt@[email protected]
- fi-icl-u3: [PASS][55] -> [FAIL][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-icl-u3/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-icl-u3/igt@[email protected]
- fi-kbl-7567u: [PASS][57] -> [FAIL][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-kbl-7567u/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-kbl-7567u/igt@[email protected]
- fi-ilk-650: [PASS][59] -> [FAIL][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-ilk-650/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-ilk-650/igt@[email protected]
- fi-bsw-n3050: [PASS][61] -> [FAIL][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bsw-n3050/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bsw-n3050/igt@[email protected]
- fi-ivb-3770: [PASS][63] -> [FAIL][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-ivb-3770/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-ivb-3770/igt@[email protected]
- fi-bdw-gvtdvm: [PASS][65] -> [FAIL][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bdw-gvtdvm/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bdw-gvtdvm/igt@[email protected]
- fi-hsw-peppy: [PASS][67] -> [FAIL][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-hsw-peppy/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-hsw-peppy/igt@[email protected]
- fi-skl-iommu: [PASS][69] -> [FAIL][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-iommu/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-iommu/igt@[email protected]
- fi-glk-dsi: [PASS][71] -> [FAIL][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-glk-dsi/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-glk-dsi/igt@[email protected]
- fi-hsw-4770r: [PASS][73] -> [FAIL][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-hsw-4770r/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-hsw-4770r/igt@[email protected]
- fi-snb-2520m: [PASS][75] -> [FAIL][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-snb-2520m/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-snb-2520m/igt@[email protected]
- fi-kbl-x1275: [PASS][77] -> [FAIL][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-kbl-x1275/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-kbl-x1275/igt@[email protected]
- fi-kbl-7500u: [PASS][79] -> [FAIL][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-kbl-7500u/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-kbl-7500u/igt@[email protected]
- fi-bdw-5557u: [PASS][81] -> [FAIL][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bdw-5557u/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bdw-5557u/igt@[email protected]

#### Warnings ####

* igt@i915_module_load@reload-with-fault-injection:
- fi-icl-u2: [DMESG-WARN][83] ([fdo#110595]) -> [DMESG-FAIL][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-icl-u2/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-icl-u2/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_module_load@reload-with-fault-injection:
- {fi-icl-u4}: [PASS][85] -> [FAIL][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-icl-u4/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-icl-u4/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_13599 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: [PASS][87] -> [INCOMPLETE][88] ([fdo#107718])
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-blb-e6850/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-blb-e6850/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- fi-skl-6600u: [PASS][89] -> [INCOMPLETE][90] ([fdo#107807])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-skl-6600u/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-skl-6600u/igt@[email protected]

* igt@i915_selftest@live_contexts:
- fi-icl-dsi: [PASS][91] -> [INCOMPLETE][92] ([fdo#107713] / [fdo#108569])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-icl-dsi/igt@i915_selftest@live_contexts.html
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-icl-dsi/igt@i915_selftest@live_contexts.html

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][93] -> [FAIL][94] ([fdo#109485])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-kbl-7500u/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-kbl-7500u/igt@[email protected]

* igt@prime_busy@basic-wait-after-default:
- fi-icl-u3: [PASS][95] -> [DMESG-WARN][96] ([fdo#107724]) +2 similar issues
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-icl-u3/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-icl-u3/igt@[email protected]

#### Possible fixes ####

* igt@i915_pm_rpm@module-reload:
- fi-bxt-dsi: [DMESG-WARN][97] -> [PASS][98]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6448/fi-bxt-dsi/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/fi-bxt-dsi/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#110595]: https://bugs.freedesktop.org/show_bug.cgi?id=110595

Participating hosts (51 -> 45)
------------------------------

Missing (6): fi-bsw-cyan fi-gdg-551 fi-pnv-d510 fi-icl-y fi-byt-clapper fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_6448 -> Patchwork_13599

CI_DRM_6448: 9c6e1ccf8c5a461d73dc0ec8de55a2c2621578cf @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5092: 2a66ae6626d5583240509f84117d1345a799b75a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13599: accec2284e64cdab6aadad49d80bbfcd67f8737c @ git://anongit.freedesktop.org/gfx-ci/linux

== Kernel 32bit build ==

Warning: Kernel 32bit buildtest failed:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/build_32bit.log

  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h

Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 112 modules
ERROR: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: "__divdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1287: recipe for target 'modules' failed
make: *** [modules] Error 2

== Linux commits ==

accec2284e64 drm/i915: Rename "inject_load_failure" module parameter ac7ebaf5f172 drm/i915: Propagate "_probe" function name suffix down c899c5e11c03 drm/i915: Propagate "_remove" function name suffix down a01c5039702d drm/i915: Propagate "_release" function name suffix down 0d07a035491e drm/i915: Replace "_load" with "_probe" consequently 918d25b99c3e drm/i915: Rename "_load"/"_unload" to match PCI entry points

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13599/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx