diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-02 05:50:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-18 16:25:30 -0400 |
commit | 3c75a2e1cfcabe01e5914a92e949188720918933 (patch) | |
tree | d43f492a09d363bace6f78b50229da157daf83b9 /drivers/media/platform/s5p-mfc | |
parent | b9571a577b570b24c4fa2ed79dade612294584d3 (diff) |
[media] s5p-mfc: Staticize symbols in s5p_mfc_opr_v5.c
Some symbols are used only in this file. Make them static.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 103 |
1 files changed, 52 insertions, 51 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c index f61dba837899..c7ad329ca889 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define OFFSETB(x) (((x) - dev->bank2) >> MFC_OFFSET_SHIFT) | 34 | #define OFFSETB(x) (((x) - dev->bank2) >> MFC_OFFSET_SHIFT) |
35 | 35 | ||
36 | /* Allocate temporary buffers for decoding */ | 36 | /* Allocate temporary buffers for decoding */ |
37 | int s5p_mfc_alloc_dec_temp_buffers_v5(struct s5p_mfc_ctx *ctx) | 37 | static int s5p_mfc_alloc_dec_temp_buffers_v5(struct s5p_mfc_ctx *ctx) |
38 | { | 38 | { |
39 | struct s5p_mfc_dev *dev = ctx->dev; | 39 | struct s5p_mfc_dev *dev = ctx->dev; |
40 | struct s5p_mfc_buf_size_v5 *buf_size = dev->variant->buf_size->priv; | 40 | struct s5p_mfc_buf_size_v5 *buf_size = dev->variant->buf_size->priv; |
@@ -55,13 +55,13 @@ int s5p_mfc_alloc_dec_temp_buffers_v5(struct s5p_mfc_ctx *ctx) | |||
55 | 55 | ||
56 | 56 | ||
57 | /* Release temporary buffers for decoding */ | 57 | /* Release temporary buffers for decoding */ |
58 | void s5p_mfc_release_dec_desc_buffer_v5(struct s5p_mfc_ctx *ctx) | 58 | static void s5p_mfc_release_dec_desc_buffer_v5(struct s5p_mfc_ctx *ctx) |
59 | { | 59 | { |
60 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->dsc); | 60 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->dsc); |
61 | } | 61 | } |
62 | 62 | ||
63 | /* Allocate codec buffers */ | 63 | /* Allocate codec buffers */ |
64 | int s5p_mfc_alloc_codec_buffers_v5(struct s5p_mfc_ctx *ctx) | 64 | static int s5p_mfc_alloc_codec_buffers_v5(struct s5p_mfc_ctx *ctx) |
65 | { | 65 | { |
66 | struct s5p_mfc_dev *dev = ctx->dev; | 66 | struct s5p_mfc_dev *dev = ctx->dev; |
67 | unsigned int enc_ref_y_size = 0; | 67 | unsigned int enc_ref_y_size = 0; |
@@ -193,14 +193,14 @@ int s5p_mfc_alloc_codec_buffers_v5(struct s5p_mfc_ctx *ctx) | |||
193 | } | 193 | } |
194 | 194 | ||
195 | /* Release buffers allocated for codec */ | 195 | /* Release buffers allocated for codec */ |
196 | void s5p_mfc_release_codec_buffers_v5(struct s5p_mfc_ctx *ctx) | 196 | static void s5p_mfc_release_codec_buffers_v5(struct s5p_mfc_ctx *ctx) |
197 | { | 197 | { |
198 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->bank1); | 198 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->bank1); |
199 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_r, &ctx->bank2); | 199 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_r, &ctx->bank2); |
200 | } | 200 | } |
201 | 201 | ||
202 | /* Allocate memory for instance data buffer */ | 202 | /* Allocate memory for instance data buffer */ |
203 | int s5p_mfc_alloc_instance_buffer_v5(struct s5p_mfc_ctx *ctx) | 203 | static int s5p_mfc_alloc_instance_buffer_v5(struct s5p_mfc_ctx *ctx) |
204 | { | 204 | { |
205 | struct s5p_mfc_dev *dev = ctx->dev; | 205 | struct s5p_mfc_dev *dev = ctx->dev; |
206 | struct s5p_mfc_buf_size_v5 *buf_size = dev->variant->buf_size->priv; | 206 | struct s5p_mfc_buf_size_v5 *buf_size = dev->variant->buf_size->priv; |
@@ -241,20 +241,20 @@ int s5p_mfc_alloc_instance_buffer_v5(struct s5p_mfc_ctx *ctx) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | /* Release instance buffer */ | 243 | /* Release instance buffer */ |
244 | void s5p_mfc_release_instance_buffer_v5(struct s5p_mfc_ctx *ctx) | 244 | static void s5p_mfc_release_instance_buffer_v5(struct s5p_mfc_ctx *ctx) |
245 | { | 245 | { |
246 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->ctx); | 246 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->ctx); |
247 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->shm); | 247 | s5p_mfc_release_priv_buf(ctx->dev->mem_dev_l, &ctx->shm); |
248 | } | 248 | } |
249 | 249 | ||
250 | int s5p_mfc_alloc_dev_context_buffer_v5(struct s5p_mfc_dev *dev) | 250 | static int s5p_mfc_alloc_dev_context_buffer_v5(struct s5p_mfc_dev *dev) |
251 | { | 251 | { |
252 | /* NOP */ | 252 | /* NOP */ |
253 | 253 | ||
254 | return 0; | 254 | return 0; |
255 | } | 255 | } |
256 | 256 | ||
257 | void s5p_mfc_release_dev_context_buffer_v5(struct s5p_mfc_dev *dev) | 257 | static void s5p_mfc_release_dev_context_buffer_v5(struct s5p_mfc_dev *dev) |
258 | { | 258 | { |
259 | /* NOP */ | 259 | /* NOP */ |
260 | } | 260 | } |
@@ -273,7 +273,7 @@ static unsigned int s5p_mfc_read_info_v5(struct s5p_mfc_ctx *ctx, | |||
273 | return readl(ctx->shm.virt + ofs); | 273 | return readl(ctx->shm.virt + ofs); |
274 | } | 274 | } |
275 | 275 | ||
276 | void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx) | 276 | static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx) |
277 | { | 277 | { |
278 | unsigned int guard_width, guard_height; | 278 | unsigned int guard_width, guard_height; |
279 | 279 | ||
@@ -315,7 +315,7 @@ void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx) | |||
315 | } | 315 | } |
316 | } | 316 | } |
317 | 317 | ||
318 | void s5p_mfc_enc_calc_src_size_v5(struct s5p_mfc_ctx *ctx) | 318 | static void s5p_mfc_enc_calc_src_size_v5(struct s5p_mfc_ctx *ctx) |
319 | { | 319 | { |
320 | if (ctx->src_fmt->fourcc == V4L2_PIX_FMT_NV12M) { | 320 | if (ctx->src_fmt->fourcc == V4L2_PIX_FMT_NV12M) { |
321 | ctx->buf_width = ALIGN(ctx->img_width, S5P_FIMV_NV12M_HALIGN); | 321 | ctx->buf_width = ALIGN(ctx->img_width, S5P_FIMV_NV12M_HALIGN); |
@@ -361,8 +361,9 @@ static void s5p_mfc_set_shared_buffer(struct s5p_mfc_ctx *ctx) | |||
361 | } | 361 | } |
362 | 362 | ||
363 | /* Set registers for decoding stream buffer */ | 363 | /* Set registers for decoding stream buffer */ |
364 | int s5p_mfc_set_dec_stream_buffer_v5(struct s5p_mfc_ctx *ctx, int buf_addr, | 364 | static int s5p_mfc_set_dec_stream_buffer_v5(struct s5p_mfc_ctx *ctx, |
365 | unsigned int start_num_byte, unsigned int buf_size) | 365 | int buf_addr, unsigned int start_num_byte, |
366 | unsigned int buf_size) | ||
366 | { | 367 | { |
367 | struct s5p_mfc_dev *dev = ctx->dev; | 368 | struct s5p_mfc_dev *dev = ctx->dev; |
368 | 369 | ||
@@ -374,7 +375,7 @@ int s5p_mfc_set_dec_stream_buffer_v5(struct s5p_mfc_ctx *ctx, int buf_addr, | |||
374 | } | 375 | } |
375 | 376 | ||
376 | /* Set decoding frame buffer */ | 377 | /* Set decoding frame buffer */ |
377 | int s5p_mfc_set_dec_frame_buffer_v5(struct s5p_mfc_ctx *ctx) | 378 | static int s5p_mfc_set_dec_frame_buffer_v5(struct s5p_mfc_ctx *ctx) |
378 | { | 379 | { |
379 | unsigned int frame_size, i; | 380 | unsigned int frame_size, i; |
380 | unsigned int frame_size_ch, frame_size_mv; | 381 | unsigned int frame_size_ch, frame_size_mv; |
@@ -506,7 +507,7 @@ int s5p_mfc_set_dec_frame_buffer_v5(struct s5p_mfc_ctx *ctx) | |||
506 | } | 507 | } |
507 | 508 | ||
508 | /* Set registers for encoding stream buffer */ | 509 | /* Set registers for encoding stream buffer */ |
509 | int s5p_mfc_set_enc_stream_buffer_v5(struct s5p_mfc_ctx *ctx, | 510 | static int s5p_mfc_set_enc_stream_buffer_v5(struct s5p_mfc_ctx *ctx, |
510 | unsigned long addr, unsigned int size) | 511 | unsigned long addr, unsigned int size) |
511 | { | 512 | { |
512 | struct s5p_mfc_dev *dev = ctx->dev; | 513 | struct s5p_mfc_dev *dev = ctx->dev; |
@@ -516,7 +517,7 @@ int s5p_mfc_set_enc_stream_buffer_v5(struct s5p_mfc_ctx *ctx, | |||
516 | return 0; | 517 | return 0; |
517 | } | 518 | } |
518 | 519 | ||
519 | void s5p_mfc_set_enc_frame_buffer_v5(struct s5p_mfc_ctx *ctx, | 520 | static void s5p_mfc_set_enc_frame_buffer_v5(struct s5p_mfc_ctx *ctx, |
520 | unsigned long y_addr, unsigned long c_addr) | 521 | unsigned long y_addr, unsigned long c_addr) |
521 | { | 522 | { |
522 | struct s5p_mfc_dev *dev = ctx->dev; | 523 | struct s5p_mfc_dev *dev = ctx->dev; |
@@ -525,7 +526,7 @@ void s5p_mfc_set_enc_frame_buffer_v5(struct s5p_mfc_ctx *ctx, | |||
525 | mfc_write(dev, OFFSETB(c_addr), S5P_FIMV_ENC_SI_CH0_CUR_C_ADR); | 526 | mfc_write(dev, OFFSETB(c_addr), S5P_FIMV_ENC_SI_CH0_CUR_C_ADR); |
526 | } | 527 | } |
527 | 528 | ||
528 | void s5p_mfc_get_enc_frame_buffer_v5(struct s5p_mfc_ctx *ctx, | 529 | static void s5p_mfc_get_enc_frame_buffer_v5(struct s5p_mfc_ctx *ctx, |
529 | unsigned long *y_addr, unsigned long *c_addr) | 530 | unsigned long *y_addr, unsigned long *c_addr) |
530 | { | 531 | { |
531 | struct s5p_mfc_dev *dev = ctx->dev; | 532 | struct s5p_mfc_dev *dev = ctx->dev; |
@@ -537,7 +538,7 @@ void s5p_mfc_get_enc_frame_buffer_v5(struct s5p_mfc_ctx *ctx, | |||
537 | } | 538 | } |
538 | 539 | ||
539 | /* Set encoding ref & codec buffer */ | 540 | /* Set encoding ref & codec buffer */ |
540 | int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx) | 541 | static int s5p_mfc_set_enc_ref_buffer_v5(struct s5p_mfc_ctx *ctx) |
541 | { | 542 | { |
542 | struct s5p_mfc_dev *dev = ctx->dev; | 543 | struct s5p_mfc_dev *dev = ctx->dev; |
543 | size_t buf_addr1, buf_addr2; | 544 | size_t buf_addr1, buf_addr2; |
@@ -1041,7 +1042,7 @@ static int s5p_mfc_set_enc_params_h263(struct s5p_mfc_ctx *ctx) | |||
1041 | } | 1042 | } |
1042 | 1043 | ||
1043 | /* Initialize decoding */ | 1044 | /* Initialize decoding */ |
1044 | int s5p_mfc_init_decode_v5(struct s5p_mfc_ctx *ctx) | 1045 | static int s5p_mfc_init_decode_v5(struct s5p_mfc_ctx *ctx) |
1045 | { | 1046 | { |
1046 | struct s5p_mfc_dev *dev = ctx->dev; | 1047 | struct s5p_mfc_dev *dev = ctx->dev; |
1047 | 1048 | ||
@@ -1077,7 +1078,7 @@ static void s5p_mfc_set_flush(struct s5p_mfc_ctx *ctx, int flush) | |||
1077 | } | 1078 | } |
1078 | 1079 | ||
1079 | /* Decode a single frame */ | 1080 | /* Decode a single frame */ |
1080 | int s5p_mfc_decode_one_frame_v5(struct s5p_mfc_ctx *ctx, | 1081 | static int s5p_mfc_decode_one_frame_v5(struct s5p_mfc_ctx *ctx, |
1081 | enum s5p_mfc_decode_arg last_frame) | 1082 | enum s5p_mfc_decode_arg last_frame) |
1082 | { | 1083 | { |
1083 | struct s5p_mfc_dev *dev = ctx->dev; | 1084 | struct s5p_mfc_dev *dev = ctx->dev; |
@@ -1106,7 +1107,7 @@ int s5p_mfc_decode_one_frame_v5(struct s5p_mfc_ctx *ctx, | |||
1106 | return 0; | 1107 | return 0; |
1107 | } | 1108 | } |
1108 | 1109 | ||
1109 | int s5p_mfc_init_encode_v5(struct s5p_mfc_ctx *ctx) | 1110 | static int s5p_mfc_init_encode_v5(struct s5p_mfc_ctx *ctx) |
1110 | { | 1111 | { |
1111 | struct s5p_mfc_dev *dev = ctx->dev; | 1112 | struct s5p_mfc_dev *dev = ctx->dev; |
1112 | 1113 | ||
@@ -1128,7 +1129,7 @@ int s5p_mfc_init_encode_v5(struct s5p_mfc_ctx *ctx) | |||
1128 | } | 1129 | } |
1129 | 1130 | ||
1130 | /* Encode a single frame */ | 1131 | /* Encode a single frame */ |
1131 | int s5p_mfc_encode_one_frame_v5(struct s5p_mfc_ctx *ctx) | 1132 | static int s5p_mfc_encode_one_frame_v5(struct s5p_mfc_ctx *ctx) |
1132 | { | 1133 | { |
1133 | struct s5p_mfc_dev *dev = ctx->dev; | 1134 | struct s5p_mfc_dev *dev = ctx->dev; |
1134 | int cmd; | 1135 | int cmd; |
@@ -1353,7 +1354,7 @@ static int s5p_mfc_run_init_dec_buffers(struct s5p_mfc_ctx *ctx) | |||
1353 | } | 1354 | } |
1354 | 1355 | ||
1355 | /* Try running an operation on hardware */ | 1356 | /* Try running an operation on hardware */ |
1356 | void s5p_mfc_try_run_v5(struct s5p_mfc_dev *dev) | 1357 | static void s5p_mfc_try_run_v5(struct s5p_mfc_dev *dev) |
1357 | { | 1358 | { |
1358 | struct s5p_mfc_ctx *ctx; | 1359 | struct s5p_mfc_ctx *ctx; |
1359 | int new_ctx; | 1360 | int new_ctx; |
@@ -1469,7 +1470,7 @@ void s5p_mfc_try_run_v5(struct s5p_mfc_dev *dev) | |||
1469 | } | 1470 | } |
1470 | 1471 | ||
1471 | 1472 | ||
1472 | void s5p_mfc_cleanup_queue_v5(struct list_head *lh, struct vb2_queue *vq) | 1473 | static void s5p_mfc_cleanup_queue_v5(struct list_head *lh, struct vb2_queue *vq) |
1473 | { | 1474 | { |
1474 | struct s5p_mfc_buf *b; | 1475 | struct s5p_mfc_buf *b; |
1475 | int i; | 1476 | int i; |
@@ -1483,52 +1484,52 @@ void s5p_mfc_cleanup_queue_v5(struct list_head *lh, struct vb2_queue *vq) | |||
1483 | } | 1484 | } |
1484 | } | 1485 | } |
1485 | 1486 | ||
1486 | void s5p_mfc_clear_int_flags_v5(struct s5p_mfc_dev *dev) | 1487 | static void s5p_mfc_clear_int_flags_v5(struct s5p_mfc_dev *dev) |
1487 | { | 1488 | { |
1488 | mfc_write(dev, 0, S5P_FIMV_RISC_HOST_INT); | 1489 | mfc_write(dev, 0, S5P_FIMV_RISC_HOST_INT); |
1489 | mfc_write(dev, 0, S5P_FIMV_RISC2HOST_CMD); | 1490 | mfc_write(dev, 0, S5P_FIMV_RISC2HOST_CMD); |
1490 | mfc_write(dev, 0xffff, S5P_FIMV_SI_RTN_CHID); | 1491 | mfc_write(dev, 0xffff, S5P_FIMV_SI_RTN_CHID); |
1491 | } | 1492 | } |
1492 | 1493 | ||
1493 | int s5p_mfc_get_dspl_y_adr_v5(struct s5p_mfc_dev *dev) | 1494 | static int s5p_mfc_get_dspl_y_adr_v5(struct s5p_mfc_dev *dev) |
1494 | { | 1495 | { |
1495 | return mfc_read(dev, S5P_FIMV_SI_DISPLAY_Y_ADR) << MFC_OFFSET_SHIFT; | 1496 | return mfc_read(dev, S5P_FIMV_SI_DISPLAY_Y_ADR) << MFC_OFFSET_SHIFT; |
1496 | } | 1497 | } |
1497 | 1498 | ||
1498 | int s5p_mfc_get_dec_y_adr_v5(struct s5p_mfc_dev *dev) | 1499 | static int s5p_mfc_get_dec_y_adr_v5(struct s5p_mfc_dev *dev) |
1499 | { | 1500 | { |
1500 | return mfc_read(dev, S5P_FIMV_SI_DECODE_Y_ADR) << MFC_OFFSET_SHIFT; | 1501 | return mfc_read(dev, S5P_FIMV_SI_DECODE_Y_ADR) << MFC_OFFSET_SHIFT; |
1501 | } | 1502 | } |
1502 | 1503 | ||
1503 | int s5p_mfc_get_dspl_status_v5(struct s5p_mfc_dev *dev) | 1504 | static int s5p_mfc_get_dspl_status_v5(struct s5p_mfc_dev *dev) |
1504 | { | 1505 | { |
1505 | return mfc_read(dev, S5P_FIMV_SI_DISPLAY_STATUS); | 1506 | return mfc_read(dev, S5P_FIMV_SI_DISPLAY_STATUS); |
1506 | } | 1507 | } |
1507 | 1508 | ||
1508 | int s5p_mfc_get_dec_status_v5(struct s5p_mfc_dev *dev) | 1509 | static int s5p_mfc_get_dec_status_v5(struct s5p_mfc_dev *dev) |
1509 | { | 1510 | { |
1510 | return mfc_read(dev, S5P_FIMV_SI_DECODE_STATUS); | 1511 | return mfc_read(dev, S5P_FIMV_SI_DECODE_STATUS); |
1511 | } | 1512 | } |
1512 | 1513 | ||
1513 | int s5p_mfc_get_dec_frame_type_v5(struct s5p_mfc_dev *dev) | 1514 | static int s5p_mfc_get_dec_frame_type_v5(struct s5p_mfc_dev *dev) |
1514 | { | 1515 | { |
1515 | return mfc_read(dev, S5P_FIMV_DECODE_FRAME_TYPE) & | 1516 | return mfc_read(dev, S5P_FIMV_DECODE_FRAME_TYPE) & |
1516 | S5P_FIMV_DECODE_FRAME_MASK; | 1517 | S5P_FIMV_DECODE_FRAME_MASK; |
1517 | } | 1518 | } |
1518 | 1519 | ||
1519 | int s5p_mfc_get_disp_frame_type_v5(struct s5p_mfc_ctx *ctx) | 1520 | static int s5p_mfc_get_disp_frame_type_v5(struct s5p_mfc_ctx *ctx) |
1520 | { | 1521 | { |
1521 | return (s5p_mfc_read_info_v5(ctx, DISP_PIC_FRAME_TYPE) >> | 1522 | return (s5p_mfc_read_info_v5(ctx, DISP_PIC_FRAME_TYPE) >> |
1522 | S5P_FIMV_SHARED_DISP_FRAME_TYPE_SHIFT) & | 1523 | S5P_FIMV_SHARED_DISP_FRAME_TYPE_SHIFT) & |
1523 | S5P_FIMV_DECODE_FRAME_MASK; | 1524 | S5P_FIMV_DECODE_FRAME_MASK; |
1524 | } | 1525 | } |
1525 | 1526 | ||
1526 | int s5p_mfc_get_consumed_stream_v5(struct s5p_mfc_dev *dev) | 1527 | static int s5p_mfc_get_consumed_stream_v5(struct s5p_mfc_dev *dev) |
1527 | { | 1528 | { |
1528 | return mfc_read(dev, S5P_FIMV_SI_CONSUMED_BYTES); | 1529 | return mfc_read(dev, S5P_FIMV_SI_CONSUMED_BYTES); |
1529 | } | 1530 | } |
1530 | 1531 | ||
1531 | int s5p_mfc_get_int_reason_v5(struct s5p_mfc_dev *dev) | 1532 | static int s5p_mfc_get_int_reason_v5(struct s5p_mfc_dev *dev) |
1532 | { | 1533 | { |
1533 | int reason; | 1534 | int reason; |
1534 | reason = mfc_read(dev, S5P_FIMV_RISC2HOST_CMD) & | 1535 | reason = mfc_read(dev, S5P_FIMV_RISC2HOST_CMD) & |
@@ -1576,98 +1577,98 @@ int s5p_mfc_get_int_reason_v5(struct s5p_mfc_dev *dev) | |||
1576 | return reason; | 1577 | return reason; |
1577 | } | 1578 | } |
1578 | 1579 | ||
1579 | int s5p_mfc_get_int_err_v5(struct s5p_mfc_dev *dev) | 1580 | static int s5p_mfc_get_int_err_v5(struct s5p_mfc_dev *dev) |
1580 | { | 1581 | { |
1581 | return mfc_read(dev, S5P_FIMV_RISC2HOST_ARG2); | 1582 | return mfc_read(dev, S5P_FIMV_RISC2HOST_ARG2); |
1582 | } | 1583 | } |
1583 | 1584 | ||
1584 | int s5p_mfc_err_dec_v5(unsigned int err) | 1585 | static int s5p_mfc_err_dec_v5(unsigned int err) |
1585 | { | 1586 | { |
1586 | return (err & S5P_FIMV_ERR_DEC_MASK) >> S5P_FIMV_ERR_DEC_SHIFT; | 1587 | return (err & S5P_FIMV_ERR_DEC_MASK) >> S5P_FIMV_ERR_DEC_SHIFT; |
1587 | } | 1588 | } |
1588 | 1589 | ||
1589 | int s5p_mfc_err_dspl_v5(unsigned int err) | 1590 | static int s5p_mfc_err_dspl_v5(unsigned int err) |
1590 | { | 1591 | { |
1591 | return (err & S5P_FIMV_ERR_DSPL_MASK) >> S5P_FIMV_ERR_DSPL_SHIFT; | 1592 | return (err & S5P_FIMV_ERR_DSPL_MASK) >> S5P_FIMV_ERR_DSPL_SHIFT; |
1592 | } | 1593 | } |
1593 | 1594 | ||
1594 | int s5p_mfc_get_img_width_v5(struct s5p_mfc_dev *dev) | 1595 | static int s5p_mfc_get_img_width_v5(struct s5p_mfc_dev *dev) |
1595 | { | 1596 | { |
1596 | return mfc_read(dev, S5P_FIMV_SI_HRESOL); | 1597 | return mfc_read(dev, S5P_FIMV_SI_HRESOL); |
1597 | } | 1598 | } |
1598 | 1599 | ||
1599 | int s5p_mfc_get_img_height_v5(struct s5p_mfc_dev *dev) | 1600 | static int s5p_mfc_get_img_height_v5(struct s5p_mfc_dev *dev) |
1600 | { | 1601 | { |
1601 | return mfc_read(dev, S5P_FIMV_SI_VRESOL); | 1602 | return mfc_read(dev, S5P_FIMV_SI_VRESOL); |
1602 | } | 1603 | } |
1603 | 1604 | ||
1604 | int s5p_mfc_get_dpb_count_v5(struct s5p_mfc_dev *dev) | 1605 | static int s5p_mfc_get_dpb_count_v5(struct s5p_mfc_dev *dev) |
1605 | { | 1606 | { |
1606 | return mfc_read(dev, S5P_FIMV_SI_BUF_NUMBER); | 1607 | return mfc_read(dev, S5P_FIMV_SI_BUF_NUMBER); |
1607 | } | 1608 | } |
1608 | 1609 | ||
1609 | int s5p_mfc_get_mv_count_v5(struct s5p_mfc_dev *dev) | 1610 | static int s5p_mfc_get_mv_count_v5(struct s5p_mfc_dev *dev) |
1610 | { | 1611 | { |
1611 | /* NOP */ | 1612 | /* NOP */ |
1612 | return -1; | 1613 | return -1; |
1613 | } | 1614 | } |
1614 | 1615 | ||
1615 | int s5p_mfc_get_inst_no_v5(struct s5p_mfc_dev *dev) | 1616 | static int s5p_mfc_get_inst_no_v5(struct s5p_mfc_dev *dev) |
1616 | { | 1617 | { |
1617 | return mfc_read(dev, S5P_FIMV_RISC2HOST_ARG1); | 1618 | return mfc_read(dev, S5P_FIMV_RISC2HOST_ARG1); |
1618 | } | 1619 | } |
1619 | 1620 | ||
1620 | int s5p_mfc_get_enc_strm_size_v5(struct s5p_mfc_dev *dev) | 1621 | static int s5p_mfc_get_enc_strm_size_v5(struct s5p_mfc_dev *dev) |
1621 | { | 1622 | { |
1622 | return mfc_read(dev, S5P_FIMV_ENC_SI_STRM_SIZE); | 1623 | return mfc_read(dev, S5P_FIMV_ENC_SI_STRM_SIZE); |
1623 | } | 1624 | } |
1624 | 1625 | ||
1625 | int s5p_mfc_get_enc_slice_type_v5(struct s5p_mfc_dev *dev) | 1626 | static int s5p_mfc_get_enc_slice_type_v5(struct s5p_mfc_dev *dev) |
1626 | { | 1627 | { |
1627 | return mfc_read(dev, S5P_FIMV_ENC_SI_SLICE_TYPE); | 1628 | return mfc_read(dev, S5P_FIMV_ENC_SI_SLICE_TYPE); |
1628 | } | 1629 | } |
1629 | 1630 | ||
1630 | int s5p_mfc_get_enc_dpb_count_v5(struct s5p_mfc_dev *dev) | 1631 | static int s5p_mfc_get_enc_dpb_count_v5(struct s5p_mfc_dev *dev) |
1631 | { | 1632 | { |
1632 | return -1; | 1633 | return -1; |
1633 | } | 1634 | } |
1634 | 1635 | ||
1635 | int s5p_mfc_get_enc_pic_count_v5(struct s5p_mfc_dev *dev) | 1636 | static int s5p_mfc_get_enc_pic_count_v5(struct s5p_mfc_dev *dev) |
1636 | { | 1637 | { |
1637 | return mfc_read(dev, S5P_FIMV_ENC_SI_PIC_CNT); | 1638 | return mfc_read(dev, S5P_FIMV_ENC_SI_PIC_CNT); |
1638 | } | 1639 | } |
1639 | 1640 | ||
1640 | int s5p_mfc_get_sei_avail_status_v5(struct s5p_mfc_ctx *ctx) | 1641 | static int s5p_mfc_get_sei_avail_status_v5(struct s5p_mfc_ctx *ctx) |
1641 | { | 1642 | { |
1642 | return s5p_mfc_read_info_v5(ctx, FRAME_PACK_SEI_AVAIL); | 1643 | return s5p_mfc_read_info_v5(ctx, FRAME_PACK_SEI_AVAIL); |
1643 | } | 1644 | } |
1644 | 1645 | ||
1645 | int s5p_mfc_get_mvc_num_views_v5(struct s5p_mfc_dev *dev) | 1646 | static int s5p_mfc_get_mvc_num_views_v5(struct s5p_mfc_dev *dev) |
1646 | { | 1647 | { |
1647 | return -1; | 1648 | return -1; |
1648 | } | 1649 | } |
1649 | 1650 | ||
1650 | int s5p_mfc_get_mvc_view_id_v5(struct s5p_mfc_dev *dev) | 1651 | static int s5p_mfc_get_mvc_view_id_v5(struct s5p_mfc_dev *dev) |
1651 | { | 1652 | { |
1652 | return -1; | 1653 | return -1; |
1653 | } | 1654 | } |
1654 | 1655 | ||
1655 | unsigned int s5p_mfc_get_pic_type_top_v5(struct s5p_mfc_ctx *ctx) | 1656 | static unsigned int s5p_mfc_get_pic_type_top_v5(struct s5p_mfc_ctx *ctx) |
1656 | { | 1657 | { |
1657 | return s5p_mfc_read_info_v5(ctx, PIC_TIME_TOP); | 1658 | return s5p_mfc_read_info_v5(ctx, PIC_TIME_TOP); |
1658 | } | 1659 | } |
1659 | 1660 | ||
1660 | unsigned int s5p_mfc_get_pic_type_bot_v5(struct s5p_mfc_ctx *ctx) | 1661 | static unsigned int s5p_mfc_get_pic_type_bot_v5(struct s5p_mfc_ctx *ctx) |
1661 | { | 1662 | { |
1662 | return s5p_mfc_read_info_v5(ctx, PIC_TIME_BOT); | 1663 | return s5p_mfc_read_info_v5(ctx, PIC_TIME_BOT); |
1663 | } | 1664 | } |
1664 | 1665 | ||
1665 | unsigned int s5p_mfc_get_crop_info_h_v5(struct s5p_mfc_ctx *ctx) | 1666 | static unsigned int s5p_mfc_get_crop_info_h_v5(struct s5p_mfc_ctx *ctx) |
1666 | { | 1667 | { |
1667 | return s5p_mfc_read_info_v5(ctx, CROP_INFO_H); | 1668 | return s5p_mfc_read_info_v5(ctx, CROP_INFO_H); |
1668 | } | 1669 | } |
1669 | 1670 | ||
1670 | unsigned int s5p_mfc_get_crop_info_v_v5(struct s5p_mfc_ctx *ctx) | 1671 | static unsigned int s5p_mfc_get_crop_info_v_v5(struct s5p_mfc_ctx *ctx) |
1671 | { | 1672 | { |
1672 | return s5p_mfc_read_info_v5(ctx, CROP_INFO_V); | 1673 | return s5p_mfc_read_info_v5(ctx, CROP_INFO_V); |
1673 | } | 1674 | } |