forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/drm_dp_aux_dev.c
....@@ -27,15 +27,18 @@
2727
2828 #include <linux/device.h>
2929 #include <linux/fs.h>
30
-#include <linux/slab.h>
3130 #include <linux/init.h>
3231 #include <linux/kernel.h>
3332 #include <linux/module.h>
33
+#include <linux/sched/signal.h>
34
+#include <linux/slab.h>
3435 #include <linux/uaccess.h>
3536 #include <linux/uio.h>
36
-#include <drm/drm_dp_helper.h>
37
+
3738 #include <drm/drm_crtc.h>
38
-#include <drm/drmP.h>
39
+#include <drm/drm_dp_helper.h>
40
+#include <drm/drm_dp_mst_helper.h>
41
+#include <drm/drm_print.h>
3942
4043 #include "drm_crtc_helper_internal.h"
4144
....@@ -80,8 +83,7 @@
8083 kref_init(&aux_dev->refcount);
8184
8285 mutex_lock(&aux_idr_mutex);
83
- index = idr_alloc_cyclic(&aux_idr, aux_dev, 0, DRM_AUX_MINORS,
84
- GFP_KERNEL);
86
+ index = idr_alloc(&aux_idr, aux_dev, 0, DRM_AUX_MINORS, GFP_KERNEL);
8587 mutex_unlock(&aux_idr_mutex);
8688 if (index < 0) {
8789 kfree(aux_dev);
....@@ -162,6 +164,7 @@
162164 }
163165
164166 res = drm_dp_dpcd_read(aux_dev->aux, pos, buf, todo);
167
+
165168 if (res <= 0)
166169 break;
167170
....@@ -209,6 +212,7 @@
209212 }
210213
211214 res = drm_dp_dpcd_write(aux_dev->aux, pos, buf, todo);
215
+
212216 if (res <= 0)
213217 break;
214218