]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
drm/i915/ringbuffer: Implement advance using set_tail
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 19 Sep 2010 13:36:46 +0000 (14:36 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 21 Sep 2010 10:19:57 +0000 (11:19 +0100)
As noted by Zhenyu, we can now simply replace the existing advance hook
by calling the new set_tail function pointer directly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h

index 7debb1972eb2c82630f48d3f2347a6f8986d04ec..3f80f18e28445089715bcc72c326e760a97cba4a 100644 (file)
@@ -147,12 +147,6 @@ static unsigned int render_ring_get_active_head(struct drm_device *dev,
        return I915_READ(acthd_reg);
 }
 
-static void render_ring_advance_ring(struct drm_device *dev,
-               struct intel_ring_buffer *ring)
-{
-       render_ring_set_tail(dev, ring->tail);
-}
-
 static int init_ring_common(struct drm_device *dev,
                struct intel_ring_buffer *ring)
 {
@@ -418,12 +412,6 @@ static inline unsigned int bsd_ring_get_active_head(struct drm_device *dev,
        return I915_READ(BSD_RING_ACTHD);
 }
 
-static inline void bsd_ring_advance_ring(struct drm_device *dev,
-               struct intel_ring_buffer *ring)
-{
-       bsd_ring_set_tail(dev, ring->tail);
-}
-
 static int init_bsd_ring(struct drm_device *dev,
                struct intel_ring_buffer *ring)
 {
@@ -785,7 +773,7 @@ void intel_ring_advance(struct drm_device *dev,
                struct intel_ring_buffer *ring)
 {
        ring->tail &= ring->size - 1;
-       ring->advance_ring(dev, ring);
+       ring->set_tail(dev, ring->tail);
 }
 
 void intel_fill_struct(struct drm_device *dev,
@@ -829,7 +817,6 @@ static struct intel_ring_buffer render_ring = {
        .get_tail               = render_ring_get_tail,
        .set_tail               = render_ring_set_tail,
        .get_active_head        = render_ring_get_active_head,
-       .advance_ring           = render_ring_advance_ring,
        .flush                  = render_ring_flush,
        .add_request            = render_ring_add_request,
        .get_gem_seqno          = render_ring_get_gem_seqno,
@@ -868,7 +855,6 @@ static struct intel_ring_buffer bsd_ring = {
        .get_tail               = bsd_ring_get_tail,
        .set_tail               = bsd_ring_set_tail,
        .get_active_head        = bsd_ring_get_active_head,
-       .advance_ring           = bsd_ring_advance_ring,
        .flush                  = bsd_ring_flush,
        .add_request            = bsd_ring_add_request,
        .get_gem_seqno          = bsd_ring_get_gem_seqno,
index 7bd571c796aefb04f27def7168a2dd0224456d4a..be1fd9b370880c3491339013ae21cdc3c5220feb 100644 (file)
@@ -52,8 +52,6 @@ struct  intel_ring_buffer {
                        u32 value);
        unsigned int    (*get_active_head)(struct drm_device *dev,
                        struct intel_ring_buffer *ring);
-       void            (*advance_ring)(struct drm_device *dev,
-                       struct intel_ring_buffer *ring);
        void            (*flush)(struct drm_device *dev,
                        struct intel_ring_buffer *ring,
                        u32     invalidate_domains,