From: kernel test robot <lkp@intel.com>
To: Gurchetan Singh <gurchetansingh@chromium.org>,
dri-devel@lists.freedesktop.org, virtio-dev@lists.oasis-open.org
Cc: sebastien.boeuf@intel.com, kbuild-all@lists.01.org,
kraxel@redhat.com, vgoyal@redhat.com, mst@redhat.com
Subject: Re: [PATCH 14/24] drm/virtio: implement blob resources: probe for host visible region
Date: Sun, 16 Aug 2020 21:10:16 +0800 [thread overview]
Message-ID: <202008162148.IsbbfuIw%lkp@intel.com> (raw)
In-Reply-To: <20200814024000.2485-15-gurchetansingh@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 12369 bytes --]
Hi Gurchetan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip linus/master next-20200814]
[cannot apply to tegra-drm/drm/tegra/for-next drm/drm-next drm-exynos/exynos-drm-next v5.8]
[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/Gurchetan-Singh/Blob-prerequisites-blob-resources/20200814-104250
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-m021-20200816 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/gpu/drm/virtio/virtgpu_kms.c:227 virtio_gpu_init() error: uninitialized symbol 'ret'.
# https://github.com/0day-ci/linux/commit/ded3d7b8bb13eb8599f8d410f184521214e13328
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gurchetan-Singh/Blob-prerequisites-blob-resources/20200814-104250
git checkout ded3d7b8bb13eb8599f8d410f184521214e13328
vim +/ret +227 drivers/gpu/drm/virtio/virtgpu_kms.c
62fb7a5e10962a Gerd Hoffmann 2014-10-28 94
d516e75c71c985 Ezequiel Garcia 2019-01-08 95 int virtio_gpu_init(struct drm_device *dev)
dc5698e80cf724 Dave Airlie 2013-09-09 96 {
dc5698e80cf724 Dave Airlie 2013-09-09 97 static vq_callback_t *callbacks[] = {
dc5698e80cf724 Dave Airlie 2013-09-09 98 virtio_gpu_ctrl_ack, virtio_gpu_cursor_ack
dc5698e80cf724 Dave Airlie 2013-09-09 99 };
f7ad26ff952b3c Stefan Hajnoczi 2015-12-17 100 static const char * const names[] = { "control", "cursor" };
dc5698e80cf724 Dave Airlie 2013-09-09 101
dc5698e80cf724 Dave Airlie 2013-09-09 102 struct virtio_gpu_device *vgdev;
dc5698e80cf724 Dave Airlie 2013-09-09 103 /* this will expand later */
dc5698e80cf724 Dave Airlie 2013-09-09 104 struct virtqueue *vqs[2];
62fb7a5e10962a Gerd Hoffmann 2014-10-28 105 u32 num_scanouts, num_capsets;
dc5698e80cf724 Dave Airlie 2013-09-09 106 int ret;
dc5698e80cf724 Dave Airlie 2013-09-09 107
18e51064c42ca3 Daniel Vetter 2017-05-24 108 if (!virtio_has_feature(dev_to_virtio(dev->dev), VIRTIO_F_VERSION_1))
dc5698e80cf724 Dave Airlie 2013-09-09 109 return -ENODEV;
dc5698e80cf724 Dave Airlie 2013-09-09 110
dc5698e80cf724 Dave Airlie 2013-09-09 111 vgdev = kzalloc(sizeof(struct virtio_gpu_device), GFP_KERNEL);
dc5698e80cf724 Dave Airlie 2013-09-09 112 if (!vgdev)
dc5698e80cf724 Dave Airlie 2013-09-09 113 return -ENOMEM;
dc5698e80cf724 Dave Airlie 2013-09-09 114
dc5698e80cf724 Dave Airlie 2013-09-09 115 vgdev->ddev = dev;
dc5698e80cf724 Dave Airlie 2013-09-09 116 dev->dev_private = vgdev;
18e51064c42ca3 Daniel Vetter 2017-05-24 117 vgdev->vdev = dev_to_virtio(dev->dev);
dc5698e80cf724 Dave Airlie 2013-09-09 118 vgdev->dev = dev->dev;
dc5698e80cf724 Dave Airlie 2013-09-09 119
dc5698e80cf724 Dave Airlie 2013-09-09 120 spin_lock_init(&vgdev->display_info_lock);
f6e6d9eff0b4e9 David Stevens 2020-08-13 121 spin_lock_init(&vgdev->resource_export_lock);
1938d1ae32fefa Matthew Wilcox 2018-09-26 122 ida_init(&vgdev->ctx_id_ida);
1938d1ae32fefa Matthew Wilcox 2018-09-26 123 ida_init(&vgdev->resource_ida);
dc5698e80cf724 Dave Airlie 2013-09-09 124 init_waitqueue_head(&vgdev->resp_wq);
dc5698e80cf724 Dave Airlie 2013-09-09 125 virtio_gpu_init_vq(&vgdev->ctrlq, virtio_gpu_dequeue_ctrl_func);
dc5698e80cf724 Dave Airlie 2013-09-09 126 virtio_gpu_init_vq(&vgdev->cursorq, virtio_gpu_dequeue_cursor_func);
dc5698e80cf724 Dave Airlie 2013-09-09 127
f54d1867005c33 Chris Wilson 2016-10-25 128 vgdev->fence_drv.context = dma_fence_context_alloc(1);
dc5698e80cf724 Dave Airlie 2013-09-09 129 spin_lock_init(&vgdev->fence_drv.lock);
dc5698e80cf724 Dave Airlie 2013-09-09 130 INIT_LIST_HEAD(&vgdev->fence_drv.fences);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 131 INIT_LIST_HEAD(&vgdev->cap_cache);
dc5698e80cf724 Dave Airlie 2013-09-09 132 INIT_WORK(&vgdev->config_changed_work,
dc5698e80cf724 Dave Airlie 2013-09-09 133 virtio_gpu_config_changed_work_func);
dc5698e80cf724 Dave Airlie 2013-09-09 134
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 135 INIT_WORK(&vgdev->obj_free_work,
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 136 virtio_gpu_array_put_free_work);
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 137 INIT_LIST_HEAD(&vgdev->obj_free_list);
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 138 spin_lock_init(&vgdev->obj_free_lock);
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 139
ff2ac58a45914c Laurent Vivier 2017-01-24 140 #ifdef __LITTLE_ENDIAN
62fb7a5e10962a Gerd Hoffmann 2014-10-28 141 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_VIRGL))
62fb7a5e10962a Gerd Hoffmann 2014-10-28 142 vgdev->has_virgl_3d = true;
ff2ac58a45914c Laurent Vivier 2017-01-24 143 #endif
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 144 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_EDID)) {
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 145 vgdev->has_edid = true;
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 146 }
5edbb56082567d Gerd Hoffmann 2020-02-07 147 if (virtio_has_feature(vgdev->vdev, VIRTIO_RING_F_INDIRECT_DESC)) {
5edbb56082567d Gerd Hoffmann 2020-02-07 148 vgdev->has_indirect = true;
5edbb56082567d Gerd Hoffmann 2020-02-07 149 }
f6e6d9eff0b4e9 David Stevens 2020-08-13 150 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_UUID)) {
f6e6d9eff0b4e9 David Stevens 2020-08-13 151 vgdev->has_resource_assign_uuid = true;
f6e6d9eff0b4e9 David Stevens 2020-08-13 152 }
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 153 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_BLOB)) {
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 154 vgdev->has_resource_blob = true;
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 155 }
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 156 if (virtio_get_shm_region(vgdev->vdev, &vgdev->host_visible_region,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 157 VIRTIO_GPU_SHM_ID_HOST_VISIBLE)) {
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 158 if (!devm_request_mem_region(&vgdev->vdev->dev,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 159 vgdev->host_visible_region.addr,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 160 vgdev->host_visible_region.len,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 161 dev_name(&vgdev->vdev->dev))) {
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 162 DRM_ERROR("Could not reserve host visible region\n");
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 163 goto err_vqs;
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 164 }
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 165
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 166 DRM_INFO("Host memory window: 0x%lx +0x%lx\n",
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 167 (unsigned long)vgdev->host_visible_region.addr,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 168 (unsigned long)vgdev->host_visible_region.len);
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 169 vgdev->has_host_visible = true;
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 170 }
62fb7a5e10962a Gerd Hoffmann 2014-10-28 171
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 172 DRM_INFO("features: %cvirgl %cedid %cresource_blob %chost_visible\n",
9e370dfec4fee8 Gerd Hoffmann 2019-10-18 173 vgdev->has_virgl_3d ? '+' : '-',
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 174 vgdev->has_edid ? '+' : '-',
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 175 vgdev->has_resource_blob ? '+' : '-',
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 176 vgdev->has_host_visible ? '+' : '-');
9e370dfec4fee8 Gerd Hoffmann 2019-10-18 177
9b2bbdb2275884 Michael S. Tsirkin 2017-03-06 178 ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL);
dc5698e80cf724 Dave Airlie 2013-09-09 179 if (ret) {
dc5698e80cf724 Dave Airlie 2013-09-09 180 DRM_ERROR("failed to find virt queues\n");
dc5698e80cf724 Dave Airlie 2013-09-09 181 goto err_vqs;
dc5698e80cf724 Dave Airlie 2013-09-09 182 }
dc5698e80cf724 Dave Airlie 2013-09-09 183 vgdev->ctrlq.vq = vqs[0];
dc5698e80cf724 Dave Airlie 2013-09-09 184 vgdev->cursorq.vq = vqs[1];
dc5698e80cf724 Dave Airlie 2013-09-09 185 ret = virtio_gpu_alloc_vbufs(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 186 if (ret) {
dc5698e80cf724 Dave Airlie 2013-09-09 187 DRM_ERROR("failed to alloc vbufs\n");
dc5698e80cf724 Dave Airlie 2013-09-09 188 goto err_vbufs;
dc5698e80cf724 Dave Airlie 2013-09-09 189 }
dc5698e80cf724 Dave Airlie 2013-09-09 190
dc5698e80cf724 Dave Airlie 2013-09-09 191 /* get display info */
dc5698e80cf724 Dave Airlie 2013-09-09 192 virtio_cread(vgdev->vdev, struct virtio_gpu_config,
dc5698e80cf724 Dave Airlie 2013-09-09 193 num_scanouts, &num_scanouts);
dc5698e80cf724 Dave Airlie 2013-09-09 194 vgdev->num_scanouts = min_t(uint32_t, num_scanouts,
dc5698e80cf724 Dave Airlie 2013-09-09 195 VIRTIO_GPU_MAX_SCANOUTS);
dc5698e80cf724 Dave Airlie 2013-09-09 196 if (!vgdev->num_scanouts) {
dc5698e80cf724 Dave Airlie 2013-09-09 197 DRM_ERROR("num_scanouts is zero\n");
dc5698e80cf724 Dave Airlie 2013-09-09 198 ret = -EINVAL;
dc5698e80cf724 Dave Airlie 2013-09-09 199 goto err_scanouts;
dc5698e80cf724 Dave Airlie 2013-09-09 200 }
62fb7a5e10962a Gerd Hoffmann 2014-10-28 201 DRM_INFO("number of scanouts: %d\n", num_scanouts);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 202
62fb7a5e10962a Gerd Hoffmann 2014-10-28 203 virtio_cread(vgdev->vdev, struct virtio_gpu_config,
62fb7a5e10962a Gerd Hoffmann 2014-10-28 204 num_capsets, &num_capsets);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 205 DRM_INFO("number of cap sets: %d\n", num_capsets);
dc5698e80cf724 Dave Airlie 2013-09-09 206
d516e75c71c985 Ezequiel Garcia 2019-01-08 207 virtio_gpu_modeset_init(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 208
dc5698e80cf724 Dave Airlie 2013-09-09 209 virtio_device_ready(vgdev->vdev);
dc5698e80cf724 Dave Airlie 2013-09-09 210
62fb7a5e10962a Gerd Hoffmann 2014-10-28 211 if (num_capsets)
62fb7a5e10962a Gerd Hoffmann 2014-10-28 212 virtio_gpu_get_capsets(vgdev, num_capsets);
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 213 if (vgdev->has_edid)
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 214 virtio_gpu_cmd_get_edids(vgdev);
441012aff674c8 Dave Airlie 2015-06-16 215 virtio_gpu_cmd_get_display_info(vgdev);
234489ea55f81a Gerd Hoffmann 2020-02-14 216 virtio_gpu_notify(vgdev);
441012aff674c8 Dave Airlie 2015-06-16 217 wait_event_timeout(vgdev->resp_wq, !vgdev->display_info_pending,
441012aff674c8 Dave Airlie 2015-06-16 218 5 * HZ);
dc5698e80cf724 Dave Airlie 2013-09-09 219 return 0;
dc5698e80cf724 Dave Airlie 2013-09-09 220
dc5698e80cf724 Dave Airlie 2013-09-09 221 err_scanouts:
dc5698e80cf724 Dave Airlie 2013-09-09 222 virtio_gpu_free_vbufs(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 223 err_vbufs:
dc5698e80cf724 Dave Airlie 2013-09-09 224 vgdev->vdev->config->del_vqs(vgdev->vdev);
dc5698e80cf724 Dave Airlie 2013-09-09 225 err_vqs:
dc5698e80cf724 Dave Airlie 2013-09-09 226 kfree(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 @227 return ret;
dc5698e80cf724 Dave Airlie 2013-09-09 228 }
dc5698e80cf724 Dave Airlie 2013-09-09 229
---
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: 47589 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 14/24] drm/virtio: implement blob resources: probe for host visible region
Date: Sun, 16 Aug 2020 21:10:16 +0800 [thread overview]
Message-ID: <202008162148.IsbbfuIw%lkp@intel.com> (raw)
In-Reply-To: <20200814024000.2485-15-gurchetansingh@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 12539 bytes --]
Hi Gurchetan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip linus/master next-20200814]
[cannot apply to tegra-drm/drm/tegra/for-next drm/drm-next drm-exynos/exynos-drm-next v5.8]
[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/Gurchetan-Singh/Blob-prerequisites-blob-resources/20200814-104250
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-m021-20200816 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/gpu/drm/virtio/virtgpu_kms.c:227 virtio_gpu_init() error: uninitialized symbol 'ret'.
# https://github.com/0day-ci/linux/commit/ded3d7b8bb13eb8599f8d410f184521214e13328
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gurchetan-Singh/Blob-prerequisites-blob-resources/20200814-104250
git checkout ded3d7b8bb13eb8599f8d410f184521214e13328
vim +/ret +227 drivers/gpu/drm/virtio/virtgpu_kms.c
62fb7a5e10962a Gerd Hoffmann 2014-10-28 94
d516e75c71c985 Ezequiel Garcia 2019-01-08 95 int virtio_gpu_init(struct drm_device *dev)
dc5698e80cf724 Dave Airlie 2013-09-09 96 {
dc5698e80cf724 Dave Airlie 2013-09-09 97 static vq_callback_t *callbacks[] = {
dc5698e80cf724 Dave Airlie 2013-09-09 98 virtio_gpu_ctrl_ack, virtio_gpu_cursor_ack
dc5698e80cf724 Dave Airlie 2013-09-09 99 };
f7ad26ff952b3c Stefan Hajnoczi 2015-12-17 100 static const char * const names[] = { "control", "cursor" };
dc5698e80cf724 Dave Airlie 2013-09-09 101
dc5698e80cf724 Dave Airlie 2013-09-09 102 struct virtio_gpu_device *vgdev;
dc5698e80cf724 Dave Airlie 2013-09-09 103 /* this will expand later */
dc5698e80cf724 Dave Airlie 2013-09-09 104 struct virtqueue *vqs[2];
62fb7a5e10962a Gerd Hoffmann 2014-10-28 105 u32 num_scanouts, num_capsets;
dc5698e80cf724 Dave Airlie 2013-09-09 106 int ret;
dc5698e80cf724 Dave Airlie 2013-09-09 107
18e51064c42ca3 Daniel Vetter 2017-05-24 108 if (!virtio_has_feature(dev_to_virtio(dev->dev), VIRTIO_F_VERSION_1))
dc5698e80cf724 Dave Airlie 2013-09-09 109 return -ENODEV;
dc5698e80cf724 Dave Airlie 2013-09-09 110
dc5698e80cf724 Dave Airlie 2013-09-09 111 vgdev = kzalloc(sizeof(struct virtio_gpu_device), GFP_KERNEL);
dc5698e80cf724 Dave Airlie 2013-09-09 112 if (!vgdev)
dc5698e80cf724 Dave Airlie 2013-09-09 113 return -ENOMEM;
dc5698e80cf724 Dave Airlie 2013-09-09 114
dc5698e80cf724 Dave Airlie 2013-09-09 115 vgdev->ddev = dev;
dc5698e80cf724 Dave Airlie 2013-09-09 116 dev->dev_private = vgdev;
18e51064c42ca3 Daniel Vetter 2017-05-24 117 vgdev->vdev = dev_to_virtio(dev->dev);
dc5698e80cf724 Dave Airlie 2013-09-09 118 vgdev->dev = dev->dev;
dc5698e80cf724 Dave Airlie 2013-09-09 119
dc5698e80cf724 Dave Airlie 2013-09-09 120 spin_lock_init(&vgdev->display_info_lock);
f6e6d9eff0b4e9 David Stevens 2020-08-13 121 spin_lock_init(&vgdev->resource_export_lock);
1938d1ae32fefa Matthew Wilcox 2018-09-26 122 ida_init(&vgdev->ctx_id_ida);
1938d1ae32fefa Matthew Wilcox 2018-09-26 123 ida_init(&vgdev->resource_ida);
dc5698e80cf724 Dave Airlie 2013-09-09 124 init_waitqueue_head(&vgdev->resp_wq);
dc5698e80cf724 Dave Airlie 2013-09-09 125 virtio_gpu_init_vq(&vgdev->ctrlq, virtio_gpu_dequeue_ctrl_func);
dc5698e80cf724 Dave Airlie 2013-09-09 126 virtio_gpu_init_vq(&vgdev->cursorq, virtio_gpu_dequeue_cursor_func);
dc5698e80cf724 Dave Airlie 2013-09-09 127
f54d1867005c33 Chris Wilson 2016-10-25 128 vgdev->fence_drv.context = dma_fence_context_alloc(1);
dc5698e80cf724 Dave Airlie 2013-09-09 129 spin_lock_init(&vgdev->fence_drv.lock);
dc5698e80cf724 Dave Airlie 2013-09-09 130 INIT_LIST_HEAD(&vgdev->fence_drv.fences);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 131 INIT_LIST_HEAD(&vgdev->cap_cache);
dc5698e80cf724 Dave Airlie 2013-09-09 132 INIT_WORK(&vgdev->config_changed_work,
dc5698e80cf724 Dave Airlie 2013-09-09 133 virtio_gpu_config_changed_work_func);
dc5698e80cf724 Dave Airlie 2013-09-09 134
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 135 INIT_WORK(&vgdev->obj_free_work,
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 136 virtio_gpu_array_put_free_work);
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 137 INIT_LIST_HEAD(&vgdev->obj_free_list);
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 138 spin_lock_init(&vgdev->obj_free_lock);
f0c6cef7e7174b Gerd Hoffmann 2019-08-30 139
ff2ac58a45914c Laurent Vivier 2017-01-24 140 #ifdef __LITTLE_ENDIAN
62fb7a5e10962a Gerd Hoffmann 2014-10-28 141 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_VIRGL))
62fb7a5e10962a Gerd Hoffmann 2014-10-28 142 vgdev->has_virgl_3d = true;
ff2ac58a45914c Laurent Vivier 2017-01-24 143 #endif
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 144 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_EDID)) {
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 145 vgdev->has_edid = true;
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 146 }
5edbb56082567d Gerd Hoffmann 2020-02-07 147 if (virtio_has_feature(vgdev->vdev, VIRTIO_RING_F_INDIRECT_DESC)) {
5edbb56082567d Gerd Hoffmann 2020-02-07 148 vgdev->has_indirect = true;
5edbb56082567d Gerd Hoffmann 2020-02-07 149 }
f6e6d9eff0b4e9 David Stevens 2020-08-13 150 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_UUID)) {
f6e6d9eff0b4e9 David Stevens 2020-08-13 151 vgdev->has_resource_assign_uuid = true;
f6e6d9eff0b4e9 David Stevens 2020-08-13 152 }
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 153 if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_BLOB)) {
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 154 vgdev->has_resource_blob = true;
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 155 }
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 156 if (virtio_get_shm_region(vgdev->vdev, &vgdev->host_visible_region,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 157 VIRTIO_GPU_SHM_ID_HOST_VISIBLE)) {
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 158 if (!devm_request_mem_region(&vgdev->vdev->dev,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 159 vgdev->host_visible_region.addr,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 160 vgdev->host_visible_region.len,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 161 dev_name(&vgdev->vdev->dev))) {
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 162 DRM_ERROR("Could not reserve host visible region\n");
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 163 goto err_vqs;
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 164 }
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 165
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 166 DRM_INFO("Host memory window: 0x%lx +0x%lx\n",
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 167 (unsigned long)vgdev->host_visible_region.addr,
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 168 (unsigned long)vgdev->host_visible_region.len);
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 169 vgdev->has_host_visible = true;
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 170 }
62fb7a5e10962a Gerd Hoffmann 2014-10-28 171
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 172 DRM_INFO("features: %cvirgl %cedid %cresource_blob %chost_visible\n",
9e370dfec4fee8 Gerd Hoffmann 2019-10-18 173 vgdev->has_virgl_3d ? '+' : '-',
bfb6d04f29ac99 Gerd Hoffmann 2020-08-13 174 vgdev->has_edid ? '+' : '-',
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 175 vgdev->has_resource_blob ? '+' : '-',
ded3d7b8bb13eb Gerd Hoffmann 2020-08-13 176 vgdev->has_host_visible ? '+' : '-');
9e370dfec4fee8 Gerd Hoffmann 2019-10-18 177
9b2bbdb2275884 Michael S. Tsirkin 2017-03-06 178 ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL);
dc5698e80cf724 Dave Airlie 2013-09-09 179 if (ret) {
dc5698e80cf724 Dave Airlie 2013-09-09 180 DRM_ERROR("failed to find virt queues\n");
dc5698e80cf724 Dave Airlie 2013-09-09 181 goto err_vqs;
dc5698e80cf724 Dave Airlie 2013-09-09 182 }
dc5698e80cf724 Dave Airlie 2013-09-09 183 vgdev->ctrlq.vq = vqs[0];
dc5698e80cf724 Dave Airlie 2013-09-09 184 vgdev->cursorq.vq = vqs[1];
dc5698e80cf724 Dave Airlie 2013-09-09 185 ret = virtio_gpu_alloc_vbufs(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 186 if (ret) {
dc5698e80cf724 Dave Airlie 2013-09-09 187 DRM_ERROR("failed to alloc vbufs\n");
dc5698e80cf724 Dave Airlie 2013-09-09 188 goto err_vbufs;
dc5698e80cf724 Dave Airlie 2013-09-09 189 }
dc5698e80cf724 Dave Airlie 2013-09-09 190
dc5698e80cf724 Dave Airlie 2013-09-09 191 /* get display info */
dc5698e80cf724 Dave Airlie 2013-09-09 192 virtio_cread(vgdev->vdev, struct virtio_gpu_config,
dc5698e80cf724 Dave Airlie 2013-09-09 193 num_scanouts, &num_scanouts);
dc5698e80cf724 Dave Airlie 2013-09-09 194 vgdev->num_scanouts = min_t(uint32_t, num_scanouts,
dc5698e80cf724 Dave Airlie 2013-09-09 195 VIRTIO_GPU_MAX_SCANOUTS);
dc5698e80cf724 Dave Airlie 2013-09-09 196 if (!vgdev->num_scanouts) {
dc5698e80cf724 Dave Airlie 2013-09-09 197 DRM_ERROR("num_scanouts is zero\n");
dc5698e80cf724 Dave Airlie 2013-09-09 198 ret = -EINVAL;
dc5698e80cf724 Dave Airlie 2013-09-09 199 goto err_scanouts;
dc5698e80cf724 Dave Airlie 2013-09-09 200 }
62fb7a5e10962a Gerd Hoffmann 2014-10-28 201 DRM_INFO("number of scanouts: %d\n", num_scanouts);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 202
62fb7a5e10962a Gerd Hoffmann 2014-10-28 203 virtio_cread(vgdev->vdev, struct virtio_gpu_config,
62fb7a5e10962a Gerd Hoffmann 2014-10-28 204 num_capsets, &num_capsets);
62fb7a5e10962a Gerd Hoffmann 2014-10-28 205 DRM_INFO("number of cap sets: %d\n", num_capsets);
dc5698e80cf724 Dave Airlie 2013-09-09 206
d516e75c71c985 Ezequiel Garcia 2019-01-08 207 virtio_gpu_modeset_init(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 208
dc5698e80cf724 Dave Airlie 2013-09-09 209 virtio_device_ready(vgdev->vdev);
dc5698e80cf724 Dave Airlie 2013-09-09 210
62fb7a5e10962a Gerd Hoffmann 2014-10-28 211 if (num_capsets)
62fb7a5e10962a Gerd Hoffmann 2014-10-28 212 virtio_gpu_get_capsets(vgdev, num_capsets);
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 213 if (vgdev->has_edid)
b4b01b4995fb15 Gerd Hoffmann 2018-10-30 214 virtio_gpu_cmd_get_edids(vgdev);
441012aff674c8 Dave Airlie 2015-06-16 215 virtio_gpu_cmd_get_display_info(vgdev);
234489ea55f81a Gerd Hoffmann 2020-02-14 216 virtio_gpu_notify(vgdev);
441012aff674c8 Dave Airlie 2015-06-16 217 wait_event_timeout(vgdev->resp_wq, !vgdev->display_info_pending,
441012aff674c8 Dave Airlie 2015-06-16 218 5 * HZ);
dc5698e80cf724 Dave Airlie 2013-09-09 219 return 0;
dc5698e80cf724 Dave Airlie 2013-09-09 220
dc5698e80cf724 Dave Airlie 2013-09-09 221 err_scanouts:
dc5698e80cf724 Dave Airlie 2013-09-09 222 virtio_gpu_free_vbufs(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 223 err_vbufs:
dc5698e80cf724 Dave Airlie 2013-09-09 224 vgdev->vdev->config->del_vqs(vgdev->vdev);
dc5698e80cf724 Dave Airlie 2013-09-09 225 err_vqs:
dc5698e80cf724 Dave Airlie 2013-09-09 226 kfree(vgdev);
dc5698e80cf724 Dave Airlie 2013-09-09 @227 return ret;
dc5698e80cf724 Dave Airlie 2013-09-09 228 }
dc5698e80cf724 Dave Airlie 2013-09-09 229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 47589 bytes --]
next prev parent reply other threads:[~2020-08-16 13:10 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 2:39 [virtio-dev] [PATCH 00/24] Blob prerequisites + blob resources Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 01/24] drm/virtio: Revert "drm/virtio: Call the right shmem helpers" Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 02/24] virtio: add dma-buf support for exported objects Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 03/24] virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 04/24] drm/virtio: Support virtgpu exported resources Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 05/24] virtio: Add get_shm_region method Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 06/24] virtio: Implement get_shm_region for PCI transport Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 07/24] virtio: Implement get_shm_region for MMIO transport Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 08/24] drm/virtio: blob prep: refactor getting pages and attaching backing Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 09/24] drm/virtio: blob prep: make CPU responses more generic Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 10/24] virtio-gpu api: blob resources Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 11/24] virtio-gpu api: host visible feature Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 12/24] virtio-gpu api: cross-device feature Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 13/24] drm/virtio: implement blob resources: probe for the feature Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 14/24] drm/virtio: implement blob resources: probe for host visible region Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-16 13:10 ` kernel test robot [this message]
2020-08-16 13:10 ` kernel test robot
2020-08-14 2:39 ` [virtio-dev] [PATCH 15/24] drm/virtio: implement blob resources: expose virtio_gpu_resource_id_get Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 16/24] drm/virtio: implement blob resources: add new fields to internal structs Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 17/24] drm/virtio: implement blob resources: implement vram object Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 5:39 ` kernel test robot
2020-08-14 5:39 ` kernel test robot
2020-08-14 2:39 ` [virtio-dev] [PATCH 18/24] drm/virtio: implement blob resources: hypercall interface Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 6:12 ` kernel test robot
2020-08-14 6:12 ` kernel test robot
2020-08-14 2:39 ` [virtio-dev] [PATCH 19/24] drm/virtio: implement blob resources: blob display integration Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 20/24] drm/virtio: implement blob resources: refactor UUID code somewhat Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 21/24] drm/virtio: implement blob resources: fix stride discrepancy Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 22/24] drm/virtio: implement blob resources: report blob mem to userspace Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-14 2:39 ` [virtio-dev] [PATCH 23/24] drm/virtio: implement blob resources: resource create blob ioctl Gurchetan Singh
2020-08-14 2:39 ` Gurchetan Singh
2020-08-17 17:46 ` Anthoine Bourgeois
2020-08-14 2:40 ` [virtio-dev] [PATCH 24/24] drm/virtio: advertise features to userspace Gurchetan Singh
2020-08-14 2:40 ` Gurchetan Singh
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=202008162148.IsbbfuIw%lkp@intel.com \
--to=lkp@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kbuild-all@lists.01.org \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=sebastien.boeuf@intel.com \
--cc=vgoyal@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.