forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/mga/mga_dma.c
....@@ -35,8 +35,8 @@
3535 * \author Gareth Hughes <gareth@valinux.com>
3636 */
3737
38
-#include <drm/drmP.h>
39
-#include <drm/mga_drm.h>
38
+#include <linux/delay.h>
39
+
4040 #include "mga_drv.h"
4141
4242 #define MGA_DEFAULT_USEC_TIMEOUT 10000
....@@ -62,7 +62,7 @@
6262 MGA_WRITE8(MGA_CRTC_INDEX, 0);
6363 return 0;
6464 }
65
- DRM_UDELAY(1);
65
+ udelay(1);
6666 }
6767
6868 #if MGA_DMA_DEBUG
....@@ -114,7 +114,7 @@
114114 status = MGA_READ(MGA_STATUS) & MGA_ENGINE_IDLE_MASK;
115115 if (status == MGA_ENDPRDMASTS)
116116 break;
117
- DRM_UDELAY(1);
117
+ udelay(1);
118118 }
119119
120120 if (primary->tail == primary->last_flush) {
....@@ -1120,7 +1120,7 @@
11201120 */
11211121 if (d->send_count != 0) {
11221122 DRM_ERROR("Process %d trying to send %d buffers via drmDMA\n",
1123
- DRM_CURRENTPID, d->send_count);
1123
+ task_pid_nr(current), d->send_count);
11241124 return -EINVAL;
11251125 }
11261126
....@@ -1128,7 +1128,8 @@
11281128 */
11291129 if (d->request_count < 0 || d->request_count > dma->buf_count) {
11301130 DRM_ERROR("Process %d trying to get %d buffers (of %d max)\n",
1131
- DRM_CURRENTPID, d->request_count, dma->buf_count);
1131
+ task_pid_nr(current), d->request_count,
1132
+ dma->buf_count);
11321133 return -EINVAL;
11331134 }
11341135