Loading arch/arm64/boot/dts/qcom/sm8150-vidc.dtsi +13 −13 Original line number Diff line number Diff line Loading @@ -90,7 +90,17 @@ iommus = <&apps_smmu 0x1300 0x60>; buffer-types = <0xfff>; virtual-addr-pool = <0x70800000 0x6f800000>; virtual-addr-pool = <0x25800000 0xba800000>; }; secure_non_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_non_pixel"; iommus = <&apps_smmu 0x1304 0x60>; buffer-types = <0x480>; virtual-addr-pool = <0x1000000 0x24800000>; qcom,secure-context-bank; }; secure_bitstream_cb { Loading @@ -99,7 +109,7 @@ iommus = <&apps_smmu 0x1301 0x4>; buffer-types = <0x241>; virtual-addr-pool = <0x4b000000 0x25800000>; virtual-addr-pool = <0x0 0xe0000000>; qcom,secure-context-bank; }; Loading @@ -109,17 +119,7 @@ iommus = <&apps_smmu 0x1303 0x20>; buffer-types = <0x106>; virtual-addr-pool = <0x25800000 0x25800000>; qcom,secure-context-bank; }; secure_non_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_non_pixel"; iommus = <&apps_smmu 0x1304 0x60>; buffer-types = <0x480>; virtual-addr-pool = <0x1000000 0x24800000>; virtual-addr-pool = <0x0 0xe0000000>; qcom,secure-context-bank; }; Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +15 −10 Original line number Diff line number Diff line Loading @@ -1616,7 +1616,8 @@ static void handle_event_change(enum hal_command_response cmd, void *data) planes[0] = event_notify->packet_buffer; planes[1] = event_notify->extra_data_buffer; mbuf = msm_comm_get_buffer_using_device_planes(inst, planes); mbuf = msm_comm_get_buffer_using_device_planes(inst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, planes); if (!mbuf || !kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: data_addr %x, extradata_addr %x not found\n", Loading Loading @@ -2376,7 +2377,8 @@ static void handle_ebd(enum hal_command_response cmd, void *data) planes[0] = empty_buf_done->packet_buffer; planes[1] = empty_buf_done->extra_data_buffer; mbuf = msm_comm_get_buffer_using_device_planes(inst, planes); mbuf = msm_comm_get_buffer_using_device_planes(inst, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, planes); if (!mbuf || !kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: data_addr %x, extradata_addr %x not found\n", Loading Loading @@ -2522,7 +2524,8 @@ static void handle_fbd(enum hal_command_response cmd, void *data) buffer_type = msm_comm_get_hal_output_buffer(inst); if (fill_buf_done->buffer_type == buffer_type) { mbuf = msm_comm_get_buffer_using_device_planes(inst, planes); mbuf = msm_comm_get_buffer_using_device_planes(inst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, planes); if (!mbuf || !kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: data_addr %x, extradata_addr %x not found\n", Loading Loading @@ -6049,7 +6052,7 @@ bool msm_comm_compare_dma_planes(struct msm_vidc_inst *inst, bool msm_comm_compare_device_plane(struct msm_vidc_buffer *mbuf, u32 *planes, u32 i) u32 type, u32 *planes, u32 i) { if (!mbuf || !planes) { dprintk(VIDC_ERR, "%s: invalid params, %pK %pK\n", Loading @@ -6057,14 +6060,15 @@ bool msm_comm_compare_device_plane(struct msm_vidc_buffer *mbuf, return false; } if (mbuf->smem[i].device_addr == planes[i]) if (mbuf->vvb.vb2_buf.type == type && mbuf->smem[i].device_addr == planes[i]) return true; return false; } bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, u32 *planes) u32 type, u32 *planes) { int i = 0; Loading @@ -6072,7 +6076,7 @@ bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, return false; for (i = 0; i < mbuf->vvb.vb2_buf.num_planes; i++) { if (!msm_comm_compare_device_plane(mbuf, planes, i)) if (!msm_comm_compare_device_plane(mbuf, type, planes, i)) return false; } Loading @@ -6080,7 +6084,7 @@ bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, } struct msm_vidc_buffer *msm_comm_get_buffer_using_device_planes( struct msm_vidc_inst *inst, u32 *planes) struct msm_vidc_inst *inst, u32 type, u32 *planes) { struct msm_vidc_buffer *mbuf; bool found = false; Loading @@ -6088,7 +6092,7 @@ struct msm_vidc_buffer *msm_comm_get_buffer_using_device_planes( mutex_lock(&inst->registeredbufs.lock); found = false; list_for_each_entry(mbuf, &inst->registeredbufs.list, list) { if (msm_comm_compare_device_planes(mbuf, planes)) { if (msm_comm_compare_device_planes(mbuf, type, planes)) { found = true; break; } Loading Loading @@ -6529,7 +6533,8 @@ void handle_release_buffer_reference(struct msm_vidc_inst *inst, */ found = false; list_for_each_entry(temp, &inst->registeredbufs.list, list) { if (msm_comm_compare_device_plane(temp, planes, 0)) { if (msm_comm_compare_device_plane(temp, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, planes, 0)) { mbuf = temp; found = true; break; Loading drivers/media/platform/msm/vidc/msm_vidc_common.h +3 −3 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ u32 get_frame_size_p010(int plane, u32 height, u32 width); struct vb2_buffer *msm_comm_get_vb_using_vidc_buffer( struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf); struct msm_vidc_buffer *msm_comm_get_buffer_using_device_planes( struct msm_vidc_inst *inst, u32 *planes); struct msm_vidc_inst *inst, u32 type, u32 *planes); struct msm_vidc_buffer *msm_comm_get_vidc_buffer(struct msm_vidc_inst *inst, struct vb2_buffer *vb2); void msm_comm_put_vidc_buffer(struct msm_vidc_inst *inst, Loading @@ -205,9 +205,9 @@ bool msm_comm_compare_vb2_plane(struct msm_vidc_inst *inst, bool msm_comm_compare_vb2_planes(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf, struct vb2_buffer *vb2); bool msm_comm_compare_device_plane(struct msm_vidc_buffer *mbuf, u32 *planes, u32 i); u32 type, u32 *planes, u32 i); bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, u32 *planes); u32 type, u32 *planes); int msm_comm_qbuf_cache_operations(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf); int msm_comm_dqbuf_cache_operations(struct msm_vidc_inst *inst, Loading Loading
arch/arm64/boot/dts/qcom/sm8150-vidc.dtsi +13 −13 Original line number Diff line number Diff line Loading @@ -90,7 +90,17 @@ iommus = <&apps_smmu 0x1300 0x60>; buffer-types = <0xfff>; virtual-addr-pool = <0x70800000 0x6f800000>; virtual-addr-pool = <0x25800000 0xba800000>; }; secure_non_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_non_pixel"; iommus = <&apps_smmu 0x1304 0x60>; buffer-types = <0x480>; virtual-addr-pool = <0x1000000 0x24800000>; qcom,secure-context-bank; }; secure_bitstream_cb { Loading @@ -99,7 +109,7 @@ iommus = <&apps_smmu 0x1301 0x4>; buffer-types = <0x241>; virtual-addr-pool = <0x4b000000 0x25800000>; virtual-addr-pool = <0x0 0xe0000000>; qcom,secure-context-bank; }; Loading @@ -109,17 +119,7 @@ iommus = <&apps_smmu 0x1303 0x20>; buffer-types = <0x106>; virtual-addr-pool = <0x25800000 0x25800000>; qcom,secure-context-bank; }; secure_non_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_non_pixel"; iommus = <&apps_smmu 0x1304 0x60>; buffer-types = <0x480>; virtual-addr-pool = <0x1000000 0x24800000>; virtual-addr-pool = <0x0 0xe0000000>; qcom,secure-context-bank; }; Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +15 −10 Original line number Diff line number Diff line Loading @@ -1616,7 +1616,8 @@ static void handle_event_change(enum hal_command_response cmd, void *data) planes[0] = event_notify->packet_buffer; planes[1] = event_notify->extra_data_buffer; mbuf = msm_comm_get_buffer_using_device_planes(inst, planes); mbuf = msm_comm_get_buffer_using_device_planes(inst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, planes); if (!mbuf || !kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: data_addr %x, extradata_addr %x not found\n", Loading Loading @@ -2376,7 +2377,8 @@ static void handle_ebd(enum hal_command_response cmd, void *data) planes[0] = empty_buf_done->packet_buffer; planes[1] = empty_buf_done->extra_data_buffer; mbuf = msm_comm_get_buffer_using_device_planes(inst, planes); mbuf = msm_comm_get_buffer_using_device_planes(inst, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, planes); if (!mbuf || !kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: data_addr %x, extradata_addr %x not found\n", Loading Loading @@ -2522,7 +2524,8 @@ static void handle_fbd(enum hal_command_response cmd, void *data) buffer_type = msm_comm_get_hal_output_buffer(inst); if (fill_buf_done->buffer_type == buffer_type) { mbuf = msm_comm_get_buffer_using_device_planes(inst, planes); mbuf = msm_comm_get_buffer_using_device_planes(inst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, planes); if (!mbuf || !kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: data_addr %x, extradata_addr %x not found\n", Loading Loading @@ -6049,7 +6052,7 @@ bool msm_comm_compare_dma_planes(struct msm_vidc_inst *inst, bool msm_comm_compare_device_plane(struct msm_vidc_buffer *mbuf, u32 *planes, u32 i) u32 type, u32 *planes, u32 i) { if (!mbuf || !planes) { dprintk(VIDC_ERR, "%s: invalid params, %pK %pK\n", Loading @@ -6057,14 +6060,15 @@ bool msm_comm_compare_device_plane(struct msm_vidc_buffer *mbuf, return false; } if (mbuf->smem[i].device_addr == planes[i]) if (mbuf->vvb.vb2_buf.type == type && mbuf->smem[i].device_addr == planes[i]) return true; return false; } bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, u32 *planes) u32 type, u32 *planes) { int i = 0; Loading @@ -6072,7 +6076,7 @@ bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, return false; for (i = 0; i < mbuf->vvb.vb2_buf.num_planes; i++) { if (!msm_comm_compare_device_plane(mbuf, planes, i)) if (!msm_comm_compare_device_plane(mbuf, type, planes, i)) return false; } Loading @@ -6080,7 +6084,7 @@ bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, } struct msm_vidc_buffer *msm_comm_get_buffer_using_device_planes( struct msm_vidc_inst *inst, u32 *planes) struct msm_vidc_inst *inst, u32 type, u32 *planes) { struct msm_vidc_buffer *mbuf; bool found = false; Loading @@ -6088,7 +6092,7 @@ struct msm_vidc_buffer *msm_comm_get_buffer_using_device_planes( mutex_lock(&inst->registeredbufs.lock); found = false; list_for_each_entry(mbuf, &inst->registeredbufs.list, list) { if (msm_comm_compare_device_planes(mbuf, planes)) { if (msm_comm_compare_device_planes(mbuf, type, planes)) { found = true; break; } Loading Loading @@ -6529,7 +6533,8 @@ void handle_release_buffer_reference(struct msm_vidc_inst *inst, */ found = false; list_for_each_entry(temp, &inst->registeredbufs.list, list) { if (msm_comm_compare_device_plane(temp, planes, 0)) { if (msm_comm_compare_device_plane(temp, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, planes, 0)) { mbuf = temp; found = true; break; Loading
drivers/media/platform/msm/vidc/msm_vidc_common.h +3 −3 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ u32 get_frame_size_p010(int plane, u32 height, u32 width); struct vb2_buffer *msm_comm_get_vb_using_vidc_buffer( struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf); struct msm_vidc_buffer *msm_comm_get_buffer_using_device_planes( struct msm_vidc_inst *inst, u32 *planes); struct msm_vidc_inst *inst, u32 type, u32 *planes); struct msm_vidc_buffer *msm_comm_get_vidc_buffer(struct msm_vidc_inst *inst, struct vb2_buffer *vb2); void msm_comm_put_vidc_buffer(struct msm_vidc_inst *inst, Loading @@ -205,9 +205,9 @@ bool msm_comm_compare_vb2_plane(struct msm_vidc_inst *inst, bool msm_comm_compare_vb2_planes(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf, struct vb2_buffer *vb2); bool msm_comm_compare_device_plane(struct msm_vidc_buffer *mbuf, u32 *planes, u32 i); u32 type, u32 *planes, u32 i); bool msm_comm_compare_device_planes(struct msm_vidc_buffer *mbuf, u32 *planes); u32 type, u32 *planes); int msm_comm_qbuf_cache_operations(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf); int msm_comm_dqbuf_cache_operations(struct msm_vidc_inst *inst, Loading