summaryrefslogtreecommitdiff
path: root/shared-core/via_verifier.c
diff options
context:
space:
mode:
authorThomas Hellstrom <unichrome@shipmail.org>2005-01-27 22:48:47 +0000
committerThomas Hellstrom <unichrome@shipmail.org>2005-01-27 22:48:47 +0000
commitcd9ef39c769202f161619ee7a95674371c57cd48 (patch)
tree85e034ddc5c57fc72f7cb4f97b453c89e942fea8 /shared-core/via_verifier.c
parent77045dc51672715115f179c099dfb8d7b4d304d4 (diff)
Fixed multiple devices DMA bug. Fixed PCI path FIRE command detection
Diffstat (limited to 'shared-core/via_verifier.c')
-rw-r--r--shared-core/via_verifier.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared-core/via_verifier.c b/shared-core/via_verifier.c
index ad32141e..6b08f5d8 100644
--- a/shared-core/via_verifier.c
+++ b/shared-core/via_verifier.c
@@ -496,6 +496,7 @@ static __inline__ int
via_check_prim_list(uint32_t const **buffer, const uint32_t *buf_end,
drm_via_state_t *cur_seq)
{
+ drm_via_private_t *dev_priv = (drm_via_private_t *) cur_seq->dev->dev_private;
uint32_t a_fire, bcmd , dw_count;
int ret = 0;
int have_fire;
@@ -540,6 +541,12 @@ via_check_prim_list(uint32_t const **buffer, const uint32_t *buf_end,
while(buf < buf_end) {
if (*buf == a_fire) {
+ if (dev_priv->num_fire_offsets >= VIA_FIRE_BUF_SIZE) {
+ DRM_ERROR("Fire offset buffer full.\n");
+ ret = 1;
+ break;
+ }
+ dev_priv->fire_offsets[dev_priv->num_fire_offsets++] = buf;
have_fire = 1;
buf++;
if (buf < buf_end && *buf == a_fire)
@@ -827,6 +834,7 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size, drm_device_t
hc_state->map_cache = NULL;
hc_state->agp = agp;
hc_state->buf_start = buf;
+ dev_priv->num_fire_offsets = 0;
while (buf < buf_end) {