diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-15 22:17:19 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-15 22:17:19 +0000 |
commit | 74dc5c8c7e6041d02d2b6246fdb6516e22a1f5a8 (patch) | |
tree | d744f2fbc6582f270e8f4746c5cbab6da56c5e67 | |
parent | 418cf103e765b3ab8a1dcb44023a6097b354b747 (diff) |
destatic and deinline. return type on line before rest of function
declaration.
no binary size change.
-rw-r--r-- | sys/dev/pci/drm/r300_cmdbuf.c | 111 |
1 files changed, 72 insertions, 39 deletions
diff --git a/sys/dev/pci/drm/r300_cmdbuf.c b/sys/dev/pci/drm/r300_cmdbuf.c index f1f49fcf6fa..23de74f4ff6 100644 --- a/sys/dev/pci/drm/r300_cmdbuf.c +++ b/sys/dev/pci/drm/r300_cmdbuf.c @@ -37,6 +37,34 @@ #include "radeon_drv.h" #include "r300_reg.h" +int r300_emit_cliprects(drm_radeon_private_t *, + drm_radeon_kcmd_buffer_t *, int); +int r300_check_range(unsigned, int); +int r300_emit_carefully_checked_packet0(drm_radeon_private_t *, + drm_radeon_kcmd_buffer_t *, drm_r300_cmd_header_t); +int r300_emit_packet0(drm_radeon_private_t *, drm_radeon_kcmd_buffer_t *, + drm_r300_cmd_header_t); +int r300_emit_vpu(drm_radeon_private_t *, drm_radeon_kcmd_buffer_t *, + drm_r300_cmd_header_t); +int r300_emit_clear(drm_radeon_private_t *, drm_radeon_kcmd_buffer_t *); +int r300_emit_3d_load_vbpntr(drm_radeon_private_t *, + drm_radeon_kcmd_buffer_t *, u32); +int r300_emit_bitblt_multi(drm_radeon_private_t *, + drm_radeon_kcmd_buffer_t *); +int r300_emit_draw_indx_2(drm_radeon_private_t *, + drm_radeon_kcmd_buffer_t *); +int r300_emit_raw_packet3(drm_radeon_private_t *, + drm_radeon_kcmd_buffer_t *); +int r300_emit_packet3(drm_radeon_private_t *, drm_radeon_kcmd_buffer_t *, + drm_r300_cmd_header_t); +void r300_pacify(drm_radeon_private_t *); +void r300_discard_buffer(struct drm_device *, struct drm_buf *); +void r300_cmd_wait(drm_radeon_private_t *, drm_r300_cmd_header_t); +int r300_scratch(drm_radeon_private_t *, drm_radeon_kcmd_buffer_t *, + drm_r300_cmd_header_t); +int r300_emit_r500fp(drm_radeon_private_t *, drm_radeon_kcmd_buffer_t *, + drm_r300_cmd_header_t); + #define R300_SIMULTANEOUS_CLIPRECTS 4 /* Values for R300_RE_CLIPRECT_CNTL depending on the number of cliprects @@ -52,8 +80,9 @@ static const int r300_cliprect_cntl[4] = { * Emit up to R300_SIMULTANEOUS_CLIPRECTS cliprects from the given command * buffer, starting with index n. */ -static int r300_emit_cliprects(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf, int n) +int +r300_emit_cliprects(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf, int n) { struct drm_clip_rect box; int nr; @@ -271,7 +300,8 @@ void r300_init_reg_flags(struct drm_device *dev) } } -static __inline__ int r300_check_range(unsigned reg, int count) +int +r300_check_range(unsigned reg, int count) { int i; if (reg & ~0xffff) @@ -282,12 +312,9 @@ static __inline__ int r300_check_range(unsigned reg, int count) return 0; } -static __inline__ int r300_emit_carefully_checked_packet0(drm_radeon_private_t * - dev_priv, - drm_radeon_kcmd_buffer_t - * cmdbuf, - drm_r300_cmd_header_t - header) +int +r300_emit_carefully_checked_packet0(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header) { int reg; int sz; @@ -341,9 +368,9 @@ static __inline__ int r300_emit_carefully_checked_packet0(drm_radeon_private_t * * * Note that checks are performed on contents and addresses of the registers */ -static __inline__ int r300_emit_packet0(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf, - drm_r300_cmd_header_t header) +int +r300_emit_packet0(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header) { int reg; int sz; @@ -388,9 +415,9 @@ static __inline__ int r300_emit_packet0(drm_radeon_private_t *dev_priv, * the graphics card. * Called by r300_do_cp_cmdbuf. */ -static __inline__ int r300_emit_vpu(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf, - drm_r300_cmd_header_t header) +int +r300_emit_vpu(drm_radeon_private_t *dev_priv, drm_radeon_kcmd_buffer_t *cmdbuf, + drm_r300_cmd_header_t header) { int sz; int addr; @@ -438,8 +465,9 @@ static __inline__ int r300_emit_vpu(drm_radeon_private_t *dev_priv, * Emit a clear packet from userspace. * Called by r300_emit_packet3. */ -static __inline__ int r300_emit_clear(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf) +int +r300_emit_clear(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf) { RING_LOCALS; @@ -468,9 +496,9 @@ static __inline__ int r300_emit_clear(drm_radeon_private_t *dev_priv, return 0; } -static __inline__ int r300_emit_3d_load_vbpntr(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf, - u32 header) +int +r300_emit_3d_load_vbpntr(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf, u32 header) { int count, i, k; #define MAX_ARRAY_PACKET 64 @@ -536,8 +564,9 @@ static __inline__ int r300_emit_3d_load_vbpntr(drm_radeon_private_t *dev_priv, return 0; } -static __inline__ int r300_emit_bitblt_multi(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf) +int +r300_emit_bitblt_multi(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf) { u32 *cmd = (u32 *) cmdbuf->buf; int count, ret; @@ -581,8 +610,9 @@ static __inline__ int r300_emit_bitblt_multi(drm_radeon_private_t *dev_priv, return 0; } -static __inline__ int r300_emit_draw_indx_2(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf) +int +r300_emit_draw_indx_2(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf) { u32 *cmd; int count; @@ -656,8 +686,9 @@ static __inline__ int r300_emit_draw_indx_2(drm_radeon_private_t *dev_priv, return 0; } -static __inline__ int r300_emit_raw_packet3(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf) +int +r300_emit_raw_packet3(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf) { u32 header; int count; @@ -736,9 +767,9 @@ static __inline__ int r300_emit_raw_packet3(drm_radeon_private_t *dev_priv, * Emit a rendering packet3 from userspace. * Called by r300_do_cp_cmdbuf. */ -static __inline__ int r300_emit_packet3(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf, - drm_r300_cmd_header_t header) +int +r300_emit_packet3(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header) { int n; int ret; @@ -805,7 +836,8 @@ static __inline__ int r300_emit_packet3(drm_radeon_private_t *dev_priv, /** * Emit the sequence to pacify R300. */ -static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv) +void +r300_pacify(drm_radeon_private_t *dev_priv) { uint32_t cache_z, cache_3d, cache_2d; RING_LOCALS; @@ -861,7 +893,8 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv) * The actual age emit is done by r300_do_cp_cmdbuf, which is why you must * be careful about how this function is called. */ -static void r300_discard_buffer(struct drm_device * dev, struct drm_buf * buf) +void +r300_discard_buffer(struct drm_device * dev, struct drm_buf * buf) { drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_buf_priv_t *buf_priv = buf->dev_private; @@ -871,8 +904,8 @@ static void r300_discard_buffer(struct drm_device * dev, struct drm_buf * buf) buf->used = 0; } -static void r300_cmd_wait(drm_radeon_private_t * dev_priv, - drm_r300_cmd_header_t header) +void +r300_cmd_wait(drm_radeon_private_t * dev_priv, drm_r300_cmd_header_t header) { u32 wait_until; RING_LOCALS; @@ -912,9 +945,9 @@ static void r300_cmd_wait(drm_radeon_private_t * dev_priv, ADVANCE_RING(); } -static int r300_scratch(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf, - drm_r300_cmd_header_t header) +int +r300_scratch(drm_radeon_private_t *dev_priv, drm_radeon_kcmd_buffer_t *cmdbuf, + drm_r300_cmd_header_t header) { u32 *ref_age_base; u32 i, buf_idx, h_pending; @@ -974,9 +1007,9 @@ static int r300_scratch(drm_radeon_private_t *dev_priv, * the graphics card. * Called by r300_do_cp_cmdbuf. */ -static __inline__ int r300_emit_r500fp(drm_radeon_private_t *dev_priv, - drm_radeon_kcmd_buffer_t *cmdbuf, - drm_r300_cmd_header_t header) +int +r300_emit_r500fp(drm_radeon_private_t *dev_priv, + drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header) { int sz; int addr; |