Displaying 12 results from an estimated 12 matches for "has_indirect".
2020 Feb 07
1
[PATCH v2] drm/virtio: fix ring free check
...t a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 7e69c06e168e..d278c8c50f39 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -193,6 +193,7 @@ struct virtio_gpu_device {
bool has_virgl_3d;
bool has_edid;
+ bool has_indirect;
struct work_struct config_changed_work;
diff --git a/drivers/gpu/drm/virtio/virtgpu_debugfs.c b/drivers/gpu/drm/virtio/virtgpu_debugfs.c
index 5156e6b279db..e27120d512b0 100644
--- a/drivers/gpu/drm/virtio/virtgpu_debugfs.c
+++ b/drivers/gpu/drm/virtio/virtgpu_debugfs.c
@@ -47,6 +47,7 @@ sta...
2020 Feb 07
1
[PATCH] drm/virtio: add drm_driver.release callback.
...- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -330,6 +330,11 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
bool notify = false;
int ret;
+ if (!vgdev->vqs_ready) {
+ free_vbuf(vgdev, vbuf);
+ return;
+ }
+
if (vgdev->has_indirect)
elemcnt = 1;
@@ -462,8 +467,10 @@ static void virtio_gpu_queue_cursor(struct virtio_gpu_device *vgdev,
int ret;
int outcnt;
- if (!vgdev->vqs_ready)
+ if (!vgdev->vqs_ready) {
+ free_vbuf(vgdev, vbuf);
return;
+ }
sg_init_one(&ccmd, vbuf->buf, vbuf->size);
sgs[...
2020 May 13
0
[PATCH v3 4/4] drm/virtio: Support virtgpu exported resources
...gt; bool created;
> +
> + int uuid_state;
> + uuid_t uuid;
> };
> #define gem_to_virtio_gpu_obj(gobj) \
> container_of((gobj), struct virtio_gpu_object, base.base)
> @@ -196,6 +203,7 @@ struct virtio_gpu_device {
> bool has_virgl_3d;
> bool has_edid;
> bool has_indirect;
> + bool has_resource_assign_uuid;
>
> struct work_struct config_changed_work;
>
> @@ -206,6 +214,8 @@ struct virtio_gpu_device {
> struct virtio_gpu_drv_capset *capsets;
> uint32_t num_capsets;
> struct list_head cap_cache;
> +
> + spinlock_t resource_exp...
2020 Mar 02
0
[virtio-dev] [PATCH v2 4/4] drm/virtio: Support virtgpu exported resources
...int uuid_state;
> + uuid_t uuid;
> };
> #define gem_to_virtio_gpu_obj(gobj) \
> container_of((gobj), struct virtio_gpu_object, base.base)
> @@ -196,6 +204,7 @@ struct virtio_gpu_device {
> bool has_virgl_3d;
> bool has_edid;
> bool has_indirect;
> + bool has_resource_assign_uuid;
>
> struct work_struct config_changed_work;
>
> @@ -206,6 +215,8 @@ struct virtio_gpu_device {
> struct virtio_gpu_drv_capset *capsets;
> uint32_t num_capsets;
> struct list_head cap_cache;
> +
>...
2020 Feb 10
1
[PATCH v2] drm/virtio: add drm_driver.release callback.
...- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -330,6 +330,11 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
bool notify = false;
int ret;
+ if (!vgdev->vqs_ready) {
+ free_vbuf(vgdev, vbuf);
+ return;
+ }
+
if (vgdev->has_indirect)
elemcnt = 1;
@@ -462,8 +467,10 @@ static void virtio_gpu_queue_cursor(struct virtio_gpu_device *vgdev,
int ret;
int outcnt;
- if (!vgdev->vqs_ready)
+ if (!vgdev->vqs_ready) {
+ free_vbuf(vgdev, vbuf);
return;
+ }
sg_init_one(&ccmd, vbuf->buf, vbuf->size);
sgs[...
2023 Feb 24
2
[PATCH] drm/virtio: Add option to disable KMS support
...vdev, VIRTIO_GPU_F_VIRGL))
vgdev->has_virgl_3d = true;
#endif
+#if defined(CONFIG_DRM_VIRTIO_GPU_KMS)
if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_EDID)) {
vgdev->has_edid = true;
}
+#endif
if (virtio_has_feature(vgdev->vdev, VIRTIO_RING_F_INDIRECT_DESC)) {
vgdev->has_indirect = true;
}
@@ -218,6 +220,7 @@ int virtio_gpu_init(struct virtio_device *vdev, struct drm_device *dev)
goto err_vbufs;
}
+#if defined(CONFIG_DRM_VIRTIO_GPU_KMS)
/* get display info */
virtio_cread_le(vgdev->vdev, struct virtio_gpu_config,
num_scanouts, &num_scanouts);
@@ -229...
2020 Sep 08
0
[PATCH 2/3] drm/virtio: return virtio_gpu_queue errors
...ueue *vq = vgdev->ctrlq.vq;
int ret, idx;
@@ -335,7 +335,7 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
if (fence && vbuf->objs)
virtio_gpu_array_unlock_resv(vbuf->objs);
free_vbuf(vgdev, vbuf);
- return;
+ return -1;
}
if (vgdev->has_indirect)
@@ -373,15 +373,16 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
spin_unlock(&vgdev->ctrlq.qlock);
drm_dev_exit(idx);
+ return 0;
}
-static void virtio_gpu_queue_fenced_ctrl_buffer(struct virtio_gpu_device *vgdev,
- struct virtio_gpu_vbuffer *vbuf,...
2020 Feb 11
2
[PATCH v4] drm/virtio: add drm_driver.release callback.
...,
{
struct virtqueue *vq = vgdev->ctrlq.vq;
bool notify = false;
- int ret;
+ int ret, idx;
+
+ if (!drm_dev_enter(vgdev->ddev, &idx)) {
+ if (fence && vbuf->objs)
+ virtio_gpu_array_unlock_resv(vbuf->objs);
+ free_vbuf(vgdev, vbuf);
+ return;
+ }
if (vgdev->has_indirect)
elemcnt = 1;
@@ -338,14 +345,6 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
again:
spin_lock(&vgdev->ctrlq.qlock);
- if (!vgdev->vqs_ready) {
- spin_unlock(&vgdev->ctrlq.qlock);
-
- if (fence && vbuf->objs)
- virtio_gpu_array_unl...
2020 Feb 11
2
[PATCH v4] drm/virtio: add drm_driver.release callback.
...,
{
struct virtqueue *vq = vgdev->ctrlq.vq;
bool notify = false;
- int ret;
+ int ret, idx;
+
+ if (!drm_dev_enter(vgdev->ddev, &idx)) {
+ if (fence && vbuf->objs)
+ virtio_gpu_array_unlock_resv(vbuf->objs);
+ free_vbuf(vgdev, vbuf);
+ return;
+ }
if (vgdev->has_indirect)
elemcnt = 1;
@@ -338,14 +345,6 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
again:
spin_lock(&vgdev->ctrlq.qlock);
- if (!vgdev->vqs_ready) {
- spin_unlock(&vgdev->ctrlq.qlock);
-
- if (fence && vbuf->objs)
- virtio_gpu_array_unl...
2020 Feb 11
1
[PATCH] drm/virtio: rework batching
...44
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -329,7 +329,6 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
int incnt)
{
struct virtqueue *vq = vgdev->ctrlq.vq;
- bool notify = false;
int ret;
if (vgdev->has_indirect)
@@ -369,16 +368,9 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
trace_virtio_gpu_cmd_queue(vq, virtio_gpu_vbuf_ctrl_hdr(vbuf));
- notify = virtqueue_kick_prepare(vq);
+ atomic_inc(&vgdev->pending_commands);
spin_unlock(&vgdev->ctrlq.qlock);
-
- i...
2020 Feb 11
0
[PATCH v3] drm/virtio: add drm_driver.release callback.
...,
{
struct virtqueue *vq = vgdev->ctrlq.vq;
bool notify = false;
- int ret;
+ int ret, idx;
+
+ if (!drm_dev_enter(vgdev->ddev, &idx)) {
+ if (fence && vbuf->objs)
+ virtio_gpu_array_unlock_resv(vbuf->objs);
+ free_vbuf(vgdev, vbuf);
+ return;
+ }
if (vgdev->has_indirect)
elemcnt = 1;
@@ -338,14 +345,6 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
again:
spin_lock(&vgdev->ctrlq.qlock);
- if (!vgdev->vqs_ready) {
- spin_unlock(&vgdev->ctrlq.qlock);
-
- if (fence && vbuf->objs)
- virtio_gpu_array_unl...
2020 Feb 11
0
[PATCH v4] drm/virtio: add drm_driver.release callback.
...l notify = false;
> - int ret;
> + int ret, idx;
> +
> + if (!drm_dev_enter(vgdev->ddev, &idx)) {
> + if (fence && vbuf->objs)
> + virtio_gpu_array_unlock_resv(vbuf->objs);
> + free_vbuf(vgdev, vbuf);
> + return;
> + }
>
> if (vgdev->has_indirect)
> elemcnt = 1;
> @@ -338,14 +345,6 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
> again:
> spin_lock(&vgdev->ctrlq.qlock);
>
> - if (!vgdev->vqs_ready) {
> - spin_unlock(&vgdev->ctrlq.qlock);
> -
> - if (fence &...