forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/sti/sti_gdp.c
....@@ -5,10 +5,14 @@
55 * Fabien Dessenne <fabien.dessenne@st.com>
66 * for STMicroelectronics.
77 */
8
+
9
+#include <linux/dma-mapping.h>
810 #include <linux/seq_file.h>
911
1012 #include <drm/drm_atomic.h>
13
+#include <drm/drm_device.h>
1114 #include <drm/drm_fb_cma_helper.h>
15
+#include <drm/drm_fourcc.h>
1216 #include <drm/drm_gem_cma_helper.h>
1317
1418 #include "sti_compositor.h"
....@@ -99,7 +103,7 @@
99103 dma_addr_t btm_field_paddr;
100104 };
101105
102
-/**
106
+/*
103107 * STI GDP structure
104108 *
105109 * @sti_plane: sti_plane structure
....@@ -339,9 +343,10 @@
339343 for (i = 0; i < nb_files; i++)
340344 gdp_debugfs_files[i].data = gdp;
341345
342
- return drm_debugfs_create_files(gdp_debugfs_files,
343
- nb_files,
344
- minor->debugfs_root, minor);
346
+ drm_debugfs_create_files(gdp_debugfs_files,
347
+ nb_files,
348
+ minor->debugfs_root, minor);
349
+ return 0;
345350 }
346351
347352 static int sti_gdp_fourcc2format(int fourcc)
....@@ -517,7 +522,7 @@
517522 /* Allocate all the nodes within a single memory page */
518523 size = sizeof(struct sti_gdp_node) *
519524 GDP_NODE_PER_FIELD * GDP_NODE_NB_BANK;
520
- base = dma_alloc_wc(gdp->dev, size, &dma_addr, GFP_KERNEL | GFP_DMA);
525
+ base = dma_alloc_wc(gdp->dev, size, &dma_addr, GFP_KERNEL);
521526
522527 if (!base) {
523528 DRM_ERROR("Failed to allocate memory for GDP node\n");
....@@ -883,7 +888,6 @@
883888 {
884889 DRM_DEBUG_DRIVER("\n");
885890
886
- drm_plane_helper_disable(drm_plane, NULL);
887891 drm_plane_cleanup(drm_plane);
888892 }
889893