summaryrefslogtreecommitdiff
path: root/linux/mga_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/mga_state.c')
-rw-r--r--linux/mga_state.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/linux/mga_state.c b/linux/mga_state.c
index 4c9c9c05..de5a4309 100644
--- a/linux/mga_state.c
+++ b/linux/mga_state.c
@@ -408,7 +408,7 @@ static int mga_verify_context( drm_mga_private_t *dev_priv )
if ( ctx->dstorg != dev_priv->front_offset &&
ctx->dstorg != dev_priv->back_offset ) {
- DRM_DEBUG( "*** bad DSTORG: %x (front %x, back %x)\n\n",
+ DRM_ERROR( "*** bad DSTORG: %x (front %x, back %x)\n\n",
ctx->dstorg, dev_priv->front_offset,
dev_priv->back_offset );
ctx->dstorg = 0;
@@ -429,7 +429,7 @@ static int mga_verify_tex( drm_mga_private_t *dev_priv, int unit )
org = tex->texorg & (MGA_TEXORGMAP_MASK | MGA_TEXORGACC_MASK);
if ( org == (MGA_TEXORGMAP_SYSMEM | MGA_TEXORGACC_PCI) ) {
- DRM_DEBUG( "*** bad TEXORG: 0x%x, unit %d\n",
+ DRM_ERROR( "*** bad TEXORG: 0x%x, unit %d\n",
tex->texorg, unit );
tex->texorg = 0;
return -EINVAL;
@@ -473,10 +473,13 @@ static int mga_verify_iload( drm_mga_private_t *dev_priv,
if ( dstorg < dev_priv->texture_offset ||
dstorg + length > (dev_priv->texture_offset +
dev_priv->texture_size) ) {
+ DRM_ERROR( "*** bad iload DSTORG: 0x%x\n", dstorg );
return -EINVAL;
}
if ( length & MGA_ILOAD_MASK ) {
+ DRM_ERROR( "*** bad iload length: 0x%x\n",
+ length & MGA_ILOAD_MASK );
return -EINVAL;
}
@@ -488,6 +491,8 @@ static int mga_verify_blit( drm_mga_private_t *dev_priv,
{
if ( (srcorg & 0x3) == (MGA_SRCACC_PCI | MGA_SRCMAP_SYSMEM) ||
(dstorg & 0x3) == (MGA_SRCACC_PCI | MGA_SRCMAP_SYSMEM) ) {
+ DRM_ERROR( "*** bad blit: src=0x%x dst=0x%x\n",
+ srcorg, dstorg );
return -EINVAL;
}
return 0;
@@ -1010,14 +1015,10 @@ int mga_dma_iload( struct inode *inode, struct file *filp,
buf = dma->buflist[iload.idx];
buf_priv = buf->dev_private;
-#if 0
- DRM_INFO( " verifying iload...\n" );
if ( mga_verify_iload( dev_priv, iload.dstorg, iload.length ) ) {
mga_freelist_put( dev, buf );
return -EINVAL;
}
- DRM_INFO( " verifying iload... done.\n" );
-#endif
WRAP_TEST_WITH_RETURN( dev_priv );