Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
intel_ringbuffer.h File Reference

Go to the source code of this file.

Data Structures

struct  intel_hw_status_page
 
struct  intel_ring_buffer
 

Macros

#define I915_READ_TAIL(ring)   I915_READ(RING_TAIL((ring)->mmio_base))
 
#define I915_WRITE_TAIL(ring, val)   I915_WRITE(RING_TAIL((ring)->mmio_base), val)
 
#define I915_READ_START(ring)   I915_READ(RING_START((ring)->mmio_base))
 
#define I915_WRITE_START(ring, val)   I915_WRITE(RING_START((ring)->mmio_base), val)
 
#define I915_READ_HEAD(ring)   I915_READ(RING_HEAD((ring)->mmio_base))
 
#define I915_WRITE_HEAD(ring, val)   I915_WRITE(RING_HEAD((ring)->mmio_base), val)
 
#define I915_READ_CTL(ring)   I915_READ(RING_CTL((ring)->mmio_base))
 
#define I915_WRITE_CTL(ring, val)   I915_WRITE(RING_CTL((ring)->mmio_base), val)
 
#define I915_READ_IMR(ring)   I915_READ(RING_IMR((ring)->mmio_base))
 
#define I915_WRITE_IMR(ring, val)   I915_WRITE(RING_IMR((ring)->mmio_base), val)
 
#define I915_READ_NOPID(ring)   I915_READ(RING_NOPID((ring)->mmio_base))
 
#define I915_READ_SYNC_0(ring)   I915_READ(RING_SYNC_0((ring)->mmio_base))
 
#define I915_READ_SYNC_1(ring)   I915_READ(RING_SYNC_1((ring)->mmio_base))
 
#define I915_NUM_RINGS   3
 
#define I915_GEM_HWS_INDEX   0x20
 

Functions

void intel_cleanup_ring_buffer (struct intel_ring_buffer *ring)
 
int __must_check intel_wait_ring_buffer (struct intel_ring_buffer *ring, int n)
 
int __must_check intel_ring_begin (struct intel_ring_buffer *ring, int n)
 
void intel_ring_advance (struct intel_ring_buffer *ring)
 
u32 intel_ring_get_seqno (struct intel_ring_buffer *ring)
 
int intel_ring_flush_all_caches (struct intel_ring_buffer *ring)
 
int intel_ring_invalidate_all_caches (struct intel_ring_buffer *ring)
 
int intel_init_render_ring_buffer (struct drm_device *dev)
 
int intel_init_bsd_ring_buffer (struct drm_device *dev)
 
int intel_init_blt_ring_buffer (struct drm_device *dev)
 
u32 intel_ring_get_active_head (struct intel_ring_buffer *ring)
 
void intel_ring_setup_status_page (struct intel_ring_buffer *ring)
 
int intel_render_ring_init_dri (struct drm_device *dev, u64 start, u32 size)
 

Macro Definition Documentation

#define I915_GEM_HWS_INDEX   0x20

Reads a dword out of the status page, which is written to from the command queue by automatic updates, MI_REPORT_HEAD, MI_STORE_DATA_INDEX, or MI_STORE_DATA_IMM.

The following dwords have a reserved meaning: 0x00: ISR copy, updated when an ISR bit not set in the HWSTAM changes. 0x04: ring 0 head pointer 0x05: ring 1 head pointer (915-class) 0x06: ring 2 head pointer (915-class) 0x10-0x1b: Context status DWords (GM45) 0x1f: Last written status offset. (GM45)

The area from dword 0x20 to 0x3ff is available for driver usage.

Definition at line 183 of file intel_ringbuffer.h.

#define I915_NUM_RINGS   3

Definition at line 36 of file intel_ringbuffer.h.

#define I915_READ_CTL (   ring)    I915_READ(RING_CTL((ring)->mmio_base))

Definition at line 19 of file intel_ringbuffer.h.

#define I915_READ_HEAD (   ring)    I915_READ(RING_HEAD((ring)->mmio_base))

Definition at line 16 of file intel_ringbuffer.h.

#define I915_READ_IMR (   ring)    I915_READ(RING_IMR((ring)->mmio_base))

Definition at line 22 of file intel_ringbuffer.h.

#define I915_READ_NOPID (   ring)    I915_READ(RING_NOPID((ring)->mmio_base))

Definition at line 25 of file intel_ringbuffer.h.

#define I915_READ_START (   ring)    I915_READ(RING_START((ring)->mmio_base))

Definition at line 13 of file intel_ringbuffer.h.

#define I915_READ_SYNC_0 (   ring)    I915_READ(RING_SYNC_0((ring)->mmio_base))

Definition at line 26 of file intel_ringbuffer.h.

#define I915_READ_SYNC_1 (   ring)    I915_READ(RING_SYNC_1((ring)->mmio_base))

Definition at line 27 of file intel_ringbuffer.h.

#define I915_READ_TAIL (   ring)    I915_READ(RING_TAIL((ring)->mmio_base))

Definition at line 10 of file intel_ringbuffer.h.

#define I915_WRITE_CTL (   ring,
  val 
)    I915_WRITE(RING_CTL((ring)->mmio_base), val)

Definition at line 20 of file intel_ringbuffer.h.

#define I915_WRITE_HEAD (   ring,
  val 
)    I915_WRITE(RING_HEAD((ring)->mmio_base), val)

Definition at line 17 of file intel_ringbuffer.h.

#define I915_WRITE_IMR (   ring,
  val 
)    I915_WRITE(RING_IMR((ring)->mmio_base), val)

Definition at line 23 of file intel_ringbuffer.h.

#define I915_WRITE_START (   ring,
  val 
)    I915_WRITE(RING_START((ring)->mmio_base), val)

Definition at line 14 of file intel_ringbuffer.h.

#define I915_WRITE_TAIL (   ring,
  val 
)    I915_WRITE(RING_TAIL((ring)->mmio_base), val)

Definition at line 11 of file intel_ringbuffer.h.

Function Documentation

void intel_cleanup_ring_buffer ( struct intel_ring_buffer ring)

Definition at line 1150 of file intel_ringbuffer.c.

int intel_init_blt_ring_buffer ( struct drm_device dev)

Definition at line 1625 of file intel_ringbuffer.c.

int intel_init_bsd_ring_buffer ( struct drm_device dev)

Definition at line 1576 of file intel_ringbuffer.c.

int intel_init_render_ring_buffer ( struct drm_device dev)

Definition at line 1445 of file intel_ringbuffer.c.

int intel_render_ring_init_dri ( struct drm_device dev,
u64  start,
u32  size 
)

Definition at line 1513 of file intel_ringbuffer.c.

void intel_ring_advance ( struct intel_ring_buffer ring)

Definition at line 1339 of file intel_ringbuffer.c.

int __must_check intel_ring_begin ( struct intel_ring_buffer ring,
int  n 
)

Definition at line 1312 of file intel_ringbuffer.c.

int intel_ring_flush_all_caches ( struct intel_ring_buffer ring)

Definition at line 1654 of file intel_ringbuffer.c.

u32 intel_ring_get_active_head ( struct intel_ring_buffer ring)

Definition at line 348 of file intel_ringbuffer.c.

u32 intel_ring_get_seqno ( struct intel_ring_buffer ring)
int intel_ring_invalidate_all_caches ( struct intel_ring_buffer ring)

Definition at line 1672 of file intel_ringbuffer.c.

void intel_ring_setup_status_page ( struct intel_ring_buffer ring)

Definition at line 842 of file intel_ringbuffer.c.

int __must_check intel_wait_ring_buffer ( struct intel_ring_buffer ring,
int  n 
)

Definition at line 1269 of file intel_ringbuffer.c.