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
Esse commit está contido em:
Sam Ravnborg
2019-06-23 12:35:39 +02:00
commit 91f85e8feb
4 arquivos alterados com 23 adições e 18 exclusões

Ver arquivo

@@ -1016,7 +1016,7 @@ int mga_getparam(struct drm_device *dev, void *data, struct drm_file *file_priv)
return -EINVAL;
}
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
DRM_DEBUG("pid=%d\n", task_pid_nr(current));
switch (param->param) {
case MGA_PARAM_IRQ_NR:
@@ -1048,7 +1048,7 @@ static int mga_set_fence(struct drm_device *dev, void *data, struct drm_file *fi
return -EINVAL;
}
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
DRM_DEBUG("pid=%d\n", task_pid_nr(current));
/* I would normal do this assignment in the declaration of fence,
* but dev_priv may be NULL.
@@ -1077,7 +1077,7 @@ file_priv)
return -EINVAL;
}
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
DRM_DEBUG("pid=%d\n", task_pid_nr(current));
mga_driver_fence_wait(dev, fence);
return 0;