Displaying 20 results from an estimated 20 matches for "max_inline_cmd_size".
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
...amp;vgdev->free_vbufs,
- struct virtio_gpu_vbuffer, list);
- list_del(&vbuf->list);
- spin_unlock(&vgdev->free_vbufs_lock);
+ vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
+ if (IS_ERR(vbuf))
+ return ERR_CAST(vbuf);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
@@ -208,9 +173,7 @@ static void free_vbuf(struct virtio_gpu_device *vgdev,
if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
kfree(vbuf->resp_buf);
kfree(vbuf->data_buf);
- spin_lock(&vgdev->free_vbufs_lock);
- list_add(&vbuf->list, &vgdev->free_vbufs);
- spin_un...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
...amp;vgdev->free_vbufs,
- struct virtio_gpu_vbuffer, list);
- list_del(&vbuf->list);
- spin_unlock(&vgdev->free_vbufs_lock);
+ vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
+ if (IS_ERR(vbuf))
+ return ERR_CAST(vbuf);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
@@ -208,9 +173,7 @@ static void free_vbuf(struct virtio_gpu_device *vgdev,
if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
kfree(vbuf->resp_buf);
kfree(vbuf->data_buf);
- spin_lock(&vgdev->free_vbufs_lock);
- list_add(&vbuf->list, &vgdev->free_vbufs);
- spin_un...
2015 Apr 02
0
[PATCH v2 3/4] Add virtio gpu driver.
Hi Gerd
While doing some testing with your brance, I reached that:
On Wed, Apr 1, 2015 at 3:15 PM, Gerd Hoffmann <kraxel at redhat.com> wrote:
> +#define MAX_INLINE_CMD_SIZE 96
>
[ 750.446449] kernel BUG at drivers/gpu/drm/virtio/virtgpu_vq.c:132!
[ 750.447005] Call Trace:
[ 750.447005] [<ffffffffa00f3592>] virtio_gpu_alloc_cmd+0x22/0x50
[virtio_gpu]
[ 750.447005] [<ffffffffa00f4580>]
virtio_gpu_cmd_context_create+0x30/0xa0 [virtio_gpu]
struct...
2017 Mar 13
1
[PATCH] drm: virtio: fix kmem_cache_alloc error check
...,8 @@ void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev)
struct virtio_gpu_vbuffer *vbuf;
vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
- if (IS_ERR(vbuf))
- return ERR_CAST(vbuf);
+ if (!vbuf)
+ return ERR_PTR(-ENOMEM);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
--
1.8.3.1
2017 Mar 13
1
[PATCH] drm: virtio: fix kmem_cache_alloc error check
...,8 @@ void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev)
struct virtio_gpu_vbuffer *vbuf;
vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
- if (IS_ERR(vbuf))
- return ERR_CAST(vbuf);
+ if (!vbuf)
+ return ERR_PTR(-ENOMEM);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
--
1.8.3.1
2017 Dec 28
3
[PATCH] drm/virtio: Add window server support
...rs/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 9eb96fb2c147..ea5f9352d364 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -32,7 +32,7 @@
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
-#define MAX_INLINE_CMD_SIZE 96
+#define MAX_INLINE_CMD_SIZE 144
#define MAX_INLINE_RESP_SIZE 24
#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
+ MAX_INLINE_CMD_SIZE \
@@ -72,6 +72,67 @@ void virtio_gpu_cursor_ack(struct virtqueue *vq)
schedule_work(&vgdev->cursorq.dequeue_work)...
2017 Dec 28
3
[PATCH] drm/virtio: Add window server support
...rs/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 9eb96fb2c147..ea5f9352d364 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -32,7 +32,7 @@
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
-#define MAX_INLINE_CMD_SIZE 96
+#define MAX_INLINE_CMD_SIZE 144
#define MAX_INLINE_RESP_SIZE 24
#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
+ MAX_INLINE_CMD_SIZE \
@@ -72,6 +72,67 @@ void virtio_gpu_cursor_ack(struct virtqueue *vq)
schedule_work(&vgdev->cursorq.dequeue_work)...
2015 Jun 16
0
[PATCH 3/3] virtio-gpu: add locking for vbuf pool
...dev->free_vbufs_lock);
BUG_ON(list_empty(&vgdev->free_vbufs));
vbuf = list_first_entry(&vgdev->free_vbufs,
struct virtio_gpu_vbuffer, list);
list_del(&vbuf->list);
+ spin_unlock(&vgdev->free_vbufs_lock);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
@@ -201,7 +206,9 @@ static void free_vbuf(struct virtio_gpu_device *vgdev,
if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
kfree(vbuf->resp_buf);
kfree(vbuf->data_buf);
+ spin_lock(&vgdev->free_vbufs_lock);
list_add(&vbuf->list, &vgdev->free_vbufs);
+ spin_un...
2015 Jun 16
0
[PATCH 3/3] virtio-gpu: add locking for vbuf pool
...dev->free_vbufs_lock);
BUG_ON(list_empty(&vgdev->free_vbufs));
vbuf = list_first_entry(&vgdev->free_vbufs,
struct virtio_gpu_vbuffer, list);
list_del(&vbuf->list);
+ spin_unlock(&vgdev->free_vbufs_lock);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
@@ -201,7 +206,9 @@ static void free_vbuf(struct virtio_gpu_device *vgdev,
if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
kfree(vbuf->resp_buf);
kfree(vbuf->data_buf);
+ spin_lock(&vgdev->free_vbufs_lock);
list_add(&vbuf->list, &vgdev->free_vbufs);
+ spin_un...
2018 Jan 26
0
[PATCH v3 1/2] drm/virtio: Add window server support
...rs/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 9eb96fb2c147..ea5f9352d364 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -32,7 +32,7 @@
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
-#define MAX_INLINE_CMD_SIZE 96
+#define MAX_INLINE_CMD_SIZE 144
#define MAX_INLINE_RESP_SIZE 24
#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
+ MAX_INLINE_CMD_SIZE \
@@ -72,6 +72,67 @@ void virtio_gpu_cursor_ack(struct virtqueue *vq)
schedule_work(&vgdev->cursorq.dequeue_work)...
2018 Jan 26
3
[PATCH v3 0/2] drm/virtio: Add window server support
Hi,
this work is based on the virtio_wl driver in the ChromeOS kernel by
Zach Reizner, currently at:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.4/drivers/virtio/virtio_wl.c
There's one feature missing currently, which is letting clients write
directly to the host part of a resource, so the extra copy in
TRANSFER_TO_HOST isn't needed.
Have pushed the
2019 Oct 23
0
[PATCH v2 1/3] drm/virtio: fix byteorder handling in virtio_gpu_cmd_transfer_{from, to}_host_3d functions
...ce);
dma_fence_put(&fence->f);
}
return 0;
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 74ad3bc3ebe8..9274c4063c70 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -40,6 +40,17 @@
+ MAX_INLINE_CMD_SIZE \
+ MAX_INLINE_RESP_SIZE)
+static void convert_to_hw_box(struct virtio_gpu_box *dst,
+ const struct drm_virtgpu_3d_box *src)
+{
+ dst->x = cpu_to_le32(src->x);
+ dst->y = cpu_to_le32(src->y);
+ dst->z = cpu_to_le32(src->z);
+ dst->w = cpu_to_le32(src->...
2020 Feb 14
0
[PATCH AUTOSEL 5.5 006/542] drm/virtio: fix byteorder handling in virtio_gpu_cmd_transfer_{from, to}_host_3d functions
...);
dma_fence_put(&fence->f);
}
return 0;
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 74ad3bc3ebe83..9274c4063c701 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -40,6 +40,17 @@
+ MAX_INLINE_CMD_SIZE \
+ MAX_INLINE_RESP_SIZE)
+static void convert_to_hw_box(struct virtio_gpu_box *dst,
+ const struct drm_virtgpu_3d_box *src)
+{
+ dst->x = cpu_to_le32(src->x);
+ dst->y = cpu_to_le32(src->y);
+ dst->z = cpu_to_le32(src->z);
+ dst->w = cpu_to_le32(src->...
2019 Jun 30
2
[PATCH v1 27/33] drm/virtgpu: drop use of drmP.h
..."virtgpu_drv.h"
-#include "virtgpu_trace.h"
+#include <linux/dma-mapping.h>
#include <linux/virtio.h>
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
+#include "virtgpu_drv.h"
+#include "virtgpu_trace.h"
+
#define MAX_INLINE_CMD_SIZE 96
#define MAX_INLINE_RESP_SIZE 24
#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
--
2.20.1
2019 Jun 30
2
[PATCH v1 27/33] drm/virtgpu: drop use of drmP.h
..."virtgpu_drv.h"
-#include "virtgpu_trace.h"
+#include <linux/dma-mapping.h>
#include <linux/virtio.h>
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
+#include "virtgpu_drv.h"
+#include "virtgpu_trace.h"
+
#define MAX_INLINE_CMD_SIZE 96
#define MAX_INLINE_RESP_SIZE 24
#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
--
2.20.1
2015 Apr 01
3
[PATCH v2 3/4] Add virtio gpu driver.
...ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <drm/drmP.h>
+#include "virtgpu_drv.h"
+#include <linux/virtio.h>
+#include <linux/virtio_config.h>
+#include <linux/virtio_ring.h>
+
+#define MAX_INLINE_CMD_SIZE 96
+#define MAX_INLINE_RESP_SIZE 24
+#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
+ + MAX_INLINE_CMD_SIZE \
+ + MAX_INLINE_RESP_SIZE)
+
+void virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev,
+ uint32_t *resid)
+{
+ int handle;
+
+ idr_prelo...
2015 Apr 01
3
[PATCH v2 3/4] Add virtio gpu driver.
...ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <drm/drmP.h>
+#include "virtgpu_drv.h"
+#include <linux/virtio.h>
+#include <linux/virtio_config.h>
+#include <linux/virtio_ring.h>
+
+#define MAX_INLINE_CMD_SIZE 96
+#define MAX_INLINE_RESP_SIZE 24
+#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
+ + MAX_INLINE_CMD_SIZE \
+ + MAX_INLINE_RESP_SIZE)
+
+void virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev,
+ uint32_t *resid)
+{
+ int handle;
+
+ idr_prelo...
2018 Sep 26
5
[PATCH 0/4] Improve virtio ID allocation
I noticed you were using IDRs where you could be using the more efficient
IDAs, then while fixing that I noticed the lack of error handling,
and I decided to follow that up with an efficiency improvement.
There's probably a v2 of this to follow because I couldn't figure
out how to properly handle one of the error cases ... see the comment
embedded in one of the patches.
Matthew Wilcox
2015 May 22
1
[PATCH v3 4/4] Add virtio gpu driver.
...ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <drm/drmP.h>
+#include "virtgpu_drv.h"
+#include <linux/virtio.h>
+#include <linux/virtio_config.h>
+#include <linux/virtio_ring.h>
+
+#define MAX_INLINE_CMD_SIZE 96
+#define MAX_INLINE_RESP_SIZE 24
+#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
+ + MAX_INLINE_CMD_SIZE \
+ + MAX_INLINE_RESP_SIZE)
+
+void virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev,
+ uint32_t *resid)
+{
+ int handle;
+
+ idr_prelo...
2015 May 22
1
[PATCH v3 4/4] Add virtio gpu driver.
...ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <drm/drmP.h>
+#include "virtgpu_drv.h"
+#include <linux/virtio.h>
+#include <linux/virtio_config.h>
+#include <linux/virtio_ring.h>
+
+#define MAX_INLINE_CMD_SIZE 96
+#define MAX_INLINE_RESP_SIZE 24
+#define VBUFFER_SIZE (sizeof(struct virtio_gpu_vbuffer) \
+ + MAX_INLINE_CMD_SIZE \
+ + MAX_INLINE_RESP_SIZE)
+
+void virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev,
+ uint32_t *resid)
+{
+ int handle;
+
+ idr_prelo...