Re: [PATCH] drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.19-rc7 next-20181011]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-Prevent-machine-hang-from-Broxton-s-vtd-w-a-and-error-capture/20181012-053134
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-s1-10111203 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/i915/i915_gpu_error.c: In function 'i915_capture_error_state':
>> drivers/gpu//drm/i915/i915_gpu_error.c:1827:28: error: 'dev_priv' undeclared (first use in this function)
      i915_disable_error_state(dev_priv, -ENOMEM);
                               ^~~~~~~~
   drivers/gpu//drm/i915/i915_gpu_error.c:1827:28: note: each undeclared identifier is reported only once for each function it appears in

vim +/dev_priv +1827 drivers/gpu//drm/i915/i915_gpu_error.c

  1798	
  1799	/**
  1800	 * i915_capture_error_state - capture an error record for later analysis
  1801	 * @i915: i915 device
  1802	 * @engine_mask: the mask of engines triggering the hang
  1803	 * @error_msg: a message to insert into the error capture header
  1804	 *
  1805	 * Should be called when an error is detected (either a hang or an error
  1806	 * interrupt) to capture error state from the time of the error.  Fills
  1807	 * out a structure which becomes available in debugfs for user level tools
  1808	 * to pick up.
  1809	 */
  1810	void i915_capture_error_state(struct drm_i915_private *i915,
  1811				      u32 engine_mask,
  1812				      const char *error_msg)
  1813	{
  1814		static bool warned;
  1815		struct i915_gpu_state *error;
  1816		unsigned long flags;
  1817	
  1818		if (!i915_modparams.error_capture)
  1819			return;
  1820	
  1821		if (READ_ONCE(i915->gpu_error.first_error))
  1822			return;
  1823	
  1824		error = i915_capture_gpu_state(i915);
  1825		if (!error) {
  1826			DRM_DEBUG_DRIVER("out of memory, not capturing error state\n");
> 1827			i915_disable_error_state(dev_priv, -ENOMEM);
  1828			return;
  1829		}
  1830	
  1831		i915_error_capture_msg(i915, error, engine_mask, error_msg);
  1832		DRM_INFO("%s\n", error->error_msg);
  1833	
  1834		if (!error->simulated) {
  1835			spin_lock_irqsave(&i915->gpu_error.lock, flags);
  1836			if (!i915->gpu_error.first_error) {
  1837				i915->gpu_error.first_error = error;
  1838				error = NULL;
  1839			}
  1840			spin_unlock_irqrestore(&i915->gpu_error.lock, flags);
  1841		}
  1842	
  1843		if (error) {
  1844			__i915_gpu_state_free(&error->ref);
  1845			return;
  1846		}
  1847	
  1848		if (!warned &&
  1849		    ktime_get_real_seconds() - DRIVER_TIMESTAMP < DAY_AS_SECONDS(180)) {
  1850			DRM_INFO("GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.\n");
  1851			DRM_INFO("Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel\n");
  1852			DRM_INFO("drm/i915 developers can then reassign to the right component if it's not a kernel issue.\n");
  1853			DRM_INFO("The gpu crash dump is required to analyze gpu hangs, so please always attach it.\n");
  1854			DRM_INFO("GPU crash dump saved to /sys/class/drm/card%d/error\n",
  1855				 i915->drm.primary->index);
  1856			warned = true;
  1857		}
  1858	}
  1859	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux