Loading drivers/media/platform/msm/vidc/msm_smem.c +10 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ struct smem_client { void *clnt; struct msm_vidc_platform_resources *res; enum session_type session_type; bool tme_encode_mode; }; static int msm_ion_get_device_address(struct smem_client *smem_client, Loading Loading @@ -771,6 +772,13 @@ void *msm_smem_new_client(enum smem_type mtype, return client; } void msm_smem_set_tme_encode_mode(struct smem_client *client, bool enable) { if (!client) return; client->tme_encode_mode = enable; } int msm_smem_alloc(struct smem_client *client, size_t size, u32 align, u32 flags, enum hal_buffer buffer_type, int map_kernel, struct msm_smem *smem) Loading Loading @@ -863,7 +871,8 @@ struct context_bank_info *msm_smem_get_context_bank(void *clt, if (is_secure && client->session_type == MSM_VIDC_ENCODER) { if (buffer_type == HAL_BUFFER_INPUT) buffer_type = HAL_BUFFER_OUTPUT; else if (buffer_type == HAL_BUFFER_OUTPUT) else if (buffer_type == HAL_BUFFER_OUTPUT && !client->tme_encode_mode) buffer_type = HAL_BUFFER_INPUT; } Loading drivers/media/platform/msm/vidc/msm_venc.c +5 −0 Original line number Diff line number Diff line Loading @@ -2691,6 +2691,11 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) memcpy(&inst->fmts[fmt->type], fmt, sizeof(struct msm_vidc_format)); if (get_hal_codec(inst->fmts[CAPTURE_PORT].fourcc) == HAL_VIDEO_CODEC_TME) { msm_smem_set_tme_encode_mode(inst->mem_client, true); } rc = msm_comm_try_state(inst, MSM_VIDC_OPEN_DONE); if (rc) { dprintk(VIDC_ERR, "Failed to open instance\n"); Loading drivers/media/platform/msm/vidc/msm_vidc_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -457,6 +457,7 @@ struct msm_vidc_buffer { void msm_comm_handle_thermal_event(void); void *msm_smem_new_client(enum smem_type mtype, void *platform_resources, enum session_type stype); void msm_smem_set_tme_encode_mode(struct smem_client *client, bool enable); int msm_smem_alloc(struct smem_client *client, size_t size, u32 align, u32 flags, enum hal_buffer buffer_type, int map_kernel, struct msm_smem *smem); Loading Loading
drivers/media/platform/msm/vidc/msm_smem.c +10 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ struct smem_client { void *clnt; struct msm_vidc_platform_resources *res; enum session_type session_type; bool tme_encode_mode; }; static int msm_ion_get_device_address(struct smem_client *smem_client, Loading Loading @@ -771,6 +772,13 @@ void *msm_smem_new_client(enum smem_type mtype, return client; } void msm_smem_set_tme_encode_mode(struct smem_client *client, bool enable) { if (!client) return; client->tme_encode_mode = enable; } int msm_smem_alloc(struct smem_client *client, size_t size, u32 align, u32 flags, enum hal_buffer buffer_type, int map_kernel, struct msm_smem *smem) Loading Loading @@ -863,7 +871,8 @@ struct context_bank_info *msm_smem_get_context_bank(void *clt, if (is_secure && client->session_type == MSM_VIDC_ENCODER) { if (buffer_type == HAL_BUFFER_INPUT) buffer_type = HAL_BUFFER_OUTPUT; else if (buffer_type == HAL_BUFFER_OUTPUT) else if (buffer_type == HAL_BUFFER_OUTPUT && !client->tme_encode_mode) buffer_type = HAL_BUFFER_INPUT; } Loading
drivers/media/platform/msm/vidc/msm_venc.c +5 −0 Original line number Diff line number Diff line Loading @@ -2691,6 +2691,11 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f) memcpy(&inst->fmts[fmt->type], fmt, sizeof(struct msm_vidc_format)); if (get_hal_codec(inst->fmts[CAPTURE_PORT].fourcc) == HAL_VIDEO_CODEC_TME) { msm_smem_set_tme_encode_mode(inst->mem_client, true); } rc = msm_comm_try_state(inst, MSM_VIDC_OPEN_DONE); if (rc) { dprintk(VIDC_ERR, "Failed to open instance\n"); Loading
drivers/media/platform/msm/vidc/msm_vidc_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -457,6 +457,7 @@ struct msm_vidc_buffer { void msm_comm_handle_thermal_event(void); void *msm_smem_new_client(enum smem_type mtype, void *platform_resources, enum session_type stype); void msm_smem_set_tme_encode_mode(struct smem_client *client, bool enable); int msm_smem_alloc(struct smem_client *client, size_t size, u32 align, u32 flags, enum hal_buffer buffer_type, int map_kernel, struct msm_smem *smem); Loading