From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
open list <linux-kernel@vger.kernel.org>,
"open list:VIRTIO GPU DRIVER"
<virtualization@lists.linux-foundation.org>,
Daniel Vetter <daniel@ffwll.ch>,
gurchetansingh@chromium.org, olvaffe@gmail.com
Subject: [PATCH v4 4/6] drm/virtio: batch resource creation
Date: Fri, 14 Feb 2020 13:55:33 +0100 [thread overview]
Message-ID: <20200214125535.26349-5-kraxel@redhat.com> (raw)
In-Reply-To: <20200214125535.26349-1-kraxel@redhat.com>
Move virtio_gpu_notify() to higher-level functions for
virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d()
and virtio_gpu_cmd_resource_attach_backing().
virtio_gpu_object_create() will batch commands and notify only once when
creating a resource.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 1 +
drivers/gpu/drm/virtio/virtgpu_vq.c | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index 8870ee23ff2b..65d6834d3c74 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -224,6 +224,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
return ret;
}
+ virtio_gpu_notify(vgdev);
*bo_ptr = bo;
return 0;
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 0bd1c51bbabd..4e9b2f2e71bd 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -515,7 +515,6 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
cmd_p->height = cpu_to_le32(params->height);
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
bo->created = true;
}
@@ -644,7 +643,6 @@ virtio_gpu_cmd_resource_attach_backing(struct virtio_gpu_device *vgdev,
vbuf->data_size = sizeof(*ents) * nents;
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
}
static void virtio_gpu_cmd_get_display_info_cb(struct virtio_gpu_device *vgdev,
@@ -1011,7 +1009,6 @@ virtio_gpu_cmd_resource_create_3d(struct virtio_gpu_device *vgdev,
cmd_p->flags = cpu_to_le32(params->flags);
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
bo->created = true;
}
--
2.18.2
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
open list <linux-kernel@vger.kernel.org>,
"open list:VIRTIO GPU DRIVER"
<virtualization@lists.linux-foundation.org>,
Gerd Hoffmann <kraxel@redhat.com>,
gurchetansingh@chromium.org
Subject: [PATCH v4 4/6] drm/virtio: batch resource creation
Date: Fri, 14 Feb 2020 13:55:33 +0100 [thread overview]
Message-ID: <20200214125535.26349-5-kraxel@redhat.com> (raw)
In-Reply-To: <20200214125535.26349-1-kraxel@redhat.com>
Move virtio_gpu_notify() to higher-level functions for
virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d()
and virtio_gpu_cmd_resource_attach_backing().
virtio_gpu_object_create() will batch commands and notify only once when
creating a resource.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 1 +
drivers/gpu/drm/virtio/virtgpu_vq.c | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index 8870ee23ff2b..65d6834d3c74 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -224,6 +224,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
return ret;
}
+ virtio_gpu_notify(vgdev);
*bo_ptr = bo;
return 0;
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 0bd1c51bbabd..4e9b2f2e71bd 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -515,7 +515,6 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
cmd_p->height = cpu_to_le32(params->height);
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
bo->created = true;
}
@@ -644,7 +643,6 @@ virtio_gpu_cmd_resource_attach_backing(struct virtio_gpu_device *vgdev,
vbuf->data_size = sizeof(*ents) * nents;
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
}
static void virtio_gpu_cmd_get_display_info_cb(struct virtio_gpu_device *vgdev,
@@ -1011,7 +1009,6 @@ virtio_gpu_cmd_resource_create_3d(struct virtio_gpu_device *vgdev,
cmd_p->flags = cpu_to_le32(params->flags);
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
bo->created = true;
}
--
2.18.2
_______________________________________________
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: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: gurchetansingh@chromium.org, olvaffe@gmail.com,
Gerd Hoffmann <kraxel@redhat.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
virtualization@lists.linux-foundation.org (open list:VIRTIO GPU
DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v4 4/6] drm/virtio: batch resource creation
Date: Fri, 14 Feb 2020 13:55:33 +0100 [thread overview]
Message-ID: <20200214125535.26349-5-kraxel@redhat.com> (raw)
In-Reply-To: <20200214125535.26349-1-kraxel@redhat.com>
Move virtio_gpu_notify() to higher-level functions for
virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d()
and virtio_gpu_cmd_resource_attach_backing().
virtio_gpu_object_create() will batch commands and notify only once when
creating a resource.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 1 +
drivers/gpu/drm/virtio/virtgpu_vq.c | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index 8870ee23ff2b..65d6834d3c74 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -224,6 +224,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
return ret;
}
+ virtio_gpu_notify(vgdev);
*bo_ptr = bo;
return 0;
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 0bd1c51bbabd..4e9b2f2e71bd 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -515,7 +515,6 @@ void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
cmd_p->height = cpu_to_le32(params->height);
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
bo->created = true;
}
@@ -644,7 +643,6 @@ virtio_gpu_cmd_resource_attach_backing(struct virtio_gpu_device *vgdev,
vbuf->data_size = sizeof(*ents) * nents;
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
}
static void virtio_gpu_cmd_get_display_info_cb(struct virtio_gpu_device *vgdev,
@@ -1011,7 +1009,6 @@ virtio_gpu_cmd_resource_create_3d(struct virtio_gpu_device *vgdev,
cmd_p->flags = cpu_to_le32(params->flags);
virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence);
- virtio_gpu_notify(vgdev);
bo->created = true;
}
--
2.18.2
next prev parent reply other threads:[~2020-02-14 12:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 12:55 [PATCH v4 0/6] drm/virtio: rework batching Gerd Hoffmann
2020-02-14 12:55 ` [PATCH v4 1/6] drm/virtio: rework notification for better batching Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` [PATCH v4 2/6] drm/virtio: notify before waiting Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` [PATCH v4 3/6] drm/virtio: batch plane updates (pageflip) Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann [this message]
2020-02-14 12:55 ` [PATCH v4 4/6] drm/virtio: batch resource creation Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` [PATCH v4 5/6] drm/virtio: batch display query Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` [PATCH v4 6/6] drm/virtio: move remaining virtio_gpu_notify calls Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 12:55 ` Gerd Hoffmann
2020-02-14 19:44 ` [PATCH v4 0/6] drm/virtio: rework batching Chia-I Wu
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=20200214125535.26349-5-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olvaffe@gmail.com \
--cc=virtualization@lists.linux-foundation.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.