Loading drivers/media/platform/msm/vidc_3x/msm_vidc.c +9 −0 Original line number Diff line number Diff line Loading @@ -948,6 +948,15 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b) b->m.planes[i].m.userptr = buffer_info->uvaddr[i]; b->m.planes[i].reserved[0] = buffer_info->fd[i]; b->m.planes[i].reserved[1] = buffer_info->buff_off[i]; b->m.planes[i].reserved[2] = buffer_info->crop_data.nLeft; b->m.planes[i].reserved[3] = buffer_info->crop_data.nTop; b->m.planes[i].reserved[4] = buffer_info->crop_data.nWidth; b->m.planes[i].reserved[5] = buffer_info->crop_data.nHeight; b->m.planes[i].reserved[6] = buffer_info->crop_data.width_height[0]; b->m.planes[i].reserved[7] = buffer_info->crop_data.width_height[1]; if (!(inst->flags & VIDC_SECURE) && !b->m.planes[i].m.userptr) { dprintk(VIDC_ERR, "%s: Failed to find user virtual address, %#lx, %d, %d\n", Loading drivers/media/platform/msm/vidc_3x/msm_vidc_common.c +21 −0 Original line number Diff line number Diff line Loading @@ -2005,6 +2005,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data) int64_t time_usec = 0; static int first_enc_frame = 1; struct vb2_v4l2_buffer *vbuf = NULL; struct buffer_info *buffer_info = NULL; if (!response) { dprintk(VIDC_ERR, "Invalid response from vidc_hal\n"); Loading Loading @@ -2046,6 +2047,26 @@ static void handle_fbd(enum hal_command_response cmd, void *data) "fbd:Overflow bytesused = %d; length = %d\n", vb->planes[0].bytesused, vb->planes[0].length); buffer_info = device_to_uvaddr(&inst->registeredbufs, fill_buf_done->packet_buffer1); if (!buffer_info) { dprintk(VIDC_ERR, "%s buffer not found in registered list\n", __func__); return; } buffer_info->crop_data.nLeft = fill_buf_done->start_x_coord; buffer_info->crop_data.nTop = fill_buf_done->start_y_coord; buffer_info->crop_data.nWidth = fill_buf_done->frame_width; buffer_info->crop_data.nHeight = fill_buf_done->frame_height; buffer_info->crop_data.width_height[0] = inst->prop.width[CAPTURE_PORT]; buffer_info->crop_data.width_height[1] = inst->prop.height[CAPTURE_PORT]; if (!(fill_buf_done->flags1 & HAL_BUFFERFLAG_TIMESTAMPINVALID)) { time_usec = fill_buf_done->timestamp_hi; Loading drivers/media/platform/msm/vidc_3x/msm_vidc_internal.h +9 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,14 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst); int msm_vidc_check_scaling_supported(struct msm_vidc_inst *inst); void msm_vidc_queue_v4l2_event(struct msm_vidc_inst *inst, int event_type); struct crop_info { u32 nLeft; u32 nTop; u32 nWidth; u32 nHeight; u32 width_height[MAX_PORT_NUM]; }; struct buffer_info { struct list_head list; int type; Loading @@ -347,6 +355,7 @@ struct buffer_info { bool mapped[VIDEO_MAX_PLANES]; int same_fd_ref[VIDEO_MAX_PLANES]; struct timeval timestamp; struct crop_info crop_data; }; struct buffer_info *device_to_uvaddr(struct msm_vidc_list *buf_list, Loading Loading
drivers/media/platform/msm/vidc_3x/msm_vidc.c +9 −0 Original line number Diff line number Diff line Loading @@ -948,6 +948,15 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b) b->m.planes[i].m.userptr = buffer_info->uvaddr[i]; b->m.planes[i].reserved[0] = buffer_info->fd[i]; b->m.planes[i].reserved[1] = buffer_info->buff_off[i]; b->m.planes[i].reserved[2] = buffer_info->crop_data.nLeft; b->m.planes[i].reserved[3] = buffer_info->crop_data.nTop; b->m.planes[i].reserved[4] = buffer_info->crop_data.nWidth; b->m.planes[i].reserved[5] = buffer_info->crop_data.nHeight; b->m.planes[i].reserved[6] = buffer_info->crop_data.width_height[0]; b->m.planes[i].reserved[7] = buffer_info->crop_data.width_height[1]; if (!(inst->flags & VIDC_SECURE) && !b->m.planes[i].m.userptr) { dprintk(VIDC_ERR, "%s: Failed to find user virtual address, %#lx, %d, %d\n", Loading
drivers/media/platform/msm/vidc_3x/msm_vidc_common.c +21 −0 Original line number Diff line number Diff line Loading @@ -2005,6 +2005,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data) int64_t time_usec = 0; static int first_enc_frame = 1; struct vb2_v4l2_buffer *vbuf = NULL; struct buffer_info *buffer_info = NULL; if (!response) { dprintk(VIDC_ERR, "Invalid response from vidc_hal\n"); Loading Loading @@ -2046,6 +2047,26 @@ static void handle_fbd(enum hal_command_response cmd, void *data) "fbd:Overflow bytesused = %d; length = %d\n", vb->planes[0].bytesused, vb->planes[0].length); buffer_info = device_to_uvaddr(&inst->registeredbufs, fill_buf_done->packet_buffer1); if (!buffer_info) { dprintk(VIDC_ERR, "%s buffer not found in registered list\n", __func__); return; } buffer_info->crop_data.nLeft = fill_buf_done->start_x_coord; buffer_info->crop_data.nTop = fill_buf_done->start_y_coord; buffer_info->crop_data.nWidth = fill_buf_done->frame_width; buffer_info->crop_data.nHeight = fill_buf_done->frame_height; buffer_info->crop_data.width_height[0] = inst->prop.width[CAPTURE_PORT]; buffer_info->crop_data.width_height[1] = inst->prop.height[CAPTURE_PORT]; if (!(fill_buf_done->flags1 & HAL_BUFFERFLAG_TIMESTAMPINVALID)) { time_usec = fill_buf_done->timestamp_hi; Loading
drivers/media/platform/msm/vidc_3x/msm_vidc_internal.h +9 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,14 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst); int msm_vidc_check_scaling_supported(struct msm_vidc_inst *inst); void msm_vidc_queue_v4l2_event(struct msm_vidc_inst *inst, int event_type); struct crop_info { u32 nLeft; u32 nTop; u32 nWidth; u32 nHeight; u32 width_height[MAX_PORT_NUM]; }; struct buffer_info { struct list_head list; int type; Loading @@ -347,6 +355,7 @@ struct buffer_info { bool mapped[VIDEO_MAX_PLANES]; int same_fd_ref[VIDEO_MAX_PLANES]; struct timeval timestamp; struct crop_info crop_data; }; struct buffer_info *device_to_uvaddr(struct msm_vidc_list *buf_list, Loading