From: kernel test robot <lkp@intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
airlied@linux.ie, daniel@ffwll.ch, jani.nikula@linux.intel.com,
joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com
Cc: kbuild-all@lists.01.org, nouveau@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH v3 8/8] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev
Date: Thu, 7 Jan 2021 17:47:27 +0800 [thread overview]
Message-ID: <202101071707.xX7RehpP-lkp@intel.com> (raw)
In-Reply-To: <20210107080748.4768-9-tzimmermann@suse.de>
[-- Attachment #1: Type: text/plain, Size: 6045 bytes --]
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@intel.com>
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@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28882 bytes --]
[-- Attachment #3: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2021-01-07 9:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 8:07 [PATCH v3 0/8] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 1/8] drm/amdgpu: Fix trailing whitespaces Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 2/8] drm/amdgpu: Remove references to struct drm_device.pdev Thomas Zimmermann
2021-01-18 13:50 ` Christian König
2021-01-18 14:40 ` Thomas Zimmermann
2021-01-18 14:56 ` Daniel Vetter
2021-01-18 15:02 ` Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 3/8] drm/hibmc: " Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 4/8] drm/i915: " Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 5/8] drm/i915/gt: " Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 6/8] drm/i915/gvt: " Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 7/8] drm/nouveau: " Thomas Zimmermann
2021-01-07 8:07 ` [PATCH v3 8/8] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev Thomas Zimmermann
2021-01-07 9:45 ` kernel test robot
2021-01-07 10:45 ` Thomas Zimmermann
2021-01-08 1:25 ` [kbuild-all] " Rong Chen
2021-01-08 8:04 ` Thomas Zimmermann
2021-01-08 9:02 ` Daniel Vetter
2021-01-07 9:47 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202101071707.xX7RehpP-lkp@intel.com \
--to=lkp@intel.com \
--cc=airlied@linux.ie \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kbuild-all@lists.01.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).