2012-01-30 08:06:25 +01:00
|
|
|
|
|
|
|
typedef struct tag_object kobj_t;
|
|
|
|
typedef struct tag_display display_t;
|
|
|
|
|
|
|
|
|
|
|
|
struct tag_object
|
|
|
|
{
|
|
|
|
uint32_t magic;
|
|
|
|
void *destroy;
|
|
|
|
kobj_t *fd;
|
|
|
|
kobj_t *bk;
|
|
|
|
uint32_t pid;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
kobj_t header;
|
|
|
|
|
2012-02-04 14:23:46 +01:00
|
|
|
u32 handle;
|
2012-11-15 09:04:26 +01:00
|
|
|
char *uaddr;
|
2012-02-04 14:23:46 +01:00
|
|
|
|
|
|
|
u32 pitch;
|
|
|
|
u32 gaddr;
|
|
|
|
|
|
|
|
u32 width;
|
|
|
|
u32 height;
|
|
|
|
u32 max_width;
|
|
|
|
u32 max_height;
|
2012-11-13 10:18:58 +01:00
|
|
|
u32 page_count;
|
|
|
|
u32 max_count;
|
2012-02-04 14:23:46 +01:00
|
|
|
|
|
|
|
u32 format;
|
2012-01-30 08:06:25 +01:00
|
|
|
struct drm_i915_gem_object *obj;
|
|
|
|
}bitmap_t;
|
|
|
|
|
|
|
|
|
2012-02-04 14:23:46 +01:00
|
|
|
struct io_call_10 /* SRV_CREATE_SURFACE */
|
2012-01-30 08:06:25 +01:00
|
|
|
{
|
2012-02-04 14:23:46 +01:00
|
|
|
u32 handle; // ignored
|
|
|
|
void *data; // ignored
|
|
|
|
|
|
|
|
u32 width;
|
|
|
|
u32 height;
|
|
|
|
u32 pitch; // ignored
|
|
|
|
|
|
|
|
u32 max_width;
|
|
|
|
u32 max_height;
|
|
|
|
u32 format; // reserved mbz
|
2012-01-30 08:06:25 +01:00
|
|
|
};
|
|
|
|
|
2012-02-18 15:32:16 +01:00
|
|
|
struct io_call_12 /* SRV_LOCK_SURFACE */
|
|
|
|
{
|
2012-11-15 09:04:26 +01:00
|
|
|
u32 handle;
|
|
|
|
void *data;
|
|
|
|
u32 pitch;
|
2012-02-18 15:32:16 +01:00
|
|
|
};
|
|
|
|
|
2012-11-15 09:04:26 +01:00
|
|
|
struct io_call_14 /* SRV_RESIZE_SURFACE */
|
|
|
|
{
|
|
|
|
u32 handle;
|
|
|
|
void *data;
|
|
|
|
u32 new_width;
|
|
|
|
u32 new_height;
|
|
|
|
u32 pitch;
|
|
|
|
};
|
2012-02-18 15:32:16 +01:00
|
|
|
|
2012-02-16 11:48:38 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint32_t idx;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
uint32_t opt[2];
|
|
|
|
struct {
|
|
|
|
uint32_t max_tex_width;
|
|
|
|
uint32_t max_tex_height;
|
|
|
|
}cap1;
|
|
|
|
};
|
|
|
|
}hwcaps_t;
|
|
|
|
|
|
|
|
#define HW_BIT_BLIT (1<<0) /* BGRX blitter */
|
|
|
|
#define HW_TEX_BLIT (1<<1) /* stretch blit */
|
|
|
|
#define HW_VID_BLIT (1<<2) /* planar and packed video */
|
|
|
|
/* 3 - 63 reserved */
|
2012-02-21 07:06:51 +01:00
|
|
|
struct context
|
|
|
|
{
|
|
|
|
kobj_t header;
|
|
|
|
|
2012-11-13 10:18:58 +01:00
|
|
|
struct drm_i915_gem_object *obj;
|
|
|
|
u32 cmd_buffer;
|
|
|
|
u32 cmd_offset;
|
|
|
|
|
2012-02-21 07:06:51 +01:00
|
|
|
bitmap_t *mask;
|
|
|
|
u32 seqno;
|
|
|
|
int slot;
|
2012-11-13 10:18:58 +01:00
|
|
|
|
2012-02-21 07:06:51 +01:00
|
|
|
};
|
|
|
|
|
2012-02-16 11:48:38 +01:00
|
|
|
int get_driver_caps(hwcaps_t *caps);
|
2012-11-13 10:18:58 +01:00
|
|
|
int create_surface(struct drm_device *dev, struct io_call_10 *pbitmap);
|
2012-02-18 15:32:16 +01:00
|
|
|
int lock_surface(struct io_call_12 *pbitmap);
|
2012-11-15 09:04:26 +01:00
|
|
|
int resize_surface(struct io_call_14 *pbitmap);
|
2012-02-18 15:32:16 +01:00
|
|
|
|
2012-11-13 10:18:58 +01:00
|
|
|
struct context *get_context(struct drm_device *dev);
|
|
|
|
|
2012-02-03 07:54:20 +01:00
|
|
|
int init_bitmaps();
|
2012-01-30 08:06:25 +01:00
|
|
|
|