Loading msm/vidc/msm_venc.c +4 −3 Original line number Diff line number Diff line Loading @@ -1132,11 +1132,13 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst) int rc = 0; struct msm_vidc_format_desc *fmt_desc = NULL; struct v4l2_format *f = NULL; uint32_t vpu; if (!inst) { d_vpr_e("Invalid input = %pK\n", inst); return -EINVAL; } vpu = inst->core->platform_data->vpu_ver; f = &inst->fmts[OUTPUT_PORT].v4l2_fmt; f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; f->fmt.pix_mp.height = DEFAULT_HEIGHT; Loading @@ -1162,9 +1164,8 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst) f->fmt.pix_mp.height = DEFAULT_HEIGHT; f->fmt.pix_mp.width = DEFAULT_WIDTH; f->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12_UBWC; if(inst->core->platform_data->vpu_ver == VPU_VERSION_IRIS1) f->fmt.pix_mp.num_planes = 1; else if (vpu == VPU_VERSION_IRIS2) f->fmt.pix_mp.num_planes = 2; f->fmt.pix_mp.plane_fmt[0].sizeimage = msm_vidc_calculate_enc_input_frame_size(inst); Loading msm/vidc/msm_vidc.c +2 −1 Original line number Diff line number Diff line Loading @@ -1401,7 +1401,8 @@ static int try_get_ctrl_for_instance(struct msm_vidc_inst *inst, return -EINVAL; vpu_ver = inst->core->platform_data->vpu_ver; ctrl->val = (vpu_ver == VPU_VERSION_IRIS1 || vpu_ver == VPU_VERSION_IRIS2) ? vpu_ver == VPU_VERSION_IRIS2 || vpu_ver == VPU_VERSION_IRIS2_1) ? V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE_2BYTE : V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE_2BIT; break; Loading msm/vidc/msm_vidc_buffer_calculations.c +4 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. */ #include "msm_vidc_debug.h" Loading Loading @@ -603,15 +603,17 @@ int msm_vidc_calculate_internal_buffer_sizes(struct msm_vidc_inst *inst) void msm_vidc_init_buffer_size_calculators(struct msm_vidc_inst *inst) { struct msm_vidc_core *core; uint32_t vpu; if (!inst) return; inst->buffer_size_calculators = NULL; core = inst->core; vpu = core->platform_data->vpu_ver; /* Change this to IRIS2 when ready */ if (core->platform_data->vpu_ver == VPU_VERSION_IRIS2) if (vpu == VPU_VERSION_IRIS2 || vpu == VPU_VERSION_IRIS2_1) inst->buffer_size_calculators = msm_vidc_calculate_internal_buffer_sizes; } Loading msm/vidc/msm_vidc_clocks.c +7 −0 Original line number Diff line number Diff line Loading @@ -1244,6 +1244,7 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst) struct hfi_video_work_route pdata; bool is_legacy_cbr; u32 codec; uint32_t vpu; if (!inst || !inst->core || !inst->core->device) { d_vpr_e("%s: Invalid args: Inst = %pK\n", Loading @@ -1251,10 +1252,15 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst) return -EINVAL; } vpu = inst->core->platform_data->vpu_ver; hdev = inst->core->device; is_legacy_cbr = inst->clk_data.is_legacy_cbr; pdata.video_work_route = 4; if (vpu == VPU_VERSION_IRIS2_1) { pdata.video_work_route = 1; goto decision_done; } codec = get_v4l2_codec(inst); if (inst->session_type == MSM_VIDC_DECODER) { if (codec == V4L2_PIX_FMT_MPEG2 || Loading @@ -1278,6 +1284,7 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst) return -EINVAL; } decision_done: s_vpr_h(inst->sid, "Configurng work route = %u", pdata.video_work_route); Loading msm/vidc/msm_vidc_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ enum vpu_version { VPU_VERSION_AR50 = 1, VPU_VERSION_IRIS1, VPU_VERSION_IRIS2, VPU_VERSION_IRIS2_1, VPU_VERSION_AR50_LITE, }; Loading Loading
msm/vidc/msm_venc.c +4 −3 Original line number Diff line number Diff line Loading @@ -1132,11 +1132,13 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst) int rc = 0; struct msm_vidc_format_desc *fmt_desc = NULL; struct v4l2_format *f = NULL; uint32_t vpu; if (!inst) { d_vpr_e("Invalid input = %pK\n", inst); return -EINVAL; } vpu = inst->core->platform_data->vpu_ver; f = &inst->fmts[OUTPUT_PORT].v4l2_fmt; f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; f->fmt.pix_mp.height = DEFAULT_HEIGHT; Loading @@ -1162,9 +1164,8 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst) f->fmt.pix_mp.height = DEFAULT_HEIGHT; f->fmt.pix_mp.width = DEFAULT_WIDTH; f->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12_UBWC; if(inst->core->platform_data->vpu_ver == VPU_VERSION_IRIS1) f->fmt.pix_mp.num_planes = 1; else if (vpu == VPU_VERSION_IRIS2) f->fmt.pix_mp.num_planes = 2; f->fmt.pix_mp.plane_fmt[0].sizeimage = msm_vidc_calculate_enc_input_frame_size(inst); Loading
msm/vidc/msm_vidc.c +2 −1 Original line number Diff line number Diff line Loading @@ -1401,7 +1401,8 @@ static int try_get_ctrl_for_instance(struct msm_vidc_inst *inst, return -EINVAL; vpu_ver = inst->core->platform_data->vpu_ver; ctrl->val = (vpu_ver == VPU_VERSION_IRIS1 || vpu_ver == VPU_VERSION_IRIS2) ? vpu_ver == VPU_VERSION_IRIS2 || vpu_ver == VPU_VERSION_IRIS2_1) ? V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE_2BYTE : V4L2_CID_MPEG_VIDC_VIDEO_ROI_TYPE_2BIT; break; Loading
msm/vidc/msm_vidc_buffer_calculations.c +4 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. */ #include "msm_vidc_debug.h" Loading Loading @@ -603,15 +603,17 @@ int msm_vidc_calculate_internal_buffer_sizes(struct msm_vidc_inst *inst) void msm_vidc_init_buffer_size_calculators(struct msm_vidc_inst *inst) { struct msm_vidc_core *core; uint32_t vpu; if (!inst) return; inst->buffer_size_calculators = NULL; core = inst->core; vpu = core->platform_data->vpu_ver; /* Change this to IRIS2 when ready */ if (core->platform_data->vpu_ver == VPU_VERSION_IRIS2) if (vpu == VPU_VERSION_IRIS2 || vpu == VPU_VERSION_IRIS2_1) inst->buffer_size_calculators = msm_vidc_calculate_internal_buffer_sizes; } Loading
msm/vidc/msm_vidc_clocks.c +7 −0 Original line number Diff line number Diff line Loading @@ -1244,6 +1244,7 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst) struct hfi_video_work_route pdata; bool is_legacy_cbr; u32 codec; uint32_t vpu; if (!inst || !inst->core || !inst->core->device) { d_vpr_e("%s: Invalid args: Inst = %pK\n", Loading @@ -1251,10 +1252,15 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst) return -EINVAL; } vpu = inst->core->platform_data->vpu_ver; hdev = inst->core->device; is_legacy_cbr = inst->clk_data.is_legacy_cbr; pdata.video_work_route = 4; if (vpu == VPU_VERSION_IRIS2_1) { pdata.video_work_route = 1; goto decision_done; } codec = get_v4l2_codec(inst); if (inst->session_type == MSM_VIDC_DECODER) { if (codec == V4L2_PIX_FMT_MPEG2 || Loading @@ -1278,6 +1284,7 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst) return -EINVAL; } decision_done: s_vpr_h(inst->sid, "Configurng work route = %u", pdata.video_work_route); Loading
msm/vidc/msm_vidc_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ enum vpu_version { VPU_VERSION_AR50 = 1, VPU_VERSION_IRIS1, VPU_VERSION_IRIS2, VPU_VERSION_IRIS2_1, VPU_VERSION_AR50_LITE, }; Loading