summaryrefslogtreecommitdiff
path: root/linux-core/drm_bufs.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2008-08-16 11:45:53 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-08-16 11:45:53 -0700
commitd313108167a793652a5fe4c1015198e0a9deac4c (patch)
tree70702ea339cdcec621a8f7251c673c80a3acb73e /linux-core/drm_bufs.c
parent893315d49ed678de95cf6ac553efb6093cc7343c (diff)
parent2030db75328b7d896a5dd030fc171020b33149e1 (diff)
Merge branch 'modesetting-gem' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-gem
Diffstat (limited to 'linux-core/drm_bufs.c')
-rw-r--r--linux-core/drm_bufs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index e9052570..c966badc 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -1528,6 +1528,7 @@ int drm_mapbufs(struct drm_device *dev, void *data,
dev->buf_use++; /* Can't allocate more after this call */
spin_unlock(&dev->count_lock);
+ DRM_DEBUG("dma buf count %d, req count %d\n", request->count, dma->buf_count);
if (request->count >= dma->buf_count) {
if ((drm_core_has_AGP(dev) && (dma->flags & _DRM_DMA_USE_AGP))
|| (drm_core_check_feature(dev, DRIVER_SG)
@@ -1538,10 +1539,12 @@ int drm_mapbufs(struct drm_device *dev, void *data,
unsigned long token = dev->agp_buffer_token;
if (!map) {
+ DRM_DEBUG("No map\n");
retcode = -EINVAL;
goto done;
}
down_write(&current->mm->mmap_sem);
+ DRM_DEBUG("%x %d\n", token, map->size);
virtual = do_mmap(file_priv->filp, 0, map->size,
PROT_READ | PROT_WRITE,
MAP_SHARED,
@@ -1555,6 +1558,7 @@ int drm_mapbufs(struct drm_device *dev, void *data,
up_write(&current->mm->mmap_sem);
}
if (virtual > -1024UL) {
+ DRM_DEBUG("mmap failed\n");
/* Real error */
retcode = (signed long)virtual;
goto done;