Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:51

0001 
0002 #ifndef _RADEON_CS_INT_H_
0003 #define _RADEON_CS_INT_H_
0004 
0005 struct radeon_cs_space_check {
0006     struct radeon_bo_int *bo;
0007     uint32_t read_domains;
0008     uint32_t write_domain;
0009     uint32_t new_accounted;
0010 };
0011 
0012 struct radeon_cs_int {
0013     /* keep first two in same place */
0014     uint32_t                    *packets;    
0015     unsigned                    cdw;
0016     unsigned                    ndw;
0017     unsigned                    section_ndw;
0018     unsigned                    section_cdw;
0019     /* private members */
0020     struct radeon_cs_manager    *csm;
0021     void                        *relocs;
0022     unsigned                    crelocs;
0023     unsigned                    relocs_total_size;
0024     const char                  *section_file;
0025     const char                  *section_func;
0026     int                         section_line;
0027     struct radeon_cs_space_check bos[MAX_SPACE_BOS];
0028     int                         bo_count;
0029     void                        (*space_flush_fn)(void *);
0030     void                        *space_flush_data;
0031     uint32_t                    id;
0032 };
0033 
0034 /* cs functions */
0035 struct radeon_cs_funcs {
0036     struct radeon_cs_int *(*cs_create)(struct radeon_cs_manager *csm,
0037                                    uint32_t ndw);
0038     int (*cs_write_reloc)(struct radeon_cs_int *cs,
0039                           struct radeon_bo *bo,
0040                           uint32_t read_domain,
0041                           uint32_t write_domain,
0042                           uint32_t flags);
0043     int (*cs_begin)(struct radeon_cs_int *cs,
0044                     uint32_t ndw,
0045             const char *file,
0046             const char *func,
0047             int line);
0048     int (*cs_end)(struct radeon_cs_int *cs,
0049           const char *file, const char *func,
0050           int line);
0051 
0052 
0053     int (*cs_emit)(struct radeon_cs_int *cs);
0054     int (*cs_destroy)(struct radeon_cs_int *cs);
0055     int (*cs_erase)(struct radeon_cs_int *cs);
0056     int (*cs_need_flush)(struct radeon_cs_int *cs);
0057     void (*cs_print)(struct radeon_cs_int *cs, FILE *file);
0058 };
0059 
0060 struct radeon_cs_manager {
0061     const struct radeon_cs_funcs  *funcs;
0062     int                     fd;
0063     int32_t vram_limit, gart_limit;
0064     int32_t vram_write_used, gart_write_used;
0065     int32_t read_used;
0066 };
0067 #endif