Commit d6013853 authored by Gurchetan Singh's avatar Gurchetan Singh Committed by Gerd Hoffmann

drm/virtio: random virtgpu_drv.h cleanups

- Static-ify virtio_gpu_gem_create
- Delete unused prototypes
- Point to current implementation files
Signed-off-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: default avatarChia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200401223039.2860-1-gurchetansingh@chromium.orgSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 9c9a8468
...@@ -218,26 +218,18 @@ struct virtio_gpu_fpriv { ...@@ -218,26 +218,18 @@ struct virtio_gpu_fpriv {
struct mutex context_lock; struct mutex context_lock;
}; };
/* virtio_ioctl.c */ /* virtgpu_ioctl.c */
#define DRM_VIRTIO_NUM_IOCTLS 10 #define DRM_VIRTIO_NUM_IOCTLS 10
extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS]; extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS];
/* virtio_kms.c */ /* virtgpu_kms.c */
int virtio_gpu_init(struct drm_device *dev); int virtio_gpu_init(struct drm_device *dev);
void virtio_gpu_deinit(struct drm_device *dev); void virtio_gpu_deinit(struct drm_device *dev);
void virtio_gpu_release(struct drm_device *dev); void virtio_gpu_release(struct drm_device *dev);
int virtio_gpu_driver_open(struct drm_device *dev, struct drm_file *file); int virtio_gpu_driver_open(struct drm_device *dev, struct drm_file *file);
void virtio_gpu_driver_postclose(struct drm_device *dev, struct drm_file *file); void virtio_gpu_driver_postclose(struct drm_device *dev, struct drm_file *file);
/* virtio_gem.c */ /* virtgpu_gem.c */
void virtio_gpu_gem_free_object(struct drm_gem_object *gem_obj);
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 drm_gem_object **obj_p,
uint32_t *handle_p);
int virtio_gpu_gem_object_open(struct drm_gem_object *obj, int virtio_gpu_gem_object_open(struct drm_gem_object *obj,
struct drm_file *file); struct drm_file *file);
void virtio_gpu_gem_object_close(struct drm_gem_object *obj, void virtio_gpu_gem_object_close(struct drm_gem_object *obj,
...@@ -263,7 +255,7 @@ void virtio_gpu_array_put_free_delayed(struct virtio_gpu_device *vgdev, ...@@ -263,7 +255,7 @@ void virtio_gpu_array_put_free_delayed(struct virtio_gpu_device *vgdev,
struct virtio_gpu_object_array *objs); struct virtio_gpu_object_array *objs);
void virtio_gpu_array_put_free_work(struct work_struct *work); void virtio_gpu_array_put_free_work(struct work_struct *work);
/* virtio vg */ /* virtgpu_vq.c */
int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev); int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev);
void virtio_gpu_free_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, void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
...@@ -343,17 +335,17 @@ void virtio_gpu_dequeue_fence_func(struct work_struct *work); ...@@ -343,17 +335,17 @@ void virtio_gpu_dequeue_fence_func(struct work_struct *work);
void virtio_gpu_notify(struct virtio_gpu_device *vgdev); void virtio_gpu_notify(struct virtio_gpu_device *vgdev);
/* virtio_gpu_display.c */ /* virtgpu_display.c */
void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev); void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev);
void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev); void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev);
/* virtio_gpu_plane.c */ /* virtgpu_plane.c */
uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc); uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc);
struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
enum drm_plane_type type, enum drm_plane_type type,
int index); int index);
/* virtio_gpu_fence.c */ /* virtgpu_fence.c */
struct virtio_gpu_fence *virtio_gpu_fence_alloc( struct virtio_gpu_fence *virtio_gpu_fence_alloc(
struct virtio_gpu_device *vgdev); struct virtio_gpu_device *vgdev);
void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev,
...@@ -362,7 +354,7 @@ void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, ...@@ -362,7 +354,7 @@ void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev,
void virtio_gpu_fence_event_process(struct virtio_gpu_device *vdev, void virtio_gpu_fence_event_process(struct virtio_gpu_device *vdev,
u64 last_seq); u64 last_seq);
/* virtio_gpu_object */ /* virtgpu_object.c */
void virtio_gpu_cleanup_object(struct virtio_gpu_object *bo); void virtio_gpu_cleanup_object(struct virtio_gpu_object *bo);
struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev, struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev,
size_t size); size_t size);
...@@ -378,7 +370,7 @@ struct drm_gem_object *virtgpu_gem_prime_import_sg_table( ...@@ -378,7 +370,7 @@ struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
struct drm_device *dev, struct dma_buf_attachment *attach, struct drm_device *dev, struct dma_buf_attachment *attach,
struct sg_table *sgt); struct sg_table *sgt);
/* virgl debugfs */ /* virtgpu_debugfs.c */
void virtio_gpu_debugfs_init(struct drm_minor *minor); void virtio_gpu_debugfs_init(struct drm_minor *minor);
#endif #endif
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "virtgpu_drv.h" #include "virtgpu_drv.h"
int virtio_gpu_gem_create(struct drm_file *file, static int virtio_gpu_gem_create(struct drm_file *file,
struct drm_device *dev, struct drm_device *dev,
struct virtio_gpu_object_params *params, struct virtio_gpu_object_params *params,
struct drm_gem_object **obj_p, struct drm_gem_object **obj_p,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment