forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/savage/savage_state.c
....@@ -22,8 +22,15 @@
2222 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2323 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424 */
25
-#include <drm/drmP.h>
25
+
26
+#include <linux/slab.h>
27
+#include <linux/uaccess.h>
28
+
29
+#include <drm/drm_device.h>
30
+#include <drm/drm_file.h>
31
+#include <drm/drm_print.h>
2632 #include <drm/savage_drm.h>
33
+
2734 #include "savage_drv.h"
2835
2936 void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv,
....@@ -299,6 +306,7 @@
299306 case SAVAGE_PRIM_TRILIST_201:
300307 reorder = 1;
301308 prim = SAVAGE_PRIM_TRILIST;
309
+ fallthrough;
302310 case SAVAGE_PRIM_TRILIST:
303311 if (n % 3 != 0) {
304312 DRM_ERROR("wrong number of vertices %u in TRILIST\n",
....@@ -436,6 +444,7 @@
436444 case SAVAGE_PRIM_TRILIST_201:
437445 reorder = 1;
438446 prim = SAVAGE_PRIM_TRILIST;
447
+ fallthrough;
439448 case SAVAGE_PRIM_TRILIST:
440449 if (n % 3 != 0) {
441450 DRM_ERROR("wrong number of vertices %u in TRILIST\n",
....@@ -557,6 +566,7 @@
557566 case SAVAGE_PRIM_TRILIST_201:
558567 reorder = 1;
559568 prim = SAVAGE_PRIM_TRILIST;
569
+ fallthrough;
560570 case SAVAGE_PRIM_TRILIST:
561571 if (n % 3 != 0) {
562572 DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
....@@ -695,6 +705,7 @@
695705 case SAVAGE_PRIM_TRILIST_201:
696706 reorder = 1;
697707 prim = SAVAGE_PRIM_TRILIST;
708
+ fallthrough;
698709 case SAVAGE_PRIM_TRILIST:
699710 if (n % 3 != 0) {
700711 DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
....@@ -1055,7 +1066,7 @@
10551066 ret = -EINVAL;
10561067 goto done;
10571068 }
1058
- /* fall through */
1069
+ fallthrough;
10591070 case SAVAGE_CMD_DMA_PRIM:
10601071 case SAVAGE_CMD_VB_PRIM:
10611072 if (!first_draw_cmd)