mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
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>
This commit is contained in:
parent
d97ed33963
commit
e898cd221d
@ -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)
|
||||
{
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user