summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mga/mga_dma.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2019-06-23 13:35:39 +0300
committerSam Ravnborg <sam@ravnborg.org>2019-06-30 10:48:04 +0300
commit91f85e8feb1b4703d8bad63cda603dacf2a825d4 (patch)
tree50bcf82b1a3841f07295df5c4486e13288550d10 /drivers/gpu/drm/mga/mga_dma.c
parent583bbf46133c726bae277e8f4e32bfba2a528c7f (diff)
downloadlinux-91f85e8feb1b4703d8bad63cda603dacf2a825d4.tar.xz
drm/mga: drop dependency on drm_os_linux.h
Opencode all macros used from the deprecated drm_os_linux.h header file. The DRM_WAIT_ON used 3 * HZ as timeout. This was translated to 3000 msec. The return value of mga_driver_fence_wait() was not used, so make it return void to simplify code a bit. v2: - fixed timeout to 3000 msec (original value was 3 * Hz) - drop unused return value from mga_driver_fence_wait() Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190623103542.30697-2-sam@ravnborg.org
Diffstat (limited to 'drivers/gpu/drm/mga/mga_dma.c')
-rw-r--r--drivers/gpu/drm/mga/mga_dma.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c
index 1ffdafea27e4..c5e7c210999f 100644
--- a/drivers/gpu/drm/mga/mga_dma.c
+++ b/drivers/gpu/drm/mga/mga_dma.c
@@ -35,6 +35,8 @@
* \author Gareth Hughes <gareth@valinux.com>
*/
+#include <linux/delay.h>
+
#include <drm/drmP.h>
#include <drm/mga_drm.h>
#include "mga_drv.h"
@@ -62,7 +64,7 @@ int mga_do_wait_for_idle(drm_mga_private_t *dev_priv)
MGA_WRITE8(MGA_CRTC_INDEX, 0);
return 0;
}
- DRM_UDELAY(1);
+ udelay(1);
}
#if MGA_DMA_DEBUG
@@ -114,7 +116,7 @@ void mga_do_dma_flush(drm_mga_private_t *dev_priv)
status = MGA_READ(MGA_STATUS) & MGA_ENGINE_IDLE_MASK;
if (status == MGA_ENDPRDMASTS)
break;
- DRM_UDELAY(1);
+ udelay(1);
}
if (primary->tail == primary->last_flush) {
@@ -1120,7 +1122,7 @@ int mga_dma_buffers(struct drm_device *dev, void *data,
*/
if (d->send_count != 0) {
DRM_ERROR("Process %d trying to send %d buffers via drmDMA\n",
- DRM_CURRENTPID, d->send_count);
+ task_pid_nr(current), d->send_count);
return -EINVAL;
}
@@ -1128,7 +1130,8 @@ int mga_dma_buffers(struct drm_device *dev, void *data,
*/
if (d->request_count < 0 || d->request_count > dma->buf_count) {
DRM_ERROR("Process %d trying to get %d buffers (of %d max)\n",
- DRM_CURRENTPID, d->request_count, dma->buf_count);
+ task_pid_nr(current), d->request_count,
+ dma->buf_count);
return -EINVAL;
}