u_int32_t radeondrm_get_scratch(struct drm_radeon_private *dev_priv, u_int32_t off) { if (dev_priv->writeback_works) if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) return radeondrm_read_rptr(dev_priv, R600_SCRATCHOFF(off)); else return radeondrm_read_rptr(dev_priv, RADEON_SCRATCHOFF(off)); else if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) return RADEON_READ(R600_SCRATCH_REG0 + 4 * off); else return RADEON_READ(RADEON_SCRATCH_REG0 + 4 * off); }
u_int32_t radeondrm_get_ring_head(struct drm_radeon_private *dev_priv) { if (dev_priv->writeback_works) return (radeondrm_read_rptr(dev_priv, 0)); else return (RADEON_READ(RADEON_CP_RB_RPTR)); }
u_int32_t radeondrm_get_ring_head(struct drm_radeon_private *dev_priv) { if (dev_priv->writeback_works) { return (radeondrm_read_rptr(dev_priv, 0)); } else { if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) return (RADEON_READ(R600_CP_RB_RPTR)); else return (RADEON_READ(RADEON_CP_RB_RPTR)); } }