Loading msm/vidc/hfi_ar50_lt.c +62 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,26 @@ #define VIDC_UC_REGION_ADDR_AR50_LT VIDC_CPU_CS_SCIBARG1_AR50_LT #define VIDC_UC_REGION_SIZE_AR50_LT VIDC_CPU_CS_SCIBARG2_AR50_LT /* * -------------------------------------------------------------------------- * MODULE: vcodec noc error log registers * -------------------------------------------------------------------------- */ #define VCODEC_CORE0_VIDEO_NOC_BASE_OFFS 0x00004000 #define VCODEC_COREX_VIDEO_NOC_ERR_SWID_LOW_OFFS 0x0500 #define VCODEC_COREX_VIDEO_NOC_ERR_SWID_HIGH_OFFS 0x0504 #define VCODEC_COREX_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS 0x0508 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRVLD_LOW_OFFS 0x0510 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRCLR_LOW_OFFS 0x0518 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS 0x0520 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS 0x0524 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS 0x0528 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS 0x052C #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS 0x0530 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS 0x0534 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS 0x0538 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS 0x053C void __interrupt_init_ar50_lt(struct venus_hfi_device *device, u32 sid) { __write_register(device, VIDC_WRAPPER_INTR_MASK_AR50_LT, Loading @@ -143,6 +163,48 @@ void __setup_ucregion_memory_map_ar50_lt(struct venus_hfi_device *device, u32 si (u32)device->qdss.align_device_addr, sid); } void __noc_error_info_ar50_lt(struct venus_hfi_device *device) { u32 val; u32 vcodec_core_video_noc_base_offs = VCODEC_CORE0_VIDEO_NOC_BASE_OFFS; u32 sid = DEFAULT_SID; val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_SWID_LOW_OFFS, sid); d_vpr_e("NOC_ERR_SWID_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_SWID_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_SWID_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS, sid); d_vpr_e("NOC_ERR_MAINCTL_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG0_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG0_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG1_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG1_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG2_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG2_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG3_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG3_HIGH: %#x\n", val); } void __power_off_ar50_lt(struct venus_hfi_device *device) { if (!device->power_enabled) Loading msm/vidc/hfi_common.c +16 −11 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ struct venus_hfi_vpu_ops ar50_lite_ops = { .prepare_pc = __prepare_pc_ar50_lt, .raise_interrupt = __raise_interrupt_ar50_lt, .watchdog = __watchdog_common, .noc_error_info = __noc_error_info_common, .noc_error_info = __noc_error_info_ar50_lt, .core_clear_interrupt = __core_clear_interrupt_ar50_lt, .boot_firmware = __boot_firmware_ar50_lt, }; Loading Loading @@ -3077,6 +3077,11 @@ static void print_sfr_message(struct venus_hfi_device *device) vsfr = (struct hfi_sfr_struct *)device->sfr.align_virtual_addr; if (vsfr) { if (vsfr->bufSize != device->sfr.mem_size) { d_vpr_e("Invalid SFR buf size %d actual %d\n", vsfr->bufSize, device->sfr.mem_size); return; } vsfr_size = vsfr->bufSize - sizeof(u32); p = memchr(vsfr->rg_data, '\0', vsfr_size); /* SFR isn't guaranteed to be NULL terminated */ Loading msm/vidc/hfi_common.h +1 −0 Original line number Diff line number Diff line Loading @@ -329,5 +329,6 @@ int __prepare_pc_ar50_lt(struct venus_hfi_device *device); void __raise_interrupt_ar50_lt(struct venus_hfi_device *device, u32 sid); void __core_clear_interrupt_ar50_lt(struct venus_hfi_device *device); int __boot_firmware_ar50_lt(struct venus_hfi_device *device, u32 sid); void __noc_error_info_ar50_lt(struct venus_hfi_device *device); #endif msm/vidc/msm_vdec.c +2 −0 Original line number Diff line number Diff line Loading @@ -933,6 +933,8 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY: break; case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE: if (!is_valid_operating_rate(inst, ctrl->val)) break; inst->clk_data.operating_rate = ctrl->val; inst->flags &= ~VIDC_TURBO; if (ctrl->val == INT_MAX) Loading msm/vidc/msm_venc.c +3 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. */ #include <linux/slab.h> #include "msm_venc.h" Loading Loading @@ -1680,6 +1680,8 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) } break; case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE: if (!is_valid_operating_rate(inst, ctrl->val)) break; inst->clk_data.operating_rate = ctrl->val; /* For HEIC image encode, set operating rate to 1 */ if (is_grid_session(inst)) { Loading Loading
msm/vidc/hfi_ar50_lt.c +62 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,26 @@ #define VIDC_UC_REGION_ADDR_AR50_LT VIDC_CPU_CS_SCIBARG1_AR50_LT #define VIDC_UC_REGION_SIZE_AR50_LT VIDC_CPU_CS_SCIBARG2_AR50_LT /* * -------------------------------------------------------------------------- * MODULE: vcodec noc error log registers * -------------------------------------------------------------------------- */ #define VCODEC_CORE0_VIDEO_NOC_BASE_OFFS 0x00004000 #define VCODEC_COREX_VIDEO_NOC_ERR_SWID_LOW_OFFS 0x0500 #define VCODEC_COREX_VIDEO_NOC_ERR_SWID_HIGH_OFFS 0x0504 #define VCODEC_COREX_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS 0x0508 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRVLD_LOW_OFFS 0x0510 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRCLR_LOW_OFFS 0x0518 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS 0x0520 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS 0x0524 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS 0x0528 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS 0x052C #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS 0x0530 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS 0x0534 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS 0x0538 #define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS 0x053C void __interrupt_init_ar50_lt(struct venus_hfi_device *device, u32 sid) { __write_register(device, VIDC_WRAPPER_INTR_MASK_AR50_LT, Loading @@ -143,6 +163,48 @@ void __setup_ucregion_memory_map_ar50_lt(struct venus_hfi_device *device, u32 si (u32)device->qdss.align_device_addr, sid); } void __noc_error_info_ar50_lt(struct venus_hfi_device *device) { u32 val; u32 vcodec_core_video_noc_base_offs = VCODEC_CORE0_VIDEO_NOC_BASE_OFFS; u32 sid = DEFAULT_SID; val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_SWID_LOW_OFFS, sid); d_vpr_e("NOC_ERR_SWID_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_SWID_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_SWID_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS, sid); d_vpr_e("NOC_ERR_MAINCTL_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG0_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG0_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG1_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG1_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG2_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG2_HIGH: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG3_LOW: %#x\n", val); val = __read_register(device, vcodec_core_video_noc_base_offs + VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS, sid); d_vpr_e("NOC_ERR_ERRLOG3_HIGH: %#x\n", val); } void __power_off_ar50_lt(struct venus_hfi_device *device) { if (!device->power_enabled) Loading
msm/vidc/hfi_common.c +16 −11 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ struct venus_hfi_vpu_ops ar50_lite_ops = { .prepare_pc = __prepare_pc_ar50_lt, .raise_interrupt = __raise_interrupt_ar50_lt, .watchdog = __watchdog_common, .noc_error_info = __noc_error_info_common, .noc_error_info = __noc_error_info_ar50_lt, .core_clear_interrupt = __core_clear_interrupt_ar50_lt, .boot_firmware = __boot_firmware_ar50_lt, }; Loading Loading @@ -3077,6 +3077,11 @@ static void print_sfr_message(struct venus_hfi_device *device) vsfr = (struct hfi_sfr_struct *)device->sfr.align_virtual_addr; if (vsfr) { if (vsfr->bufSize != device->sfr.mem_size) { d_vpr_e("Invalid SFR buf size %d actual %d\n", vsfr->bufSize, device->sfr.mem_size); return; } vsfr_size = vsfr->bufSize - sizeof(u32); p = memchr(vsfr->rg_data, '\0', vsfr_size); /* SFR isn't guaranteed to be NULL terminated */ Loading
msm/vidc/hfi_common.h +1 −0 Original line number Diff line number Diff line Loading @@ -329,5 +329,6 @@ int __prepare_pc_ar50_lt(struct venus_hfi_device *device); void __raise_interrupt_ar50_lt(struct venus_hfi_device *device, u32 sid); void __core_clear_interrupt_ar50_lt(struct venus_hfi_device *device); int __boot_firmware_ar50_lt(struct venus_hfi_device *device, u32 sid); void __noc_error_info_ar50_lt(struct venus_hfi_device *device); #endif
msm/vidc/msm_vdec.c +2 −0 Original line number Diff line number Diff line Loading @@ -933,6 +933,8 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY: break; case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE: if (!is_valid_operating_rate(inst, ctrl->val)) break; inst->clk_data.operating_rate = ctrl->val; inst->flags &= ~VIDC_TURBO; if (ctrl->val == INT_MAX) Loading
msm/vidc/msm_venc.c +3 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. */ #include <linux/slab.h> #include "msm_venc.h" Loading Loading @@ -1680,6 +1680,8 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) } break; case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE: if (!is_valid_operating_rate(inst, ctrl->val)) break; inst->clk_data.operating_rate = ctrl->val; /* For HEIC image encode, set operating rate to 1 */ if (is_grid_session(inst)) { Loading