[RFC PATCH 7/8] drm/virtio: rename virtio_gpu_object_params to virtio_gpu_create_params

Gurchetan Singh gurchetansingh at chromium.org
Thu Feb 27 00:26:00 UTC 2020


Currently, struct virtio_gpu_object refers to the SHMEM based object,
which is fair. We want to expand that a bit, so let's expand the
creation params too.

Signed-off-by: Gurchetan Singh <gurchetansingh at chromium.org>
---
 drivers/gpu/drm/virtio/virtgpu_drv.h    | 10 +++++-----
 drivers/gpu/drm/virtio/virtgpu_gem.c    |  4 ++--
 drivers/gpu/drm/virtio/virtgpu_ioctl.c  |  2 +-
 drivers/gpu/drm/virtio/virtgpu_object.c |  2 +-
 drivers/gpu/drm/virtio/virtgpu_vq.c     |  4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index a1888a20d311..4399a782b05e 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -49,7 +49,7 @@
 #define DRIVER_MINOR 1
 #define DRIVER_PATCHLEVEL 0
 
-struct virtio_gpu_object_params {
+struct virtio_gpu_create_params {
 	uint32_t format;
 	uint32_t width;
 	uint32_t height;
@@ -230,7 +230,7 @@ int virtio_gpu_gem_init(struct virtio_gpu_device *vgdev);
 void virtio_gpu_gem_fini(struct virtio_gpu_device *vgdev);
 int virtio_gpu_gem_create(struct drm_file *file,
 			  struct drm_device *dev,
-			  struct virtio_gpu_object_params *params,
+			  struct virtio_gpu_create_params *params,
 			  struct drm_gem_object **obj_p,
 			  uint32_t *handle_p);
 int virtio_gpu_gem_object_open(struct drm_gem_object *obj,
@@ -263,7 +263,7 @@ int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev);
 void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev);
 void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
 				    struct virtio_gpu_object *bo,
-				    struct virtio_gpu_object_params *params,
+				    struct virtio_gpu_create_params *params,
 				    struct virtio_gpu_gem_array *array,
 				    struct virtio_gpu_fence *fence);
 void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev,
@@ -326,7 +326,7 @@ void virtio_gpu_cmd_transfer_to_host_3d(struct virtio_gpu_device *vgdev,
 void
 virtio_gpu_cmd_resource_create_3d(struct virtio_gpu_device *vgdev,
 				  struct virtio_gpu_object *bo,
-				  struct virtio_gpu_object_params *params,
+				  struct virtio_gpu_create_params *params,
 				  struct virtio_gpu_gem_array *array,
 				  struct virtio_gpu_fence *fence);
 void virtio_gpu_ctrl_ack(struct virtqueue *vq);
@@ -362,7 +362,7 @@ void virtio_gpu_cleanup_object(struct virtio_gpu_object *bo);
 struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev,
 						size_t size);
 int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
-			     struct virtio_gpu_object_params *params,
+			     struct virtio_gpu_create_params *params,
 			     struct virtio_gpu_object **bo_ptr,
 			     struct virtio_gpu_fence *fence);
 
diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c
index 53181fe2afe0..569416dd00e6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_gem.c
+++ b/drivers/gpu/drm/virtio/virtgpu_gem.c
@@ -30,7 +30,7 @@
 
 int virtio_gpu_gem_create(struct drm_file *file,
 			  struct drm_device *dev,
-			  struct virtio_gpu_object_params *params,
+			  struct virtio_gpu_create_params *params,
 			  struct drm_gem_object **obj_p,
 			  uint32_t *handle_p)
 {
@@ -63,7 +63,7 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv,
 				struct drm_mode_create_dumb *args)
 {
 	struct drm_gem_object *gobj;
-	struct virtio_gpu_object_params params = { 0 };
+	struct virtio_gpu_create_params params = { 0 };
 	int ret;
 	uint32_t pitch;
 
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index 9a5bb000ccf2..ec97e18d104d 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
@@ -232,7 +232,7 @@ static int virtio_gpu_resource_create_ioctl(struct drm_device *dev, void *data,
 	struct virtio_gpu_object *qobj;
 	struct drm_gem_object *obj;
 	uint32_t handle = 0;
-	struct virtio_gpu_object_params params = { 0 };
+	struct virtio_gpu_create_params params = { 0 };
 
 	if (vgdev->has_virgl_3d) {
 		virtio_gpu_create_context(dev, file);
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index bc8b5a59f364..312c5bf4950a 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -186,7 +186,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,
 }
 
 int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
-			     struct virtio_gpu_object_params *params,
+			     struct virtio_gpu_create_params *params,
 			     struct virtio_gpu_object **bo_ptr,
 			     struct virtio_gpu_fence *fence)
 {
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 961371566724..878d07b75b7f 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -499,7 +499,7 @@ static void virtio_gpu_queue_cursor(struct virtio_gpu_device *vgdev,
 /* create a basic resource */
 void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
 				    struct virtio_gpu_object *bo,
-				    struct virtio_gpu_object_params *params,
+				    struct virtio_gpu_create_params *params,
 				    struct virtio_gpu_gem_array *array,
 				    struct virtio_gpu_fence *fence)
 {
@@ -981,7 +981,7 @@ void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev,
 void
 virtio_gpu_cmd_resource_create_3d(struct virtio_gpu_device *vgdev,
 				  struct virtio_gpu_object *bo,
-				  struct virtio_gpu_object_params *params,
+				  struct virtio_gpu_create_params *params,
 				  struct virtio_gpu_gem_array *array,
 				  struct virtio_gpu_fence *fence)
 {
-- 
2.25.1.481.gfbce0eb801-goog



More information about the dri-devel mailing list