~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/media/video/tiler/tmm.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        /* function table */
29
29
        u32 *(*get)     (struct tmm *tmm, u32 num_pages);
30
30
        void (*free)    (struct tmm *tmm, u32 *pages);
31
 
        s32  (*map)     (struct tmm *tmm, struct pat_area area, u32 page_pa);
32
 
        void (*clear)   (struct tmm *tmm, struct pat_area area);
 
31
        s32  (*pin)     (struct tmm *tmm, struct pat_area area, u32 page_pa);
 
32
        void (*unpin)   (struct tmm *tmm, struct pat_area area);
33
33
        void (*deinit)  (struct tmm *tmm);
34
34
};
35
35
 
62
62
 * @param list of pages
63
63
 */
64
64
static inline
65
 
s32 tmm_map(struct tmm *tmm, struct pat_area area, u32 page_pa)
 
65
s32 tmm_pin(struct tmm *tmm, struct pat_area area, u32 page_pa)
66
66
{
67
 
        if (tmm && tmm->map && tmm->pvt)
68
 
                return tmm->map(tmm, area, page_pa);
 
67
        if (tmm && tmm->pin && tmm->pvt)
 
68
                return tmm->pin(tmm, area, page_pa);
69
69
        return -ENODEV;
70
70
}
71
71
 
74
74
 * @param area PAT area
75
75
 */
76
76
static inline
77
 
void tmm_clear(struct tmm *tmm, struct pat_area area)
 
77
void tmm_unpin(struct tmm *tmm, struct pat_area area)
78
78
{
79
 
        if (tmm && tmm->clear && tmm->pvt)
80
 
                tmm->clear(tmm, area);
 
79
        if (tmm && tmm->unpin && tmm->pvt)
 
80
                tmm->unpin(tmm, area);
81
81
}
82
82
 
83
83
/**
84
84
 * Checks whether tiler memory manager supports mapping
85
85
 */
86
86
static inline
87
 
bool tmm_can_map(struct tmm *tmm)
 
87
bool tmm_can_pin(struct tmm *tmm)
88
88
{
89
 
        return tmm && tmm->map;
 
89
        return tmm && tmm->pin;
90
90
}
91
91
 
92
92
/**
104
104
 *
105
105
 * Initialize TMM for PAT with given id.
106
106
 */
107
 
struct tmm *tmm_pat_init(u32 pat_id);
 
107
struct tmm *tmm_pat_init(u32 pat_id, u32 *dmac_va, u32 dmac_pa);
108
108
 
109
109
#endif