Displaying 20 results from an estimated 47 matches for "outcnt".
Did you mean:
out_vt
2018 Apr 03
3
[PATCH] drm/virtio: fix vq wait_event condition
...u_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 48e4f1df6e..020070d483 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -293,7 +293,7 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
ret = virtqueue_add_sgs(vq, sgs, outcnt, incnt, vbuf, GFP_ATOMIC);
if (ret == -ENOSPC) {
spin_unlock(&vgdev->ctrlq.qlock);
- wait_event(vgdev->ctrlq.ack_queue, vq->num_free);
+ wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= outcnt + incnt);
spin_lock(&vgdev->ctrlq.qlock);
goto retry;
} else...
2018 Apr 03
3
[PATCH] drm/virtio: fix vq wait_event condition
...u_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 48e4f1df6e..020070d483 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -293,7 +293,7 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
ret = virtqueue_add_sgs(vq, sgs, outcnt, incnt, vbuf, GFP_ATOMIC);
if (ret == -ENOSPC) {
spin_unlock(&vgdev->ctrlq.qlock);
- wait_event(vgdev->ctrlq.ack_queue, vq->num_free);
+ wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= outcnt + incnt);
spin_lock(&vgdev->ctrlq.qlock);
goto retry;
} else...
2019 Sep 05
2
[PATCH v2] drm/virtio: Use vmalloc for command buffer allocations.
...ruct virtio_gpu_vbuffer *vbuf,
+ struct scatterlist *vout)
__releases(&vgdev->ctrlq.qlock)
__acquires(&vgdev->ctrlq.qlock)
{
struct virtqueue *vq = vgdev->ctrlq.vq;
- struct scatterlist *sgs[3], vcmd, vout, vresp;
+ struct scatterlist *sgs[3], vcmd, vresp;
int outcnt = 0, incnt = 0;
int ret;
@@ -268,9 +325,8 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
sgs[outcnt + incnt] = &vcmd;
outcnt++;
- if (vbuf->data_size) {
- sg_init_one(&vout, vbuf->data_buf, vbuf->data_size);
- sgs[outcnt + incnt] = &a...
2019 Sep 05
2
[PATCH v2] drm/virtio: Use vmalloc for command buffer allocations.
...ruct virtio_gpu_vbuffer *vbuf,
+ struct scatterlist *vout)
__releases(&vgdev->ctrlq.qlock)
__acquires(&vgdev->ctrlq.qlock)
{
struct virtqueue *vq = vgdev->ctrlq.vq;
- struct scatterlist *sgs[3], vcmd, vout, vresp;
+ struct scatterlist *sgs[3], vcmd, vresp;
int outcnt = 0, incnt = 0;
int ret;
@@ -268,9 +325,8 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
sgs[outcnt + incnt] = &vcmd;
outcnt++;
- if (vbuf->data_size) {
- sg_init_one(&vout, vbuf->data_buf, vbuf->data_size);
- sgs[outcnt + incnt] = &a...
2019 Sep 10
0
[PATCH v3 2/2] drm/virtio: Use vmalloc for command buffer allocations.
...ruct virtio_gpu_vbuffer *vbuf,
+ struct scatterlist *vout)
__releases(&vgdev->ctrlq.qlock)
__acquires(&vgdev->ctrlq.qlock)
{
struct virtqueue *vq = vgdev->ctrlq.vq;
- struct scatterlist *sgs[3], vcmd, vout, vresp;
+ struct scatterlist *sgs[3], vcmd, vresp;
int outcnt = 0, incnt = 0;
int ret;
@@ -268,9 +309,8 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
sgs[outcnt + incnt] = &vcmd;
outcnt++;
- if (vbuf->data_size) {
- sg_init_one(&vout, vbuf->data_buf, vbuf->data_size);
- sgs[outcnt + incnt] = &a...
2019 Sep 11
1
[PATCH v4 2/2] drm/virtio: Use vmalloc for command buffer allocations.
...struct virtio_gpu_vbuffer *vbuf,
+ struct scatterlist *vout)
__releases(&vgdev->ctrlq.qlock)
__acquires(&vgdev->ctrlq.qlock)
{
struct virtqueue *vq = vgdev->ctrlq.vq;
- struct scatterlist *sgs[3], vcmd, vout, vresp;
+ struct scatterlist *sgs[3], vcmd, vresp;
int outcnt = 0, incnt = 0;
bool notify = false;
int ret;
@@ -274,9 +315,8 @@ static bool virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
sgs[outcnt + incnt] = &vcmd;
outcnt++;
- if (vbuf->data_size) {
- sg_init_one(&vout, vbuf->data_buf, vbuf->data_size);
- sg...
2020 Sep 08
0
[PATCH 2/3] drm/virtio: return virtio_gpu_queue errors
..._sgt(char *data, uint32_t size, int *sg_ents)
return sgt;
}
-static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
- struct virtio_gpu_vbuffer *vbuf,
- struct virtio_gpu_fence *fence,
- int elemcnt,
- struct scatterlist **sgs,
- int outcnt,
- int incnt)
+static int virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
+ struct virtio_gpu_vbuffer *vbuf,
+ struct virtio_gpu_fence *fence,
+ int elemcnt,
+ struct scatterlist **sgs,
+ int outcnt,
+ int incnt)
{
struct virtqu...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...completion);
>> +}
>> +
>> +static int virtio_i2c_add_msg(struct virtqueue *vq,
>> +????????????????? struct virtio_i2c_msg *vmsg,
>> +????????????????? struct i2c_msg *msg)
>> +{
>> +??? struct scatterlist *sgs[3], hdr, bout, bin, status;
>> +??? int outcnt = 0, incnt = 0;
>> +
>> +??? if (!msg->len)
>> +??????? return -EINVAL;
>> +
>> +??? vmsg->hdr.addr = msg->addr;
>> +??? vmsg->hdr.flags = msg->flags;
>> +??? vmsg->hdr.len = msg->len;
>
>
> Missing endian conversion?
>
You...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...completion);
>> +}
>> +
>> +static int virtio_i2c_add_msg(struct virtqueue *vq,
>> +????????????????? struct virtio_i2c_msg *vmsg,
>> +????????????????? struct i2c_msg *msg)
>> +{
>> +??? struct scatterlist *sgs[3], hdr, bout, bin, status;
>> +??? int outcnt = 0, incnt = 0;
>> +
>> +??? if (!msg->len)
>> +??????? return -EINVAL;
>> +
>> +??? vmsg->hdr.addr = msg->addr;
>> +??? vmsg->hdr.flags = msg->flags;
>> +??? vmsg->hdr.len = msg->len;
>
>
> Missing endian conversion?
>
You...
2018 Apr 20
0
[PATCH] drm/virtio: fix vq wait_event condition
...virtio/virtgpu_vq.c
> index 48e4f1df6e..020070d483 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_vq.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
> @@ -293,7 +293,7 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
> ret = virtqueue_add_sgs(vq, sgs, outcnt, incnt, vbuf, GFP_ATOMIC);
> if (ret == -ENOSPC) {
> spin_unlock(&vgdev->ctrlq.qlock);
> - wait_event(vgdev->ctrlq.ack_queue, vq->num_free);
> + wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= outcnt + incnt);
> spin_lock(&vgdev->ctrlq.qlock)...
2019 Sep 06
0
[PATCH v2] drm/virtio: Use vmalloc for command buffer allocations.
...struct virtio_gpu_vbuffer *vbuf,
> struct virtio_gpu_ctrl_hdr *hdr,
> struct virtio_gpu_fence *fence)
> {
> struct virtqueue *vq = vgdev->ctrlq.vq;
> + struct scatterlist *vout = NULL, sg;
> + struct sg_table *sgt = NULL;
> int rc;
> + int outcnt = 0;
> +
> + if (vbuf->data_size) {
> + if (is_vmalloc_addr(vbuf->data_buf)) {
> + sgt = vmalloc_to_sgt(vbuf->data_buf, vbuf->data_size,
> + &outcnt);
> + if (!sgt)
> + return -ENOMEM;
> + vout = sgt->sgl;
> + } else {
> + sg_in...
2020 Sep 07
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...;>> +
>>> +static int virtio_i2c_add_msg(struct virtqueue *vq,
>>> +????????????????? struct virtio_i2c_msg *vmsg,
>>> +????????????????? struct i2c_msg *msg)
>>> +{
>>> +??? struct scatterlist *sgs[3], hdr, bout, bin, status;
>>> +??? int outcnt = 0, incnt = 0;
>>> +
>>> +??? if (!msg->len)
>>> +??????? return -EINVAL;
>>> +
>>> +??? vmsg->hdr.addr = msg->addr;
>>> +??? vmsg->hdr.flags = msg->flags;
>>> +??? vmsg->hdr.len = msg->len;
>>
>>
>&...
2019 Aug 13
0
[PATCH 2/2] drm/virtio: notify virtqueues without holding spinlock
...uffer *vbuf)
__releases(&vgdev->ctrlq.qlock)
__acquires(&vgdev->ctrlq.qlock)
@@ -260,10 +260,11 @@ static void virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
struct virtqueue *vq = vgdev->ctrlq.vq;
struct scatterlist *sgs[3], vcmd, vout, vresp;
int outcnt = 0, incnt = 0;
+ bool notify = false;
int ret;
if (!vgdev->vqs_ready)
- return;
+ return notify;
sg_init_one(&vcmd, vbuf->buf, vbuf->size);
sgs[outcnt + incnt] = &vcmd;
@@ -292,16 +293,21 @@ static void virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vg...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...ruct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vmsg,
+ struct i2c_msg *msg)
+{
+ struct scatterlist *sgs[3], hdr, bout, bin, status;
+ int outcnt = 0, incnt = 0;
+
+ if (!msg->len)
+ return -EINVAL;
+
+ vmsg->hdr.addr = msg->addr;
+ vmsg->hdr.flags = msg->flags;
+ vmsg->hdr.len = msg->len;
+
+ vmsg->buf = kzalloc(vmsg->hdr.len, GFP_KERNEL);
+ if (!vmsg->buf)
+ return -ENOMEM;
+
+ sg_init_one(&hdr, &vms...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...ruct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vmsg,
+ struct i2c_msg *msg)
+{
+ struct scatterlist *sgs[3], hdr, bout, bin, status;
+ int outcnt = 0, incnt = 0;
+
+ if (!msg->len)
+ return -EINVAL;
+
+ vmsg->hdr.addr = msg->addr;
+ vmsg->hdr.flags = msg->flags;
+ vmsg->hdr.len = msg->len;
+
+ vmsg->buf = kzalloc(vmsg->hdr.len, GFP_KERNEL);
+ if (!vmsg->buf)
+ return -ENOMEM;
+
+ sg_init_one(&hdr, &vms...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...ruct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vmsg,
+ struct i2c_msg *msg)
+{
+ struct scatterlist *sgs[3], hdr, bout, bin, status;
+ int outcnt = 0, incnt = 0;
+
+ if (!msg->len)
+ return -EINVAL;
+
+ vmsg->hdr.addr = cpu_to_le16(msg->addr);
+ vmsg->hdr.flags = cpu_to_le16(msg->flags);
+ vmsg->hdr.len = cpu_to_le16(msg->len);
+
+ vmsg->buf = kzalloc(msg->len, GFP_KERNEL);
+ if (!vmsg->buf)
+ return -ENOMEM;...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...ruct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vmsg,
+ struct i2c_msg *msg)
+{
+ struct scatterlist *sgs[3], hdr, bout, bin, status;
+ int outcnt = 0, incnt = 0;
+
+ if (!msg->len)
+ return -EINVAL;
+
+ vmsg->hdr.addr = cpu_to_le16(msg->addr);
+ vmsg->hdr.flags = cpu_to_le16(msg->flags);
+ vmsg->hdr.len = cpu_to_le16(msg->len);
+
+ vmsg->buf = kzalloc(msg->len, GFP_KERNEL);
+ if (!vmsg->buf)
+ return -ENOMEM;...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...q->vdev->priv;
> +
> + complete(&vi->completion);
> +}
> +
> +static int virtio_i2c_add_msg(struct virtqueue *vq,
> + struct virtio_i2c_msg *vmsg,
> + struct i2c_msg *msg)
> +{
> + struct scatterlist *sgs[3], hdr, bout, bin, status;
> + int outcnt = 0, incnt = 0;
> +
> + if (!msg->len)
> + return -EINVAL;
> +
> + vmsg->hdr.addr = msg->addr;
> + vmsg->hdr.flags = msg->flags;
> + vmsg->hdr.len = msg->len;
> +
> + vmsg->buf = kzalloc(vmsg->hdr.len, GFP_KERNEL);
> + if (!vmsg->buf)
>...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...q->vdev->priv;
> +
> + complete(&vi->completion);
> +}
> +
> +static int virtio_i2c_add_msg(struct virtqueue *vq,
> + struct virtio_i2c_msg *vmsg,
> + struct i2c_msg *msg)
> +{
> + struct scatterlist *sgs[3], hdr, bout, bin, status;
> + int outcnt = 0, incnt = 0;
> +
> + if (!msg->len)
> + return -EINVAL;
> +
> + vmsg->hdr.addr = msg->addr;
> + vmsg->hdr.flags = msg->flags;
> + vmsg->hdr.len = msg->len;
> +
> + vmsg->buf = kzalloc(vmsg->hdr.len, GFP_KERNEL);
> + if (!vmsg->buf)
>...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...q->vdev->priv;
> +
> + complete(&vi->completion);
> +}
> +
> +static int virtio_i2c_add_msg(struct virtqueue *vq,
> + struct virtio_i2c_msg *vmsg,
> + struct i2c_msg *msg)
> +{
> + struct scatterlist *sgs[3], hdr, bout, bin, status;
> + int outcnt = 0, incnt = 0;
> +
> + if (!msg->len)
> + return -EINVAL;
> +
> + vmsg->hdr.addr = cpu_to_le16(msg->addr);
> + vmsg->hdr.flags = cpu_to_le16(msg->flags);
> + vmsg->hdr.len = cpu_to_le16(msg->len);
> +
> + vmsg->buf = kzalloc(msg->len, GFP_KERN...