#include <linux/dma-buf.h>
#include <linux/mdev.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_plane.h>
#include "gem/i915_gem_dmabuf.h"
#include "i915_drv.h"
#include "gvt.h"
#include "display/skl_universal_plane_regs.h"
#define GEN8_DECODE_PTE(pte) …
static int vgpu_gem_get_pages(struct drm_i915_gem_object *obj)
{ … }
static void vgpu_gem_put_pages(struct drm_i915_gem_object *obj,
struct sg_table *pages)
{ … }
static void dmabuf_gem_object_free(struct kref *kref)
{ … }
static inline void dmabuf_obj_get(struct intel_vgpu_dmabuf_obj *obj)
{ … }
static inline void dmabuf_obj_put(struct intel_vgpu_dmabuf_obj *obj)
{ … }
static void vgpu_gem_release(struct drm_i915_gem_object *gem_obj)
{ … }
static const struct drm_i915_gem_object_ops intel_vgpu_gem_ops = …;
static struct drm_i915_gem_object *vgpu_create_gem(struct drm_device *dev,
struct intel_vgpu_fb_info *info)
{ … }
static bool validate_hotspot(struct intel_vgpu_cursor_plane_format *c)
{ … }
static int vgpu_get_plane_info(struct drm_device *dev,
struct intel_vgpu *vgpu,
struct intel_vgpu_fb_info *info,
int plane_id)
{ … }
static struct intel_vgpu_dmabuf_obj *
pick_dmabuf_by_info(struct intel_vgpu *vgpu,
struct intel_vgpu_fb_info *latest_info)
{ … }
static struct intel_vgpu_dmabuf_obj *
pick_dmabuf_by_num(struct intel_vgpu *vgpu, u32 id)
{ … }
static void update_fb_info(struct vfio_device_gfx_plane_info *gvt_dmabuf,
struct intel_vgpu_fb_info *fb_info)
{ … }
int intel_vgpu_query_plane(struct intel_vgpu *vgpu, void *args)
{ … }
int intel_vgpu_get_dmabuf(struct intel_vgpu *vgpu, unsigned int dmabuf_id)
{ … }
void intel_vgpu_dmabuf_cleanup(struct intel_vgpu *vgpu)
{ … }