Re: [PATCH v9 13/13] drm/i915/guc: Print the GuC error capture output register list.

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

 



This is an actual bug I missed - will fix this - would cause a compilation error when enabling "CONFIG_DRM_I915_DEBUG_GUC"

On 3/14/2022 7:26 PM, kernel test robot wrote:
Hi Alan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next v5.17-rc8 next-20220310]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Alan-Previn/Add-GuC-Error-Capture-Support/20220315-010958
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220315/202203151007.mYugtWwO-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 3e4950d7fa78ac83f33bbf1658e2f49a73719236)
reproduce (this is a W=1 build):
         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         # https://github.com/0day-ci/linux/commit/90c08c10562cba1ebf8b31788e7a9550c7637838
         git remote add linux-review https://github.com/0day-ci/linux
         git fetch --no-tags linux-review Alan-Previn/Add-GuC-Error-Capture-Support/20220315-010958
         git checkout 90c08c10562cba1ebf8b31788e7a9550c7637838
         # save the config file to linux build tree
         mkdir build_dir
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1497:2: error: no member named 'drm' in 'struct drm_i915_error_state_buf'
            __out(ebuf, "global --- GuC Error Capture on %s command stream:\n",
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1442:19: note: expanded from macro '__out'
                    drm_warn((&(a)->drm), __VA_ARGS__); \
                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:435:16: note: expanded from macro 'drm_warn'
            __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:425:21: note: expanded from macro '__drm_printk'
            dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:146:49: note: expanded from macro 'dev_warn'
            dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
                    _p_func(dev, fmt, ##__VA_ARGS__);                       \
                            ^~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1502:3: error: no member named 'drm' in 'struct drm_i915_error_state_buf'
                    __out(ebuf, "  No matching ee-node\n");
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1442:19: note: expanded from macro '__out'
                    drm_warn((&(a)->drm), __VA_ARGS__); \
                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:435:16: note: expanded from macro 'drm_warn'
            __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:425:21: note: expanded from macro '__drm_printk'
            dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:146:49: note: expanded from macro 'dev_warn'
            dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
                    _p_func(dev, fmt, ##__VA_ARGS__);                       \
                            ^~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1506:2: error: no member named 'drm' in 'struct drm_i915_error_state_buf'
            __out(ebuf, "Coverage:  %s\n", grptype[node->is_partial]);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1442:19: note: expanded from macro '__out'
                    drm_warn((&(a)->drm), __VA_ARGS__); \
                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:435:16: note: expanded from macro 'drm_warn'
            __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:425:21: note: expanded from macro '__drm_printk'
            dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:146:49: note: expanded from macro 'dev_warn'
            dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
                    _p_func(dev, fmt, ##__VA_ARGS__);                       \
                            ^~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1509:3: error: no member named 'drm' in 'struct drm_i915_error_state_buf'
                    __out(ebuf, "  RegListType: %s\n",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1442:19: note: expanded from macro '__out'
                    drm_warn((&(a)->drm), __VA_ARGS__); \
                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:435:16: note: expanded from macro 'drm_warn'
            __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:425:21: note: expanded from macro '__drm_printk'
            dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:146:49: note: expanded from macro 'dev_warn'
            dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
                    _p_func(dev, fmt, ##__VA_ARGS__);                       \
                            ^~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1511:3: error: no member named 'drm' in 'struct drm_i915_error_state_buf'
                    __out(ebuf, "    Owner-Id: %d\n", node->reginfo[i].vfid);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1442:19: note: expanded from macro '__out'
                    drm_warn((&(a)->drm), __VA_ARGS__); \
                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:435:16: note: expanded from macro 'drm_warn'
            __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:425:21: note: expanded from macro '__drm_printk'
            dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:146:49: note: expanded from macro 'dev_warn'
            dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
                    _p_func(dev, fmt, ##__VA_ARGS__);                       \
                            ^~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1518:4: error: no member named 'drm' in 'struct drm_i915_error_state_buf'
                            __out(ebuf, "    GuC-Eng-Class: %d\n", node->eng_class);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c:1442:19: note: expanded from macro '__out'
                    drm_warn((&(a)->drm), __VA_ARGS__); \
                    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:435:16: note: expanded from macro 'drm_warn'
            __drm_printk((drm), warn,, fmt, ##__VA_ARGS__)
            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/drm/drm_print.h:425:21: note: expanded from macro '__drm_printk'
            dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)


vim +1497 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c

   1449	
   1450	#define GCAP_PRINT_INTEL_ENG_INFO(ebuf, eng) \
   1451		do { \
   1452			__out(ebuf, "    i915-Eng-Name: %s command stream\n", \
   1453			      (eng)->name); \
   1454			__out(ebuf, "    i915-Eng-Inst-Class: 0x%02x\n", (eng)->class); \
   1455			__out(ebuf, "    i915-Eng-Inst-Id: 0x%02x\n", (eng)->instance); \
   1456			__out(ebuf, "    i915-Eng-LogicalMask: 0x%08x\n", \
   1457			      (eng)->logical_mask); \
   1458		} while (0)
   1459	
   1460	#define GCAP_PRINT_GUC_INST_INFO(ebuf, node) \
   1461		do { \
   1462			__out(ebuf, "    GuC-Engine-Inst-Id: 0x%08x\n", \
   1463			      (node)->eng_inst); \
   1464			__out(ebuf, "    GuC-Context-Id: 0x%08x\n", (node)->guc_id); \
   1465			__out(ebuf, "    LRCA: 0x%08x\n", (node)->lrca); \
   1466		} while (0)
   1467	
   1468	int intel_guc_capture_print_engine_node(struct drm_i915_error_state_buf *ebuf,
   1469						const struct intel_engine_coredump *ee)
   1470	{
   1471		const char *grptype[GUC_STATE_CAPTURE_GROUP_TYPE_MAX] = {
   1472			"full-capture",
   1473			"partial-capture"
   1474		};
   1475		const char *datatype[GUC_CAPTURE_LIST_TYPE_MAX] = {
   1476			"Global",
   1477			"Engine-Class",
   1478			"Engine-Instance"
   1479		};
   1480		struct intel_guc_state_capture *cap;
   1481		struct __guc_capture_parsed_output *node;
   1482		struct intel_engine_cs *eng;
   1483		struct guc_mmio_reg *regs;
   1484		struct intel_guc *guc;
   1485		const char *str;
   1486		int numregs, i, j;
   1487		u32 is_ext;
   1488	
   1489		if (!ebuf || !ee)
   1490			return -EINVAL;
   1491		cap = ee->capture;
   1492		if (!cap || !ee->engine)
   1493			return -ENODEV;
   1494	
   1495		guc = &ee->engine->gt->uc.guc;
   1496	
1497		__out(ebuf, "global --- GuC Error Capture on %s command stream:\n",
   1498		      ee->engine->name);
   1499	
   1500		node = ee->guc_capture_node;
   1501		if (!node) {
   1502			__out(ebuf, "  No matching ee-node\n");
   1503			return 0;
   1504		}
   1505	
   1506		__out(ebuf, "Coverage:  %s\n", grptype[node->is_partial]);
   1507	
   1508		for (i = GUC_CAPTURE_LIST_TYPE_GLOBAL; i < GUC_CAPTURE_LIST_TYPE_MAX; ++i) {
   1509			__out(ebuf, "  RegListType: %s\n",
   1510			      datatype[i % GUC_CAPTURE_LIST_TYPE_MAX]);
   1511			__out(ebuf, "    Owner-Id: %d\n", node->reginfo[i].vfid);
   1512	
   1513			switch (i) {
   1514			case GUC_CAPTURE_LIST_TYPE_GLOBAL:
   1515			default:
   1516				break;
   1517			case GUC_CAPTURE_LIST_TYPE_ENGINE_CLASS:
   1518				__out(ebuf, "    GuC-Eng-Class: %d\n", node->eng_class);
   1519				__out(ebuf, "    i915-Eng-Class: %d\n",
   1520				      guc_class_to_engine_class(node->eng_class));
   1521				break;
   1522			case GUC_CAPTURE_LIST_TYPE_ENGINE_INSTANCE:
   1523				eng = intel_guc_lookup_engine(guc, node->eng_class, node->eng_inst);
   1524				if (eng)
   1525					GCAP_PRINT_INTEL_ENG_INFO(ebuf, eng);
   1526				else
   1527					__out(ebuf, "    i915-Eng-Lookup Fail!\n");
   1528				GCAP_PRINT_GUC_INST_INFO(ebuf, node);
   1529				break;
   1530			}
   1531	
   1532			numregs = node->reginfo[i].num_regs;
   1533			__out(ebuf, "    NumRegs: %d\n", numregs);
   1534			j = 0;
   1535			while (numregs--) {
   1536				regs = node->reginfo[i].regs;
   1537				str = guc_capture_reg_to_str(guc, GUC_CAPTURE_LIST_INDEX_PF, i,
   1538							     node->eng_class, 0, regs[j].offset, &is_ext);
   1539				if (!str)
   1540					__out(ebuf, "      REG-0x%08x", regs[j].offset);
   1541				else
   1542					__out(ebuf, "      %s", str);
   1543				if (is_ext)
   1544					__out(ebuf, "[%ld][%ld]",
   1545					      FIELD_GET(GUC_REGSET_STEERING_GROUP, regs[j].flags),
   1546					      FIELD_GET(GUC_REGSET_STEERING_INSTANCE, regs[j].flags));
   1547				__out(ebuf, ":  0x%08x\n", regs[j].value);
   1548				++j;
   1549			}
   1550		}
   1551		return 0;
   1552	}
   1553	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx



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

  Powered by Linux