diff options
-rw-r--r-- | bsd-core/drmP.h | 4 | ||||
-rw-r--r-- | bsd-core/drm_dma.c | 1 | ||||
-rw-r--r-- | bsd-core/drm_fops.c | 1 | ||||
-rw-r--r-- | bsd-core/drm_irq.c | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h index 73342d09..8a768f0c 100644 --- a/bsd-core/drmP.h +++ b/bsd-core/drmP.h @@ -377,6 +377,7 @@ do { \ } while (0) #if defined(__FreeBSD__) && __FreeBSD_version > 500000 +/* Returns -errno to shared code */ #define DRM_WAIT_ON( ret, queue, timeout, condition ) \ for ( ret = 0 ; !ret && !(condition) ; ) { \ DRM_UNLOCK(); \ @@ -388,11 +389,12 @@ for ( ret = 0 ; !ret && !(condition) ; ) { \ DRM_LOCK(); \ } #else +/* Returns -errno to shared code */ #define DRM_WAIT_ON( ret, queue, timeout, condition ) \ for ( ret = 0 ; !ret && !(condition) ; ) { \ int s = spldrm(); \ if (!(condition)) \ - ret = tsleep( &(queue), PZERO | PCATCH, \ + ret = -tsleep( &(queue), PZERO | PCATCH, \ "drmwtq", (timeout) ); \ splx(s); \ } diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c index fc1e1250..4896cf22 100644 --- a/bsd-core/drm_dma.c +++ b/bsd-core/drm_dma.c @@ -121,6 +121,7 @@ int drm_dma(drm_device_t *dev, void *data, struct drm_file *file_priv) { if (dev->driver.dma_ioctl) { + /* shared code returns -errno */ return -dev->driver.dma_ioctl(dev, data, file_priv); } else { DRM_DEBUG("DMA ioctl on driver with no dma handler\n"); diff --git a/bsd-core/drm_fops.c b/bsd-core/drm_fops.c index 870e4d29..2d037ea5 100644 --- a/bsd-core/drm_fops.c +++ b/bsd-core/drm_fops.c @@ -93,6 +93,7 @@ int drm_open_helper(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p, priv->authenticated = DRM_SUSER(p); if (dev->driver.open) { + /* shared code returns -errno */ retcode = -dev->driver.open(dev, priv); if (retcode != 0) { free(priv, M_DRM); diff --git a/bsd-core/drm_irq.c b/bsd-core/drm_irq.c index 1ab532fe..9c437e9d 100644 --- a/bsd-core/drm_irq.c +++ b/bsd-core/drm_irq.c @@ -241,6 +241,7 @@ int drm_wait_vblank(drm_device_t *dev, void *data, struct drm_file *file_priv) ret = EINVAL; } else { DRM_LOCK(); + /* shared code returns -errno */ ret = -dev->driver.vblank_wait(dev, &vblwait->request.sequence); DRM_UNLOCK(); |