Re: [PATCH v3 8/8] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev

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

 



Hi Thomas,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next linus/master v5.11-rc2 next-20210104]
[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/Thomas-Zimmermann/drm-Move-struct-drm_device-pdev-to-legacy/20210107-161007
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: microblaze-randconfig-r013-20210107 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
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/380912f7b62c23322562c40e19efd7ad84d57e9c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Thomas-Zimmermann/drm-Move-struct-drm_device-pdev-to-legacy/20210107-161007
        git checkout 380912f7b62c23322562c40e19efd7ad84d57e9c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze 

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/virtio/virtgpu_drv.c: In function 'virtio_gpu_pci_quirk':
>> drivers/gpu/drm/virtio/virtgpu_drv.c:57:7: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
      57 |  dev->pdev = pdev;
         |       ^~~~
         |       dev


vim +57 drivers/gpu/drm/virtio/virtgpu_drv.c

dc5698e80cf724 Dave Airlie     2013-09-09  46  
d516e75c71c985 Ezequiel Garcia 2019-01-08  47  static int virtio_gpu_pci_quirk(struct drm_device *dev, struct virtio_device *vdev)
d516e75c71c985 Ezequiel Garcia 2019-01-08  48  {
d516e75c71c985 Ezequiel Garcia 2019-01-08  49  	struct pci_dev *pdev = to_pci_dev(vdev->dev.parent);
d516e75c71c985 Ezequiel Garcia 2019-01-08  50  	const char *pname = dev_name(&pdev->dev);
d516e75c71c985 Ezequiel Garcia 2019-01-08  51  	bool vga = (pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA;
d516e75c71c985 Ezequiel Garcia 2019-01-08  52  	char unique[20];
d516e75c71c985 Ezequiel Garcia 2019-01-08  53  
d516e75c71c985 Ezequiel Garcia 2019-01-08  54  	DRM_INFO("pci: %s detected at %s\n",
d516e75c71c985 Ezequiel Garcia 2019-01-08  55  		 vga ? "virtio-vga" : "virtio-gpu-pci",
d516e75c71c985 Ezequiel Garcia 2019-01-08  56  		 pname);
d516e75c71c985 Ezequiel Garcia 2019-01-08 @57  	dev->pdev = pdev;
d516e75c71c985 Ezequiel Garcia 2019-01-08  58  	if (vga)
d516e75c71c985 Ezequiel Garcia 2019-01-08  59  		drm_fb_helper_remove_conflicting_pci_framebuffers(pdev,
d516e75c71c985 Ezequiel Garcia 2019-01-08  60  								  "virtiodrmfb");
d516e75c71c985 Ezequiel Garcia 2019-01-08  61  
d516e75c71c985 Ezequiel Garcia 2019-01-08  62  	/*
d516e75c71c985 Ezequiel Garcia 2019-01-08  63  	 * Normally the drm_dev_set_unique() call is done by core DRM.
d516e75c71c985 Ezequiel Garcia 2019-01-08  64  	 * The following comment covers, why virtio cannot rely on it.
d516e75c71c985 Ezequiel Garcia 2019-01-08  65  	 *
d516e75c71c985 Ezequiel Garcia 2019-01-08  66  	 * Unlike the other virtual GPU drivers, virtio abstracts the
d516e75c71c985 Ezequiel Garcia 2019-01-08  67  	 * underlying bus type by using struct virtio_device.
d516e75c71c985 Ezequiel Garcia 2019-01-08  68  	 *
d516e75c71c985 Ezequiel Garcia 2019-01-08  69  	 * Hence the dev_is_pci() check, used in core DRM, will fail
d516e75c71c985 Ezequiel Garcia 2019-01-08  70  	 * and the unique returned will be the virtio_device "virtio0",
d516e75c71c985 Ezequiel Garcia 2019-01-08  71  	 * while a "pci:..." one is required.
d516e75c71c985 Ezequiel Garcia 2019-01-08  72  	 *
d516e75c71c985 Ezequiel Garcia 2019-01-08  73  	 * A few other ideas were considered:
d516e75c71c985 Ezequiel Garcia 2019-01-08  74  	 * - Extend the dev_is_pci() check [in drm_set_busid] to
d516e75c71c985 Ezequiel Garcia 2019-01-08  75  	 *   consider virtio.
d516e75c71c985 Ezequiel Garcia 2019-01-08  76  	 *   Seems like a bigger hack than what we have already.
d516e75c71c985 Ezequiel Garcia 2019-01-08  77  	 *
d516e75c71c985 Ezequiel Garcia 2019-01-08  78  	 * - Point drm_device::dev to the parent of the virtio_device
d516e75c71c985 Ezequiel Garcia 2019-01-08  79  	 *   Semantic changes:
d516e75c71c985 Ezequiel Garcia 2019-01-08  80  	 *   * Using the wrong device for i2c, framebuffer_alloc and
d516e75c71c985 Ezequiel Garcia 2019-01-08  81  	 *     prime import.
d516e75c71c985 Ezequiel Garcia 2019-01-08  82  	 *   Visual changes:
d516e75c71c985 Ezequiel Garcia 2019-01-08  83  	 *   * Helpers such as DRM_DEV_ERROR, dev_info, drm_printer,
d516e75c71c985 Ezequiel Garcia 2019-01-08  84  	 *     will print the wrong information.
d516e75c71c985 Ezequiel Garcia 2019-01-08  85  	 *
d516e75c71c985 Ezequiel Garcia 2019-01-08  86  	 * We could address the latter issues, by introducing
d516e75c71c985 Ezequiel Garcia 2019-01-08  87  	 * drm_device::bus_dev, ... which would be used solely for this.
d516e75c71c985 Ezequiel Garcia 2019-01-08  88  	 *
d516e75c71c985 Ezequiel Garcia 2019-01-08  89  	 * So for the moment keep things as-is, with a bulky comment
d516e75c71c985 Ezequiel Garcia 2019-01-08  90  	 * for the next person who feels like removing this
d516e75c71c985 Ezequiel Garcia 2019-01-08  91  	 * drm_dev_set_unique() quirk.
d516e75c71c985 Ezequiel Garcia 2019-01-08  92  	 */
d516e75c71c985 Ezequiel Garcia 2019-01-08  93  	snprintf(unique, sizeof(unique), "pci:%s", pname);
d516e75c71c985 Ezequiel Garcia 2019-01-08  94  	return drm_dev_set_unique(dev, unique);
d516e75c71c985 Ezequiel Garcia 2019-01-08  95  }
d516e75c71c985 Ezequiel Garcia 2019-01-08  96  

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

Attachment: .config.gz
Description: application/gzip

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

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

  Powered by Linux