Commit 6815cfe6 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/virtio: implement blob resources: probe for the feature.

Let's proble for VIRTIO_GPU_F_RESOURCE_BLOB.
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Acked-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-8-gurchetansingh@chromium.org
parent bf36dea1
...@@ -49,6 +49,7 @@ static int virtio_gpu_features(struct seq_file *m, void *data) ...@@ -49,6 +49,7 @@ static int virtio_gpu_features(struct seq_file *m, void *data)
virtio_add_bool(m, "edid", vgdev->has_edid); virtio_add_bool(m, "edid", vgdev->has_edid);
virtio_add_bool(m, "indirect", vgdev->has_indirect); virtio_add_bool(m, "indirect", vgdev->has_indirect);
virtio_add_bool(m, "resource uuid", vgdev->has_resource_assign_uuid); virtio_add_bool(m, "resource uuid", vgdev->has_resource_assign_uuid);
virtio_add_bool(m, "blob resources", vgdev->has_resource_blob);
virtio_add_int(m, "cap sets", vgdev->num_capsets); virtio_add_int(m, "cap sets", vgdev->num_capsets);
virtio_add_int(m, "scanouts", vgdev->num_scanouts); virtio_add_int(m, "scanouts", vgdev->num_scanouts);
return 0; return 0;
......
...@@ -166,6 +166,7 @@ static unsigned int features[] = { ...@@ -166,6 +166,7 @@ static unsigned int features[] = {
#endif #endif
VIRTIO_GPU_F_EDID, VIRTIO_GPU_F_EDID,
VIRTIO_GPU_F_RESOURCE_UUID, VIRTIO_GPU_F_RESOURCE_UUID,
VIRTIO_GPU_F_RESOURCE_BLOB,
}; };
static struct virtio_driver virtio_gpu_driver = { static struct virtio_driver virtio_gpu_driver = {
.feature_table = features, .feature_table = features,
......
...@@ -208,6 +208,7 @@ struct virtio_gpu_device { ...@@ -208,6 +208,7 @@ struct virtio_gpu_device {
bool has_edid; bool has_edid;
bool has_indirect; bool has_indirect;
bool has_resource_assign_uuid; bool has_resource_assign_uuid;
bool has_resource_blob;
struct work_struct config_changed_work; struct work_struct config_changed_work;
......
...@@ -152,10 +152,14 @@ int virtio_gpu_init(struct drm_device *dev) ...@@ -152,10 +152,14 @@ int virtio_gpu_init(struct drm_device *dev)
if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_UUID)) { if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_UUID)) {
vgdev->has_resource_assign_uuid = true; vgdev->has_resource_assign_uuid = true;
} }
if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_BLOB)) {
vgdev->has_resource_blob = true;
}
DRM_INFO("features: %cvirgl %cedid\n", DRM_INFO("features: %cvirgl %cedid %cresource_blob\n",
vgdev->has_virgl_3d ? '+' : '-', vgdev->has_virgl_3d ? '+' : '-',
vgdev->has_edid ? '+' : '-'); vgdev->has_edid ? '+' : '-',
vgdev->has_resource_blob ? '+' : '-');
ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment