Loading drivers/cam_cdm/cam_cdm_hw_core.c +5 −7 Original line number Diff line number Diff line Loading @@ -1224,16 +1224,14 @@ static void cam_hw_cdm_work(struct work_struct *work) } static void cam_hw_cdm_iommu_fault_handler(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token, uint32_t buf_info) static void cam_hw_cdm_iommu_fault_handler(struct cam_smmu_pf_info *pf_info) { struct cam_hw_info *cdm_hw = NULL; struct cam_cdm *core = NULL; int i; if (token) { cdm_hw = (struct cam_hw_info *)token; if (pf_info->token) { cdm_hw = (struct cam_hw_info *)pf_info->token; core = (struct cam_cdm *)cdm_hw->core_info; set_bit(CAM_CDM_ERROR_HW_STATUS, &core->cdm_status); mutex_lock(&cdm_hw->hw_mutex); Loading @@ -1254,9 +1252,9 @@ static void cam_hw_cdm_iommu_fault_handler(struct iommu_domain *domain, mutex_unlock(&core->bl_fifo[i].fifo_lock); mutex_unlock(&cdm_hw->hw_mutex); CAM_ERR_RATE_LIMIT(CAM_CDM, "Page fault iova addr %pK\n", (void *)iova); (void *)pf_info->iova); cam_cdm_notify_clients(cdm_hw, CAM_CDM_CB_STATUS_PAGEFAULT, (void *)iova); (void *)pf_info->iova); clear_bit(CAM_CDM_ERROR_HW_STATUS, &core->cdm_status); } else { CAM_ERR(CAM_CDM, "Invalid token"); Loading drivers/cam_core/cam_context.c +3 −3 Original line number Diff line number Diff line Loading @@ -287,8 +287,8 @@ int cam_context_handle_crm_dump_req(struct cam_context *ctx, return rc; } int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova, uint32_t buf_info) int cam_context_dump_pf_info(struct cam_context *ctx, struct cam_smmu_pf_info *pf_info) { int rc = 0; Loading @@ -301,7 +301,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova, (ctx->state < CAM_CTX_STATE_MAX)) { if (ctx->state_machine[ctx->state].pagefault_ops) { rc = ctx->state_machine[ctx->state].pagefault_ops( ctx, iova, buf_info); ctx, pf_info); } else { CAM_WARN(CAM_CORE, "No dump ctx in dev %d, state %d", ctx->dev_hdl, ctx->state); Loading drivers/cam_core/cam_context.h +4 −4 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/kref.h> #include "cam_req_mgr_interface.h" #include "cam_hw_mgr_intf.h" #include "cam_smmu_api.h" /* Forward declarations */ struct cam_context; Loading Loading @@ -360,12 +361,11 @@ int cam_context_handle_crm_dump_req(struct cam_context *ctx, * @brief: Handle dump active request request command * * @ctx: Object pointer for cam_context * @iova: Page fault address * @buf_info: Information about closest memory handle * @pf_info: Smmu page fault info * */ int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova, uint32_t buf_info); int cam_context_dump_pf_info(struct cam_context *ctx, struct cam_smmu_pf_info *pf_info); /** * cam_context_handle_acquire_dev() Loading drivers/cam_core/cam_context_utils.c +9 −4 Original line number Diff line number Diff line Loading @@ -998,8 +998,8 @@ int32_t cam_context_stop_dev_to_hw(struct cam_context *ctx) } int32_t cam_context_dump_pf_info_to_hw(struct cam_context *ctx, struct cam_packet *packet, unsigned long iova, uint32_t buf_info, bool *mem_found) struct cam_packet *packet, bool *mem_found, bool *ctx_found, uint32_t *resource_type, struct cam_smmu_pf_info *pf_info) { int rc = 0; struct cam_hw_cmd_args cmd_args; Loading @@ -1021,9 +1021,14 @@ int32_t cam_context_dump_pf_info_to_hw(struct cam_context *ctx, cmd_args.ctxt_to_hw_map = ctx->ctxt_to_hw_map; cmd_args.cmd_type = CAM_HW_MGR_CMD_DUMP_PF_INFO; cmd_args.u.pf_args.pf_data.packet = packet; cmd_args.u.pf_args.iova = iova; cmd_args.u.pf_args.buf_info = buf_info; cmd_args.u.pf_args.iova = pf_info->iova; cmd_args.u.pf_args.buf_info = pf_info->buf_info; cmd_args.u.pf_args.mem_found = mem_found; cmd_args.u.pf_args.ctx_found = ctx_found; cmd_args.u.pf_args.resource_type = resource_type; cmd_args.u.pf_args.bid = pf_info->bid; cmd_args.u.pf_args.pid = pf_info->pid; cmd_args.u.pf_args.mid = pf_info->mid; ctx->hw_mgr_intf->hw_cmd(ctx->hw_mgr_intf->hw_mgr_priv, &cmd_args); } Loading drivers/cam_core/cam_context_utils.h +4 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #define _CAM_CONTEXT_UTILS_H_ #include <linux/types.h> #include "cam_smmu_api.h" int cam_context_buf_done_from_hw(struct cam_context *ctx, void *done_event_data, uint32_t evt_id); Loading @@ -27,8 +28,9 @@ int32_t cam_context_flush_ctx_to_hw(struct cam_context *ctx); int32_t cam_context_flush_req_to_hw(struct cam_context *ctx, struct cam_flush_dev_cmd *cmd); int32_t cam_context_dump_pf_info_to_hw(struct cam_context *ctx, struct cam_packet *packet, unsigned long iova, uint32_t buf_info, bool *mem_found); struct cam_packet *packet, bool *mem_found, bool *ctx_found, uint32_t *resource_type, struct cam_smmu_pf_info *pf_info); int32_t cam_context_dump_hw_acq_info(struct cam_context *ctx); int32_t cam_context_dump_dev_to_hw(struct cam_context *ctx, struct cam_dump_req_cmd *cmd); Loading Loading
drivers/cam_cdm/cam_cdm_hw_core.c +5 −7 Original line number Diff line number Diff line Loading @@ -1224,16 +1224,14 @@ static void cam_hw_cdm_work(struct work_struct *work) } static void cam_hw_cdm_iommu_fault_handler(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token, uint32_t buf_info) static void cam_hw_cdm_iommu_fault_handler(struct cam_smmu_pf_info *pf_info) { struct cam_hw_info *cdm_hw = NULL; struct cam_cdm *core = NULL; int i; if (token) { cdm_hw = (struct cam_hw_info *)token; if (pf_info->token) { cdm_hw = (struct cam_hw_info *)pf_info->token; core = (struct cam_cdm *)cdm_hw->core_info; set_bit(CAM_CDM_ERROR_HW_STATUS, &core->cdm_status); mutex_lock(&cdm_hw->hw_mutex); Loading @@ -1254,9 +1252,9 @@ static void cam_hw_cdm_iommu_fault_handler(struct iommu_domain *domain, mutex_unlock(&core->bl_fifo[i].fifo_lock); mutex_unlock(&cdm_hw->hw_mutex); CAM_ERR_RATE_LIMIT(CAM_CDM, "Page fault iova addr %pK\n", (void *)iova); (void *)pf_info->iova); cam_cdm_notify_clients(cdm_hw, CAM_CDM_CB_STATUS_PAGEFAULT, (void *)iova); (void *)pf_info->iova); clear_bit(CAM_CDM_ERROR_HW_STATUS, &core->cdm_status); } else { CAM_ERR(CAM_CDM, "Invalid token"); Loading
drivers/cam_core/cam_context.c +3 −3 Original line number Diff line number Diff line Loading @@ -287,8 +287,8 @@ int cam_context_handle_crm_dump_req(struct cam_context *ctx, return rc; } int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova, uint32_t buf_info) int cam_context_dump_pf_info(struct cam_context *ctx, struct cam_smmu_pf_info *pf_info) { int rc = 0; Loading @@ -301,7 +301,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova, (ctx->state < CAM_CTX_STATE_MAX)) { if (ctx->state_machine[ctx->state].pagefault_ops) { rc = ctx->state_machine[ctx->state].pagefault_ops( ctx, iova, buf_info); ctx, pf_info); } else { CAM_WARN(CAM_CORE, "No dump ctx in dev %d, state %d", ctx->dev_hdl, ctx->state); Loading
drivers/cam_core/cam_context.h +4 −4 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/kref.h> #include "cam_req_mgr_interface.h" #include "cam_hw_mgr_intf.h" #include "cam_smmu_api.h" /* Forward declarations */ struct cam_context; Loading Loading @@ -360,12 +361,11 @@ int cam_context_handle_crm_dump_req(struct cam_context *ctx, * @brief: Handle dump active request request command * * @ctx: Object pointer for cam_context * @iova: Page fault address * @buf_info: Information about closest memory handle * @pf_info: Smmu page fault info * */ int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova, uint32_t buf_info); int cam_context_dump_pf_info(struct cam_context *ctx, struct cam_smmu_pf_info *pf_info); /** * cam_context_handle_acquire_dev() Loading
drivers/cam_core/cam_context_utils.c +9 −4 Original line number Diff line number Diff line Loading @@ -998,8 +998,8 @@ int32_t cam_context_stop_dev_to_hw(struct cam_context *ctx) } int32_t cam_context_dump_pf_info_to_hw(struct cam_context *ctx, struct cam_packet *packet, unsigned long iova, uint32_t buf_info, bool *mem_found) struct cam_packet *packet, bool *mem_found, bool *ctx_found, uint32_t *resource_type, struct cam_smmu_pf_info *pf_info) { int rc = 0; struct cam_hw_cmd_args cmd_args; Loading @@ -1021,9 +1021,14 @@ int32_t cam_context_dump_pf_info_to_hw(struct cam_context *ctx, cmd_args.ctxt_to_hw_map = ctx->ctxt_to_hw_map; cmd_args.cmd_type = CAM_HW_MGR_CMD_DUMP_PF_INFO; cmd_args.u.pf_args.pf_data.packet = packet; cmd_args.u.pf_args.iova = iova; cmd_args.u.pf_args.buf_info = buf_info; cmd_args.u.pf_args.iova = pf_info->iova; cmd_args.u.pf_args.buf_info = pf_info->buf_info; cmd_args.u.pf_args.mem_found = mem_found; cmd_args.u.pf_args.ctx_found = ctx_found; cmd_args.u.pf_args.resource_type = resource_type; cmd_args.u.pf_args.bid = pf_info->bid; cmd_args.u.pf_args.pid = pf_info->pid; cmd_args.u.pf_args.mid = pf_info->mid; ctx->hw_mgr_intf->hw_cmd(ctx->hw_mgr_intf->hw_mgr_priv, &cmd_args); } Loading
drivers/cam_core/cam_context_utils.h +4 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #define _CAM_CONTEXT_UTILS_H_ #include <linux/types.h> #include "cam_smmu_api.h" int cam_context_buf_done_from_hw(struct cam_context *ctx, void *done_event_data, uint32_t evt_id); Loading @@ -27,8 +28,9 @@ int32_t cam_context_flush_ctx_to_hw(struct cam_context *ctx); int32_t cam_context_flush_req_to_hw(struct cam_context *ctx, struct cam_flush_dev_cmd *cmd); int32_t cam_context_dump_pf_info_to_hw(struct cam_context *ctx, struct cam_packet *packet, unsigned long iova, uint32_t buf_info, bool *mem_found); struct cam_packet *packet, bool *mem_found, bool *ctx_found, uint32_t *resource_type, struct cam_smmu_pf_info *pf_info); int32_t cam_context_dump_hw_acq_info(struct cam_context *ctx); int32_t cam_context_dump_dev_to_hw(struct cam_context *ctx, struct cam_dump_req_cmd *cmd); Loading