drm/i915: Inline ringbuffer_emit()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 4 Aug 2010 14:18:14 +0000 (15:18 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 9 Aug 2010 18:24:31 +0000 (11:24 -0700)
As the function has been reduced to a store plus increment, the body is
now smaller than the call so inline it.

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

index 7ab72af045ec70ca4baaf09b1eb9032836b12a1a..a5d664e0b176efe75c668fcb8ee7ade62a008c41 100644 (file)
@@ -735,14 +735,6 @@ void intel_ring_begin(struct drm_device *dev,
        ring->space -= n;
 }
 
-void intel_ring_emit(struct drm_device *dev,
-               struct intel_ring_buffer *ring, unsigned int data)
-{
-       unsigned int *virt = ring->virtual_start + ring->tail;
-       *virt = data;
-       ring->tail += 4;
-}
-
 void intel_ring_advance(struct drm_device *dev,
                struct intel_ring_buffer *ring)
 {
index d5568d3766dedf8dba1390127af015618a61768d..9b67eead187e2e1a99f210eddd98990fd22c2326 100644 (file)
@@ -106,8 +106,16 @@ int intel_wrap_ring_buffer(struct drm_device *dev,
                struct intel_ring_buffer *ring);
 void intel_ring_begin(struct drm_device *dev,
                struct intel_ring_buffer *ring, int n);
-void intel_ring_emit(struct drm_device *dev,
-               struct intel_ring_buffer *ring, u32 data);
+
+static inline void intel_ring_emit(struct drm_device *dev,
+                                  struct intel_ring_buffer *ring,
+                                  unsigned int data)
+{
+       unsigned int *virt = ring->virtual_start + ring->tail;
+       *virt = data;
+       ring->tail += 4;
+}
+
 void intel_fill_struct(struct drm_device *dev,
                struct intel_ring_buffer *ring,
                void *data,