I915_WRITE_TAIL(ring, ring->tail);
}
-static unsigned int render_ring_get_active_head(struct drm_device *dev,
- struct intel_ring_buffer *ring)
+u32 intel_ring_get_active_head(struct drm_device *dev,
+ struct intel_ring_buffer *ring)
{
drm_i915_private_t *dev_priv = dev->dev_private;
u32 acthd_reg = INTEL_INFO(dev)->gen >= 4 ?
intel_ring_advance(dev, ring);
}
-static unsigned int bsd_ring_get_active_head(struct drm_device *dev,
- struct intel_ring_buffer *ring)
-{
- drm_i915_private_t *dev_priv = dev->dev_private;
- return I915_READ(RING_ACTHD(ring->mmio_base));
-}
-
static int init_bsd_ring(struct drm_device *dev,
struct intel_ring_buffer *ring)
{
.setup_status_page = render_setup_status_page,
.init = init_render_ring,
.set_tail = ring_set_tail,
- .get_active_head = render_ring_get_active_head,
.flush = render_ring_flush,
.add_request = render_ring_add_request,
.get_seqno = render_ring_get_seqno,
.setup_status_page = bsd_setup_status_page,
.init = init_bsd_ring,
.set_tail = ring_set_tail,
- .get_active_head = bsd_ring_get_active_head,
.flush = bsd_ring_flush,
.add_request = bsd_ring_add_request,
.get_seqno = bsd_ring_get_seqno,
GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_ENABLE);
}
-static unsigned int gen6_bsd_ring_get_active_head(struct drm_device *dev,
- struct intel_ring_buffer *ring)
-{
- drm_i915_private_t *dev_priv = dev->dev_private;
- return I915_READ(RING_ACTHD(ring->mmio_base));
-}
-
static void gen6_bsd_ring_flush(struct drm_device *dev,
struct intel_ring_buffer *ring,
u32 invalidate_domains,
.setup_status_page = gen6_bsd_setup_status_page,
.init = init_bsd_ring,
.set_tail = gen6_bsd_ring_set_tail,
- .get_active_head = gen6_bsd_ring_get_active_head,
.flush = gen6_bsd_ring_flush,
.add_request = bsd_ring_add_request,
.get_seqno = bsd_ring_get_seqno,
void (*set_tail)(struct drm_device *dev,
struct intel_ring_buffer *ring,
u32 value);
- unsigned int (*get_active_head)(struct drm_device *dev,
- struct intel_ring_buffer *ring);
void (*flush)(struct drm_device *dev,
struct intel_ring_buffer *ring,
u32 invalidate_domains,
int intel_init_render_ring_buffer(struct drm_device *dev);
int intel_init_bsd_ring_buffer(struct drm_device *dev);
+u32 intel_ring_get_active_head(struct drm_device *dev,
+ struct intel_ring_buffer *ring);
+
#endif /* _INTEL_RINGBUFFER_H_ */