kolibrios-fun/drivers/video/drm/i915/hmm.h
Sergey Semyonov (Serge) 88dd19b554 i915 hw blitter: Back in the game
git-svn-id: svn://kolibrios.org@3033 a494cfbc-eb01-0410-851d-a64ba20cac60
2012-11-13 09:18:58 +00:00

25 lines
481 B
C

#ifndef __HMM_H__
#define __HMM_H__
struct hmm
{
u32 *table;
u32 next;
u32 avail;
u32 count;
};
int init_hmm(struct hmm *mm, u32 count);
u32 alloc_handle(struct hmm *mm);
int free_handle(struct hmm *mm, u32 handle);
#define hmm_get_data(mm, handle) \
((mm)->table[(handle)-1])
#define hmm_set_data(mm, handle, val) \
((mm)->table[(handle)-1]) = (u32)(val)
#endif /* __HMM_H__ */