Deleted Added
full compact
32c32
< __FBSDID("$FreeBSD: head/sys/dev/drm/radeon_drv.h 196142 2009-08-12 12:57:02Z rnoland $");
---
> __FBSDID("$FreeBSD: head/sys/dev/drm/radeon_drv.h 196470 2009-08-23 14:55:57Z rnoland $");
44c44
< #define DRIVER_DATE "20080528"
---
> #define DRIVER_DATE "20080613"
238a239,278
> struct drm_radeon_kernel_chunk {
> uint32_t chunk_id;
> uint32_t length_dw;
> uint32_t __user *chunk_data;
> uint32_t *kdata;
> };
>
> struct drm_radeon_cs_parser {
> struct drm_device *dev;
> struct drm_file *file_priv;
> uint32_t num_chunks;
> struct drm_radeon_kernel_chunk *chunks;
> int ib_index;
> int reloc_index;
> uint32_t card_offset;
> void *ib;
> };
>
> /* command submission struct */
> struct drm_radeon_cs_priv {
> struct mtx cs_mutex;
> uint32_t id_wcnt;
> uint32_t id_scnt;
> uint32_t id_last_wcnt;
> uint32_t id_last_scnt;
>
> int (*parse)(struct drm_radeon_cs_parser *parser);
> void (*id_emit)(struct drm_radeon_cs_parser *parser, uint32_t *id);
> uint32_t (*id_last_get)(struct drm_device *dev);
> /* this ib handling callback are for hidding memory manager drm
> * from memory manager less drm, free have to emit ib discard
> * sequence into the ring */
> int (*ib_get)(struct drm_radeon_cs_parser *parser);
> uint32_t (*ib_get_ptr)(struct drm_device *dev, void *ib);
> void (*ib_free)(struct drm_radeon_cs_parser *parser, int error);
> /* do a relocation either MM or non-MM */
> int (*relocate)(struct drm_radeon_cs_parser *parser,
> uint32_t *reloc, uint64_t *offset);
> };
>
351a392,393
> /* r6xx/r7xx drm blit vertex buffer */
> struct drm_buf *blit_vb;
352a395,398
> /* CS */
> struct drm_radeon_cs_priv cs;
> struct drm_buf *cs_buf;
>
382,385c428,431
< u32 fb_start = dev_priv->fb_location;
< u32 fb_end = fb_start + dev_priv->fb_size - 1;
< u32 gart_start = dev_priv->gart_vm_start;
< u32 gart_end = gart_start + dev_priv->gart_size - 1;
---
> u64 fb_start = dev_priv->fb_location;
> u64 fb_end = fb_start + dev_priv->fb_size - 1;
> u64 gart_start = dev_priv->gart_vm_start;
> u64 gart_end = gart_start + dev_priv->gart_size - 1;
478a525,529
> extern void r600_cp_dispatch_swap(struct drm_device * dev);
> extern int r600_cp_dispatch_texture(struct drm_device * dev,
> struct drm_file *file_priv,
> drm_radeon_texture_t * tex,
> drm_radeon_tex_image_t * image);
479a531,552
> /* r600_blit.c */
> extern int
> r600_prepare_blit_copy(struct drm_device *dev);
> extern void
> r600_done_blit_copy(struct drm_device *dev);
> extern void
> r600_blit_copy(struct drm_device *dev,
> uint64_t src_gpu_addr, uint64_t dst_gpu_addr,
> int size_bytes);
> extern void
> r600_blit_swap(struct drm_device *dev,
> uint64_t src_gpu_addr, uint64_t dst_gpu_addr,
> int sx, int sy, int dx, int dy,
> int w, int h, int src_pitch, int dst_pitch, int cpp);
>
> /* radeon_state.c */
> extern void radeon_cp_discard_buffer(struct drm_device * dev, struct drm_buf * buf);
>
> /* radeon_cs.c */
> extern int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *fpriv);
> extern int r600_cs_init(struct drm_device *dev);
>
1830c1903,1906
< OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
---
> if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) \
> OUT_RING( CP_PACKET0( R600_WAIT_UNTIL, 0 ) ); \
> else \
> OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
1836c1912,1915
< OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
---
> if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) \
> OUT_RING( CP_PACKET0( R600_WAIT_UNTIL, 0 ) ); \
> else \
> OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
1842c1921,1924
< OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
---
> if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) \
> OUT_RING( CP_PACKET0( R600_WAIT_UNTIL, 0 ) ); \
> else \
> OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
1849c1931,1934
< OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
---
> if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) \
> OUT_RING( CP_PACKET0( R600_WAIT_UNTIL, 0 ) ); \
> else \
> OUT_RING( CP_PACKET0( RADEON_WAIT_UNTIL, 0 ) ); \
1963a2049,2050
> #define RADEON_RING_ALIGN 16
>
1968,1971c2055,2059
< _align_nr = (n + 0xf) & ~0xf; \
< if (dev_priv->ring.space <= (_align_nr * sizeof(u32))) { \
< COMMIT_RING(); \
< radeon_wait_ring( dev_priv, _align_nr * sizeof(u32)); \
---
> _align_nr = RADEON_RING_ALIGN - ((dev_priv->ring.tail + n) & (RADEON_RING_ALIGN - 1)); \
> _align_nr += n; \
> if ( dev_priv->ring.space <= (_align_nr) * sizeof(u32) ) { \
> COMMIT_RING(); \
> radeon_wait_ring( dev_priv, (_align_nr) * sizeof(u32) ); \