2012-01-30 11:06:25 +04:00
|
|
|
|
|
|
|
typedef struct tag_object kobj_t;
|
|
|
|
typedef struct tag_display display_t;
|
|
|
|
|
|
|
|
struct hman
|
|
|
|
{
|
|
|
|
u32 *table;
|
|
|
|
u32 next;
|
|
|
|
u32 avail;
|
|
|
|
u32 count;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct hman bm_man;
|
|
|
|
|
|
|
|
int init_hman(struct hman *man, u32 count);
|
|
|
|
u32 alloc_handle(struct hman *man);
|
|
|
|
int free_handle(struct hman *man, u32 handle);
|
|
|
|
|
|
|
|
#define hman_get_data(man, handle) \
|
|
|
|
((man)->table[(handle)-1])
|
|
|
|
|
|
|
|
#define hman_set_data(man, handle, val) \
|
|
|
|
((man)->table[(handle)-1]) = (u32)(val)
|
|
|
|
|
|
|
|
|
|
|
|
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 17:23:46 +04:00
|
|
|
u32 handle;
|
|
|
|
void *uaddr;
|
|
|
|
|
|
|
|
u32 pitch;
|
|
|
|
u32 gaddr;
|
|
|
|
|
|
|
|
u32 width;
|
|
|
|
u32 height;
|
|
|
|
u32 max_width;
|
|
|
|
u32 max_height;
|
|
|
|
|
|
|
|
u32 format;
|
2012-01-30 11:06:25 +04:00
|
|
|
struct drm_i915_gem_object *obj;
|
|
|
|
}bitmap_t;
|
|
|
|
|
|
|
|
|
2012-02-04 17:23:46 +04:00
|
|
|
struct io_call_10 /* SRV_CREATE_SURFACE */
|
2012-01-30 11:06:25 +04:00
|
|
|
{
|
2012-02-04 17:23:46 +04: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 11:06:25 +04:00
|
|
|
};
|
|
|
|
|
2012-02-04 17:23:46 +04:00
|
|
|
int create_surface(struct io_call_10 *pbitmap);
|
2012-02-03 10:54:20 +04:00
|
|
|
int init_bitmaps();
|
2012-01-30 11:06:25 +04:00
|
|
|
|