forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/sti/sti_cursor.c
....@@ -6,9 +6,11 @@
66 * for STMicroelectronics.
77 */
88
9
+#include <linux/dma-mapping.h>
910 #include <linux/seq_file.h>
1011
1112 #include <drm/drm_atomic.h>
13
+#include <drm/drm_device.h>
1214 #include <drm/drm_fb_cma_helper.h>
1315 #include <drm/drm_gem_cma_helper.h>
1416
....@@ -45,7 +47,7 @@
4547 void *base;
4648 };
4749
48
-/**
50
+/*
4951 * STI Cursor structure
5052 *
5153 * @sti_plane: sti_plane structure
....@@ -129,17 +131,17 @@
129131 { "cursor", cursor_dbg_show, 0, NULL },
130132 };
131133
132
-static int cursor_debugfs_init(struct sti_cursor *cursor,
133
- struct drm_minor *minor)
134
+static void cursor_debugfs_init(struct sti_cursor *cursor,
135
+ struct drm_minor *minor)
134136 {
135137 unsigned int i;
136138
137139 for (i = 0; i < ARRAY_SIZE(cursor_debugfs_files); i++)
138140 cursor_debugfs_files[i].data = cursor;
139141
140
- return drm_debugfs_create_files(cursor_debugfs_files,
141
- ARRAY_SIZE(cursor_debugfs_files),
142
- minor->debugfs_root, minor);
142
+ drm_debugfs_create_files(cursor_debugfs_files,
143
+ ARRAY_SIZE(cursor_debugfs_files),
144
+ minor->debugfs_root, minor);
143145 }
144146
145147 static void sti_cursor_argb8888_to_clut8(struct sti_cursor *cursor, u32 *src)
....@@ -332,7 +334,6 @@
332334 {
333335 DRM_DEBUG_DRIVER("\n");
334336
335
- drm_plane_helper_disable(drm_plane, NULL);
336337 drm_plane_cleanup(drm_plane);
337338 }
338339
....@@ -341,7 +342,9 @@
341342 struct sti_plane *plane = to_sti_plane(drm_plane);
342343 struct sti_cursor *cursor = to_sti_cursor(plane);
343344
344
- return cursor_debugfs_init(cursor, drm_plane->dev->primary);
345
+ cursor_debugfs_init(cursor, drm_plane->dev->primary);
346
+
347
+ return 0;
345348 }
346349
347350 static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = {