mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	drm/i915: Replace "_load" with "_probe" consequently
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. Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190712112429.740-4-janusz.krzysztofik@linux.intel.com
This commit is contained in:
		
							parent
							
								
									b01558e56f
								
							
						
					
					
						commit
						f2db53f14d
					
				
					 9 changed files with 25 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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++) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -687,7 +687,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)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -903,7 +903,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);
 | 
			
		||||
| 
						 | 
				
			
			@ -997,7 +997,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))
 | 
			
		||||
| 
						 | 
				
			
			@ -1541,7 +1541,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);
 | 
			
		||||
| 
						 | 
				
			
			@ -1947,7 +1947,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;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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__)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,7 +1582,7 @@ 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,
 | 
			
		||||
			i915_probe_error(dev_priv,
 | 
			
		||||
					 "Failed to initialize GPU, declaring it wedged!\n");
 | 
			
		||||
			i915_gem_set_wedged(dev_priv);
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -957,7 +957,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;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue