Loading drivers/media/platform/msm/vidc/hfi_response_handler.c +9 −3 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -39,6 +39,9 @@ static enum vidc_status hfi_map_err_status(u32 hfi_err) case HFI_ERR_SYS_FATAL: vidc_err = VIDC_ERR_HW_FATAL; break; case HFI_ERR_SYS_NOC_ERROR: vidc_err = VIDC_ERR_NOC_ERROR; break; case HFI_ERR_SYS_VERSION_MISMATCH: case HFI_ERR_SYS_INVALID_PARAMETER: case HFI_ERR_SYS_SESSION_ID_OUT_OF_RANGE: Loading Loading @@ -316,11 +319,14 @@ static int hfi_process_evt_release_buffer_ref(u32 device_id, return 0; } static int hfi_process_sys_error(u32 device_id, struct msm_vidc_cb_info *info) static int hfi_process_sys_error(u32 device_id, struct hfi_msg_event_notify_packet *pkt, struct msm_vidc_cb_info *info) { struct msm_vidc_cb_cmd_done cmd_done = {0}; cmd_done.device_id = device_id; cmd_done.status = hfi_map_err_status(pkt->event_data1); info->response_type = HAL_SYS_ERROR; info->response.cmd = cmd_done; Loading Loading @@ -373,7 +379,7 @@ static int hfi_process_event_notify(u32 device_id, case HFI_EVENT_SYS_ERROR: dprintk(VIDC_ERR, "HFI_EVENT_SYS_ERROR: %d, %#x\n", pkt->event_data1, pkt->event_data2); return hfi_process_sys_error(device_id, info); return hfi_process_sys_error(device_id, pkt, info); case HFI_EVENT_SESSION_ERROR: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR[%#x]\n", pkt->session_id); Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +4 −0 Original line number Diff line number Diff line Loading @@ -2209,6 +2209,10 @@ static void handle_sys_error(enum hal_command_response cmd, void *data) } /* handle the hw error before core released to get full debug info */ msm_vidc_handle_hw_error(core); if (response->status == VIDC_ERR_NOC_ERROR) { dprintk(VIDC_WARN, "Got NOC error"); MSM_VIDC_ERROR(true); } dprintk(VIDC_DBG, "Calling core_release\n"); rc = call_hfi_op(hdev, core_release, hdev->hfi_device_data); if (rc) { Loading drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +5 −4 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -992,10 +992,11 @@ int msm_vidc_smmu_fault_handler(struct iommu_domain *domain, if (core->smmu_fault_handled) { if (core->resources.non_fatal_pagefaults) { msm_vidc_noc_error_info(core); MSM_VIDC_ERROR(true); dprintk(VIDC_ERR, "%s: non-fatal pagefault address: %lx\n", __func__, iova); return 0; } return -ENOSYS; } dprintk(VIDC_ERR, "%s - faulting address: %lx\n", __func__, iova); Loading drivers/media/platform/msm/vidc/vidc_hfi_api.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -88,6 +88,7 @@ enum vidc_status { VIDC_ERR_TIMEOUT, VIDC_ERR_CMDQFULL, VIDC_ERR_START_CODE_NOT_FOUND, VIDC_ERR_NOC_ERROR, VIDC_ERR_CLIENT_PRESENT = 0x90000001, VIDC_ERR_CLIENT_FATAL, VIDC_ERR_CMD_QUEUE_FULL, Loading drivers/media/platform/msm/vidc/vidc_hfi_helper.h +2 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -45,7 +45,7 @@ #define HFI_ERR_SYS_SESSION_IN_USE (HFI_COMMON_BASE + 0x7) #define HFI_ERR_SYS_SESSION_ID_OUT_OF_RANGE (HFI_COMMON_BASE + 0x8) #define HFI_ERR_SYS_UNSUPPORTED_DOMAIN (HFI_COMMON_BASE + 0x9) #define HFI_ERR_SYS_NOC_ERROR (HFI_COMMON_BASE + 0x11) #define HFI_ERR_SESSION_FATAL (HFI_COMMON_BASE + 0x1001) #define HFI_ERR_SESSION_INVALID_PARAMETER (HFI_COMMON_BASE + 0x1002) #define HFI_ERR_SESSION_BAD_POINTER (HFI_COMMON_BASE + 0x1003) Loading Loading
drivers/media/platform/msm/vidc/hfi_response_handler.c +9 −3 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -39,6 +39,9 @@ static enum vidc_status hfi_map_err_status(u32 hfi_err) case HFI_ERR_SYS_FATAL: vidc_err = VIDC_ERR_HW_FATAL; break; case HFI_ERR_SYS_NOC_ERROR: vidc_err = VIDC_ERR_NOC_ERROR; break; case HFI_ERR_SYS_VERSION_MISMATCH: case HFI_ERR_SYS_INVALID_PARAMETER: case HFI_ERR_SYS_SESSION_ID_OUT_OF_RANGE: Loading Loading @@ -316,11 +319,14 @@ static int hfi_process_evt_release_buffer_ref(u32 device_id, return 0; } static int hfi_process_sys_error(u32 device_id, struct msm_vidc_cb_info *info) static int hfi_process_sys_error(u32 device_id, struct hfi_msg_event_notify_packet *pkt, struct msm_vidc_cb_info *info) { struct msm_vidc_cb_cmd_done cmd_done = {0}; cmd_done.device_id = device_id; cmd_done.status = hfi_map_err_status(pkt->event_data1); info->response_type = HAL_SYS_ERROR; info->response.cmd = cmd_done; Loading Loading @@ -373,7 +379,7 @@ static int hfi_process_event_notify(u32 device_id, case HFI_EVENT_SYS_ERROR: dprintk(VIDC_ERR, "HFI_EVENT_SYS_ERROR: %d, %#x\n", pkt->event_data1, pkt->event_data2); return hfi_process_sys_error(device_id, info); return hfi_process_sys_error(device_id, pkt, info); case HFI_EVENT_SESSION_ERROR: dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR[%#x]\n", pkt->session_id); Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +4 −0 Original line number Diff line number Diff line Loading @@ -2209,6 +2209,10 @@ static void handle_sys_error(enum hal_command_response cmd, void *data) } /* handle the hw error before core released to get full debug info */ msm_vidc_handle_hw_error(core); if (response->status == VIDC_ERR_NOC_ERROR) { dprintk(VIDC_WARN, "Got NOC error"); MSM_VIDC_ERROR(true); } dprintk(VIDC_DBG, "Calling core_release\n"); rc = call_hfi_op(hdev, core_release, hdev->hfi_device_data); if (rc) { Loading
drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +5 −4 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -992,10 +992,11 @@ int msm_vidc_smmu_fault_handler(struct iommu_domain *domain, if (core->smmu_fault_handled) { if (core->resources.non_fatal_pagefaults) { msm_vidc_noc_error_info(core); MSM_VIDC_ERROR(true); dprintk(VIDC_ERR, "%s: non-fatal pagefault address: %lx\n", __func__, iova); return 0; } return -ENOSYS; } dprintk(VIDC_ERR, "%s - faulting address: %lx\n", __func__, iova); Loading
drivers/media/platform/msm/vidc/vidc_hfi_api.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -88,6 +88,7 @@ enum vidc_status { VIDC_ERR_TIMEOUT, VIDC_ERR_CMDQFULL, VIDC_ERR_START_CODE_NOT_FOUND, VIDC_ERR_NOC_ERROR, VIDC_ERR_CLIENT_PRESENT = 0x90000001, VIDC_ERR_CLIENT_FATAL, VIDC_ERR_CMD_QUEUE_FULL, Loading
drivers/media/platform/msm/vidc/vidc_hfi_helper.h +2 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -45,7 +45,7 @@ #define HFI_ERR_SYS_SESSION_IN_USE (HFI_COMMON_BASE + 0x7) #define HFI_ERR_SYS_SESSION_ID_OUT_OF_RANGE (HFI_COMMON_BASE + 0x8) #define HFI_ERR_SYS_UNSUPPORTED_DOMAIN (HFI_COMMON_BASE + 0x9) #define HFI_ERR_SYS_NOC_ERROR (HFI_COMMON_BASE + 0x11) #define HFI_ERR_SESSION_FATAL (HFI_COMMON_BASE + 0x1001) #define HFI_ERR_SESSION_INVALID_PARAMETER (HFI_COMMON_BASE + 0x1002) #define HFI_ERR_SESSION_BAD_POINTER (HFI_COMMON_BASE + 0x1003) Loading