forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
34 *
....@@ -6,10 +7,6 @@
67 *
78 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
89 * http://www.samsung.com/
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation.
1310 */
1411
1512 #undef DEBUG
....@@ -53,7 +50,7 @@
5350 return 0;
5451 }
5552
56
-/* Release temproary buffers for decoding */
53
+/* Release temporary buffers for decoding */
5754 static void s5p_mfc_release_dec_desc_buffer_v6(struct s5p_mfc_ctx *ctx)
5855 {
5956 /* NOP */
....@@ -736,10 +733,10 @@
736733 /* multi-slice control */
737734 /* multi-slice MB number or bit size */
738735 writel(ctx->slice_mode, mfc_regs->e_mslice_mode);
739
- if (ctx->slice_mode == V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB) {
736
+ if (ctx->slice_mode == V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB) {
740737 writel(ctx->slice_size.mb, mfc_regs->e_mslice_size_mb);
741738 } else if (ctx->slice_mode ==
742
- V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES) {
739
+ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES) {
743740 writel(ctx->slice_size.bits, mfc_regs->e_mslice_size_bits);
744741 } else {
745742 writel(0x0, mfc_regs->e_mslice_size_mb);
....@@ -779,11 +776,11 @@
779776 /* multi-slice MB number or bit size */
780777 ctx->slice_mode = p->slice_mode;
781778 reg = 0;
782
- if (p->slice_mode == V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB) {
779
+ if (p->slice_mode == V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB) {
783780 reg |= (0x1 << 3);
784781 writel(reg, mfc_regs->e_enc_options);
785782 ctx->slice_size.mb = p->slice_mb;
786
- } else if (p->slice_mode == V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES) {
783
+ } else if (p->slice_mode == V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES) {
787784 reg |= (0x1 << 3);
788785 writel(reg, mfc_regs->e_enc_options);
789786 ctx->slice_size.bits = p->slice_bit;
....@@ -843,7 +840,7 @@
843840 if (p->pad) {
844841 reg = 0;
845842 /** enable */
846
- reg |= (1 << 31);
843
+ reg |= (1UL << 31);
847844 /** cr value */
848845 reg |= ((p->pad_cr & 0xFF) << 16);
849846 /** cb value */
....@@ -1928,7 +1925,7 @@
19281925
19291926 if (ctx->capture_state != QUEUE_BUFS_MMAPED) {
19301927 mfc_err("It seems that not all destination buffers were\n"
1931
- "mmaped.MFC requires that all destination are mmaped\n"
1928
+ "mmapped.MFC requires that all destination are mmapped\n"
19321929 "before starting processing.\n");
19331930 return -EAGAIN;
19341931 }