#include <drm/ttm/ttm_placement.h>
#include "vmwgfx_binding.h"
#include "vmwgfx_bo.h"
#include "vmwgfx_drv.h"
#include "vmwgfx_resource_priv.h"
struct vmw_user_context { … };
static void vmw_user_context_free(struct vmw_resource *res);
static struct vmw_resource *
vmw_user_context_base_to_res(struct ttm_base_object *base);
static int vmw_gb_context_create(struct vmw_resource *res);
static int vmw_gb_context_bind(struct vmw_resource *res,
struct ttm_validate_buffer *val_buf);
static int vmw_gb_context_unbind(struct vmw_resource *res,
bool readback,
struct ttm_validate_buffer *val_buf);
static int vmw_gb_context_destroy(struct vmw_resource *res);
static int vmw_dx_context_create(struct vmw_resource *res);
static int vmw_dx_context_bind(struct vmw_resource *res,
struct ttm_validate_buffer *val_buf);
static int vmw_dx_context_unbind(struct vmw_resource *res,
bool readback,
struct ttm_validate_buffer *val_buf);
static int vmw_dx_context_destroy(struct vmw_resource *res);
static const struct vmw_user_resource_conv user_context_conv = …;
const struct vmw_user_resource_conv *user_context_converter = …;
static const struct vmw_res_func vmw_legacy_context_func = …;
static const struct vmw_res_func vmw_gb_context_func = …;
static const struct vmw_res_func vmw_dx_context_func = …;
static void vmw_context_cotables_unref(struct vmw_private *dev_priv,
struct vmw_user_context *uctx)
{ … }
static void vmw_hw_context_destroy(struct vmw_resource *res)
{ … }
static int vmw_gb_context_init(struct vmw_private *dev_priv,
bool dx,
struct vmw_resource *res,
void (*res_free)(struct vmw_resource *res))
{ … }
static int vmw_context_init(struct vmw_private *dev_priv,
struct vmw_resource *res,
void (*res_free)(struct vmw_resource *res),
bool dx)
{ … }
static int vmw_gb_context_create(struct vmw_resource *res)
{ … }
static int vmw_gb_context_bind(struct vmw_resource *res,
struct ttm_validate_buffer *val_buf)
{ … }
static int vmw_gb_context_unbind(struct vmw_resource *res,
bool readback,
struct ttm_validate_buffer *val_buf)
{ … }
static int vmw_gb_context_destroy(struct vmw_resource *res)
{ … }
static int vmw_dx_context_create(struct vmw_resource *res)
{ … }
static int vmw_dx_context_bind(struct vmw_resource *res,
struct ttm_validate_buffer *val_buf)
{ … }
void vmw_dx_context_scrub_cotables(struct vmw_resource *ctx,
bool readback)
{ … }
static int vmw_dx_context_unbind(struct vmw_resource *res,
bool readback,
struct ttm_validate_buffer *val_buf)
{ … }
static int vmw_dx_context_destroy(struct vmw_resource *res)
{ … }
static struct vmw_resource *
vmw_user_context_base_to_res(struct ttm_base_object *base)
{ … }
static void vmw_user_context_free(struct vmw_resource *res)
{ … }
static void vmw_user_context_base_release(struct ttm_base_object **p_base)
{ … }
int vmw_context_destroy_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
static int vmw_context_define(struct drm_device *dev, void *data,
struct drm_file *file_priv, bool dx)
{ … }
int vmw_context_define_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int vmw_extended_context_define_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
struct list_head *vmw_context_binding_list(struct vmw_resource *ctx)
{ … }
struct vmw_cmdbuf_res_manager *vmw_context_res_man(struct vmw_resource *ctx)
{ … }
struct vmw_resource *vmw_context_cotable(struct vmw_resource *ctx,
SVGACOTableType cotable_type)
{ … }
struct vmw_ctx_binding_state *
vmw_context_binding_state(struct vmw_resource *ctx)
{ … }
int vmw_context_bind_dx_query(struct vmw_resource *ctx_res,
struct vmw_bo *mob)
{ … }
struct vmw_bo *
vmw_context_get_dx_query_mob(struct vmw_resource *ctx_res)
{ … }