aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-04 10:18:14 -0400
committerEric Anholt <eric@anholt.net>2010-08-09 14:24:31 -0400
commite898cd221db65273bfc102fa20e4e228e0b8c7e1 (patch)
tree6b52e7221bae61610f3f6d4103e182edc3c6b1a3 /drivers
parentd97ed3396399126cfca1e12e2b2e2d8bbc4924e5 (diff)
drm/i915: Inline ringbuffer_emit()
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c8
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h12
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 7ab72af045ec..a5d664e0b176 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -735,14 +735,6 @@ void intel_ring_begin(struct drm_device *dev,
735 ring->space -= n; 735 ring->space -= n;
736} 736}
737 737
738void intel_ring_emit(struct drm_device *dev,
739 struct intel_ring_buffer *ring, unsigned int data)
740{
741 unsigned int *virt = ring->virtual_start + ring->tail;
742 *virt = data;
743 ring->tail += 4;
744}
745
746void intel_ring_advance(struct drm_device *dev, 738void intel_ring_advance(struct drm_device *dev,
747 struct intel_ring_buffer *ring) 739 struct intel_ring_buffer *ring)
748{ 740{
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index d5568d3766de..9b67eead187e 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -106,8 +106,16 @@ int intel_wrap_ring_buffer(struct drm_device *dev,
106 struct intel_ring_buffer *ring); 106 struct intel_ring_buffer *ring);
107void intel_ring_begin(struct drm_device *dev, 107void intel_ring_begin(struct drm_device *dev,
108 struct intel_ring_buffer *ring, int n); 108 struct intel_ring_buffer *ring, int n);
109void intel_ring_emit(struct drm_device *dev, 109
110 struct intel_ring_buffer *ring, u32 data); 110static inline void intel_ring_emit(struct drm_device *dev,
111 struct intel_ring_buffer *ring,
112 unsigned int data)
113{
114 unsigned int *virt = ring->virtual_start + ring->tail;
115 *virt = data;
116 ring->tail += 4;
117}
118
111void intel_fill_struct(struct drm_device *dev, 119void intel_fill_struct(struct drm_device *dev,
112 struct intel_ring_buffer *ring, 120 struct intel_ring_buffer *ring,
113 void *data, 121 void *data,