hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
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 */
....@@ -1063,7 +1060,7 @@
10631060 }
10641061
10651062 /* aspect ratio VUI */
1066
- readl(mfc_regs->e_h264_options);
1063
+ reg = readl(mfc_regs->e_h264_options);
10671064 reg &= ~(0x1 << 5);
10681065 reg |= ((p_h264->vui_sar & 0x1) << 5);
10691066 writel(reg, mfc_regs->e_h264_options);
....@@ -1086,7 +1083,7 @@
10861083
10871084 /* intra picture period for H.264 open GOP */
10881085 /* control */
1089
- readl(mfc_regs->e_h264_options);
1086
+ reg = readl(mfc_regs->e_h264_options);
10901087 reg &= ~(0x1 << 4);
10911088 reg |= ((p_h264->open_gop & 0x1) << 4);
10921089 writel(reg, mfc_regs->e_h264_options);
....@@ -1100,23 +1097,23 @@
11001097 }
11011098
11021099 /* 'WEIGHTED_BI_PREDICTION' for B is disable */
1103
- readl(mfc_regs->e_h264_options);
1100
+ reg = readl(mfc_regs->e_h264_options);
11041101 reg &= ~(0x3 << 9);
11051102 writel(reg, mfc_regs->e_h264_options);
11061103
11071104 /* 'CONSTRAINED_INTRA_PRED_ENABLE' is disable */
1108
- readl(mfc_regs->e_h264_options);
1105
+ reg = readl(mfc_regs->e_h264_options);
11091106 reg &= ~(0x1 << 14);
11101107 writel(reg, mfc_regs->e_h264_options);
11111108
11121109 /* ASO */
1113
- readl(mfc_regs->e_h264_options);
1110
+ reg = readl(mfc_regs->e_h264_options);
11141111 reg &= ~(0x1 << 6);
11151112 reg |= ((p_h264->aso & 0x1) << 6);
11161113 writel(reg, mfc_regs->e_h264_options);
11171114
11181115 /* hier qp enable */
1119
- readl(mfc_regs->e_h264_options);
1116
+ reg = readl(mfc_regs->e_h264_options);
11201117 reg &= ~(0x1 << 8);
11211118 reg |= ((p_h264->open_gop & 0x1) << 8);
11221119 writel(reg, mfc_regs->e_h264_options);
....@@ -1137,7 +1134,7 @@
11371134 writel(reg, mfc_regs->e_h264_num_t_layer);
11381135
11391136 /* frame packing SEI generation */
1140
- readl(mfc_regs->e_h264_options);
1137
+ reg = readl(mfc_regs->e_h264_options);
11411138 reg &= ~(0x1 << 25);
11421139 reg |= ((p_h264->sei_frame_packing & 0x1) << 25);
11431140 writel(reg, mfc_regs->e_h264_options);
....@@ -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 }