Loading drivers/media/platform/msm/vidc/hfi_response_handler.c +16 −0 Original line number Diff line number Diff line Loading @@ -1369,6 +1369,22 @@ static int hfi_process_session_flush_done(u32 device_id, cmd_done.status = hfi_map_err_status(pkt->error_type); cmd_done.size = sizeof(u32); switch (pkt->flush_type) { case HFI_FLUSH_OUTPUT: cmd_done.data.flush_type = HAL_FLUSH_OUTPUT; break; case HFI_FLUSH_INPUT: cmd_done.data.flush_type = HAL_FLUSH_INPUT; break; case HFI_FLUSH_ALL: cmd_done.data.flush_type = HAL_FLUSH_ALL; break; default: dprintk(VIDC_ERR, "%s: invalid flush type!", __func__); return -EINVAL; } *info = (struct msm_vidc_cb_info) { .response_type = HAL_SESSION_FLUSH_DONE, .response.cmd = cmd_done, Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +28 −2 Original line number Diff line number Diff line Loading @@ -1506,6 +1506,9 @@ static void handle_session_flush(enum hal_command_response cmd, void *data) { struct msm_vidc_cb_cmd_done *response = data; struct msm_vidc_inst *inst; struct v4l2_event flush_event = {0}; u32 *ptr = NULL; enum hal_flush flush_type; int rc; if (!response) { Loading Loading @@ -1533,8 +1536,31 @@ static void handle_session_flush(enum hal_command_response cmd, void *data) } } atomic_dec(&inst->in_flush); dprintk(VIDC_DBG, "Notify flush complete to client\n"); msm_vidc_queue_v4l2_event(inst, V4L2_EVENT_MSM_VIDC_FLUSH_DONE); flush_event.type = V4L2_EVENT_MSM_VIDC_FLUSH_DONE; ptr = (u32 *)flush_event.u.data; flush_type = response->data.flush_type; switch (flush_type) { case HAL_FLUSH_INPUT: ptr[0] = V4L2_QCOM_CMD_FLUSH_OUTPUT; break; case HAL_FLUSH_OUTPUT: ptr[0] = V4L2_QCOM_CMD_FLUSH_CAPTURE; break; case HAL_FLUSH_ALL: ptr[0] |= V4L2_QCOM_CMD_FLUSH_CAPTURE; ptr[0] |= V4L2_QCOM_CMD_FLUSH_OUTPUT; break; default: dprintk(VIDC_ERR, "Invalid flush type received!"); goto exit; } dprintk(VIDC_DBG, "Notify flush complete, flush_type: %x\n", flush_type); v4l2_event_queue_fh(&inst->event_handler, &flush_event); exit: put_inst(inst); } Loading drivers/media/platform/msm/vidc/vidc_hfi_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -1351,6 +1351,7 @@ struct msm_vidc_cb_cmd_done { struct vidc_hal_session_init_done session_init_done; struct hal_buffer_info buffer_info; union hal_get_property property; enum hal_flush flush_type; } data; }; Loading Loading
drivers/media/platform/msm/vidc/hfi_response_handler.c +16 −0 Original line number Diff line number Diff line Loading @@ -1369,6 +1369,22 @@ static int hfi_process_session_flush_done(u32 device_id, cmd_done.status = hfi_map_err_status(pkt->error_type); cmd_done.size = sizeof(u32); switch (pkt->flush_type) { case HFI_FLUSH_OUTPUT: cmd_done.data.flush_type = HAL_FLUSH_OUTPUT; break; case HFI_FLUSH_INPUT: cmd_done.data.flush_type = HAL_FLUSH_INPUT; break; case HFI_FLUSH_ALL: cmd_done.data.flush_type = HAL_FLUSH_ALL; break; default: dprintk(VIDC_ERR, "%s: invalid flush type!", __func__); return -EINVAL; } *info = (struct msm_vidc_cb_info) { .response_type = HAL_SESSION_FLUSH_DONE, .response.cmd = cmd_done, Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +28 −2 Original line number Diff line number Diff line Loading @@ -1506,6 +1506,9 @@ static void handle_session_flush(enum hal_command_response cmd, void *data) { struct msm_vidc_cb_cmd_done *response = data; struct msm_vidc_inst *inst; struct v4l2_event flush_event = {0}; u32 *ptr = NULL; enum hal_flush flush_type; int rc; if (!response) { Loading Loading @@ -1533,8 +1536,31 @@ static void handle_session_flush(enum hal_command_response cmd, void *data) } } atomic_dec(&inst->in_flush); dprintk(VIDC_DBG, "Notify flush complete to client\n"); msm_vidc_queue_v4l2_event(inst, V4L2_EVENT_MSM_VIDC_FLUSH_DONE); flush_event.type = V4L2_EVENT_MSM_VIDC_FLUSH_DONE; ptr = (u32 *)flush_event.u.data; flush_type = response->data.flush_type; switch (flush_type) { case HAL_FLUSH_INPUT: ptr[0] = V4L2_QCOM_CMD_FLUSH_OUTPUT; break; case HAL_FLUSH_OUTPUT: ptr[0] = V4L2_QCOM_CMD_FLUSH_CAPTURE; break; case HAL_FLUSH_ALL: ptr[0] |= V4L2_QCOM_CMD_FLUSH_CAPTURE; ptr[0] |= V4L2_QCOM_CMD_FLUSH_OUTPUT; break; default: dprintk(VIDC_ERR, "Invalid flush type received!"); goto exit; } dprintk(VIDC_DBG, "Notify flush complete, flush_type: %x\n", flush_type); v4l2_event_queue_fh(&inst->event_handler, &flush_event); exit: put_inst(inst); } Loading
drivers/media/platform/msm/vidc/vidc_hfi_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -1351,6 +1351,7 @@ struct msm_vidc_cb_cmd_done { struct vidc_hal_session_init_done session_init_done; struct hal_buffer_info buffer_info; union hal_get_property property; enum hal_flush flush_type; } data; }; Loading