Skip to contentSkip to conversation

TI Video Decoder driver upstreaming to v5.14-rc6 kernel

PATCH NAK [email protected] 8 participants 48 messages Aug 18, 2021 – Sep 20, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover TI Video Decoder driver upstreaming to v5.14-rc6 kernel

From: Sidraya <[email protected]>

This series of patches implements v4l2 based Decoder driver for H264, H265 and MJPEG decoding standards.This Driver is for D5520 H/W decoder on DRA8x SOC of J721e platform.
This driver has been tested on v5.14-rc6 kernel for following decoding standards on v4l2 based Gstreamer 1.16 plug-in.
1. H264
2. H265
3. MJPEG

Note:
Currently Driver uses list, map and queue custom data structure APIs implementation and IOMMU custom framework.We are working on replacing customised APIs with Linux kernel generic framework APIs. Meanwhile would like to address review comments from reviewers before merging to main media/platform subsystem.

Sidraya (30):
dt-bindings: Add binding for img,d5500-vxd for DRA8x
v4l: vxd-dec: Create mmu programming helper library
v4l: vxd-dec: Create vxd_dec Mem Manager helper library
v4l: vxd-dec: Add vxd helper library
v4l: vxd-dec: Add IMG VXD Video Decoder mem to mem drive
v4l: vxd-dec: Add hardware control modules
v4l: vxd-dec: Add vxd core module
v4l: vxd-dec: Add translation control modules
v4l: vxd-dec: Add idgen api modules
v4l: vxd-dec: Add utility modules
v4l: vxd-dec: Add TALMMU module
v4l: vxd-dec: Add VDEC MMU wrapper
v4l: vxd-dec: Add Bistream Preparser (BSPP) module
v4l: vxd-dec: Add common headers
v4l: vxd-dec: Add firmware interface headers
v4l: vxd-dec: Add pool api modules
v4l: vxd-dec: This patch implements resource manage component
v4l: vxd-dec: This patch implements pixel processing library v4l:vxd-dec:vdecdd utility library
v4l:vxd-dec:Decoder resource component
v4l:vxd-dec:Decoder Core Component
v4l:vxd-dec:vdecdd headers added
v4l:vxd-dec:Decoder Component
v4l:vxd-dec: Add resource manager
v4l: videodev2: Add 10bit definitions for NV12 and NV16 color formats
media: Kconfig: Add Video decoder kconfig and Makefile entries
media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile IMG DEC V4L2 Interface function implementations
arm64: dts: dra82: Add v4l2 vxd_dec device node
ARM64: ti_sdk_arm64_release_defconfig: Enable d5520 video decoder
driver

 .../bindings/media/img,d5520-vxd.yaml         |   52 +
 MAINTAINERS                                   |  114 +
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     |    9 +
 .../configs/ti_sdk_arm64_release_defconfig    | 7407 +++++++++++++++++
 drivers/media/v4l2-core/v4l2-ioctl.c          |    2 +
 drivers/staging/media/Kconfig                 |    2 +
 drivers/staging/media/Makefile                |    1 +
 drivers/staging/media/vxd/common/addr_alloc.c |  499 ++
 drivers/staging/media/vxd/common/addr_alloc.h |  238 +
 drivers/staging/media/vxd/common/dq.c         |  248 +
 drivers/staging/media/vxd/common/dq.h         |   36 +
 drivers/staging/media/vxd/common/hash.c       |  481 ++
 drivers/staging/media/vxd/common/hash.h       |   86 +
 drivers/staging/media/vxd/common/idgen_api.c  |  449 +
 drivers/staging/media/vxd/common/idgen_api.h  |   59 +
 drivers/staging/media/vxd/common/img_errors.h |  104 +
 drivers/staging/media/vxd/common/img_mem.h    |   43 +
 .../staging/media/vxd/common/img_mem_man.c    | 1124 +++
 .../staging/media/vxd/common/img_mem_man.h    |  231 +
 .../media/vxd/common/img_mem_unified.c        |  276 +
 drivers/staging/media/vxd/common/imgmmu.c     |  782 ++
 drivers/staging/media/vxd/common/imgmmu.h     |  180 +
 drivers/staging/media/vxd/common/lst.c        |  119 +
 drivers/staging/media/vxd/common/lst.h        |   37 +
 drivers/staging/media/vxd/common/pool.c       |  228 +
 drivers/staging/media/vxd/common/pool.h       |   66 +
 drivers/staging/media/vxd/common/pool_api.c   |  709 ++
 drivers/staging/media/vxd/common/pool_api.h   |  113 +
 drivers/staging/media/vxd/common/ra.c         |  972 +++
 drivers/staging/media/vxd/common/ra.h         |  200 +
 drivers/staging/media/vxd/common/resource.c   |  576 ++
 drivers/staging/media/vxd/common/resource.h   |   66 +
 drivers/staging/media/vxd/common/rman_api.c   |  620 ++
 drivers/staging/media/vxd/common/rman_api.h   |   66 +
 drivers/staging/media/vxd/common/talmmu_api.c |  753 ++
 drivers/staging/media/vxd/common/talmmu_api.h |  246 +
 drivers/staging/media/vxd/common/vid_buf.h    |   42 +
 drivers/staging/media/vxd/common/work_queue.c |  188 +
 drivers/staging/media/vxd/common/work_queue.h |   66 +
 drivers/staging/media/vxd/decoder/Kconfig     |   13 +
 drivers/staging/media/vxd/decoder/Makefile    |  129 +
 drivers/staging/media/vxd/decoder/bspp.c      | 2479 ++++++
 drivers/staging/media/vxd/decoder/bspp.h      |  363 +
 drivers/staging/media/vxd/decoder/bspp_int.h  |  514 ++
 drivers/staging/media/vxd/decoder/core.c      | 3656 ++++++++
 drivers/staging/media/vxd/decoder/core.h      |   72 +
 .../staging/media/vxd/decoder/dec_resources.c |  554 ++
 .../staging/media/vxd/decoder/dec_resources.h |   46 +
 drivers/staging/media/vxd/decoder/decoder.c   | 4622 ++++++++++
 drivers/staging/media/vxd/decoder/decoder.h   |  375 +
 .../staging/media/vxd/decoder/fw_interface.h  |  818 ++
 drivers/staging/media/vxd/decoder/h264_idx.h  |   60 +
 .../media/vxd/decoder/h264_secure_parser.c    | 3051 +++++++
 .../media/vxd/decoder/h264_secure_parser.h    |  278 +
 drivers/staging/media/vxd/decoder/h264_vlc.h  |  604 ++
 .../staging/media/vxd/decoder/h264fw_data.h   |  652 ++
 .../media/vxd/decoder/h264fw_data_shared.h    |  759 ++
 .../media/vxd/decoder/hevc_secure_parser.c    | 2895 +++++++
 .../media/vxd/decoder/hevc_secure_parser.h    |  455 +
 .../staging/media/vxd/decoder/hevcfw_data.h   |  472 ++
 .../media/vxd/decoder/hevcfw_data_shared.h    |  767 ++
 .../staging/media/vxd/decoder/hw_control.c    | 1211 +++
 .../staging/media/vxd/decoder/hw_control.h    |  144 +
 .../media/vxd/decoder/img_dec_common.h        |  278 +
 .../media/vxd/decoder/img_msvdx_cmds.h        |  279 +
 .../media/vxd/decoder/img_msvdx_core_regs.h   |   22 +
 .../media/vxd/decoder/img_msvdx_vdmc_regs.h   |   26 +
 .../media/vxd/decoder/img_msvdx_vec_regs.h    |   60 +
 .../staging/media/vxd/decoder/img_pixfmts.h   |  195 +
 .../media/vxd/decoder/img_profiles_levels.h   |   33 +
 .../media/vxd/decoder/img_pvdec_core_regs.h   |   60 +
 .../media/vxd/decoder/img_pvdec_pixel_regs.h  |   35 +
 .../media/vxd/decoder/img_pvdec_test_regs.h   |   39 +
 .../media/vxd/decoder/img_vdec_fw_msg.h       |  192 +
 .../vxd/decoder/img_video_bus4_mmu_regs.h     |  120 +
 .../media/vxd/decoder/jpeg_secure_parser.c    |  645 ++
 .../media/vxd/decoder/jpeg_secure_parser.h    |   37 +
 .../staging/media/vxd/decoder/jpegfw_data.h   |   83 +
 .../media/vxd/decoder/jpegfw_data_shared.h    |   84 +
 drivers/staging/media/vxd/decoder/mem_io.h    |   42 +
 drivers/staging/media/vxd/decoder/mmu_defs.h  |   42 +
 drivers/staging/media/vxd/decoder/pixel_api.c |  895 ++
 drivers/staging/media/vxd/decoder/pixel_api.h |  152 +
 .../media/vxd/decoder/pvdec_entropy_regs.h    |   33 +
 drivers/staging/media/vxd/decoder/pvdec_int.h |   82 +
 .../media/vxd/decoder/pvdec_vec_be_regs.h     |   35 +
 drivers/staging/media/vxd/decoder/reg_io2.h   |   74 +
 .../staging/media/vxd/decoder/scaler_setup.h  |   59 +
 drivers/staging/media/vxd/decoder/swsr.c      | 1657 ++++
 drivers/staging/media/vxd/decoder/swsr.h      |  278 +
 .../media/vxd/decoder/translation_api.c       | 1725 ++++
 .../media/vxd/decoder/translation_api.h       |   42 +
 drivers/staging/media/vxd/decoder/vdec_defs.h |  548 ++
 .../media/vxd/decoder/vdec_mmu_wrapper.c      |  829 ++
 .../media/vxd/decoder/vdec_mmu_wrapper.h      |  174 +
 .../staging/media/vxd/decoder/vdecdd_defs.h   |  446 +
 .../staging/media/vxd/decoder/vdecdd_utils.c  |   95 +
 .../staging/media/vxd/decoder/vdecdd_utils.h  |   93 +
 .../media/vxd/decoder/vdecdd_utils_buf.c      |  897 ++
 .../staging/media/vxd/decoder/vdecfw_share.h  |   36 +
 .../staging/media/vxd/decoder/vdecfw_shared.h |  893 ++
 drivers/staging/media/vxd/decoder/vxd_core.c  | 1683 ++++
 drivers/staging/media/vxd/decoder/vxd_dec.c   |  185 +
 drivers/staging/media/vxd/decoder/vxd_dec.h   |  477 ++
 drivers/staging/media/vxd/decoder/vxd_ext.h   |   74 +
 drivers/staging/media/vxd/decoder/vxd_int.c   | 1137 +++
 drivers/staging/media/vxd/decoder/vxd_int.h   |  128 +
 .../staging/media/vxd/decoder/vxd_mmu_defs.h  |   30 +
 drivers/staging/media/vxd/decoder/vxd_props.h |   80 +
 drivers/staging/media/vxd/decoder/vxd_pvdec.c | 1745 ++++
 .../media/vxd/decoder/vxd_pvdec_priv.h        |  126 +
 .../media/vxd/decoder/vxd_pvdec_regs.h        |  779 ++
 drivers/staging/media/vxd/decoder/vxd_v4l2.c  | 2129 +++++
 include/uapi/linux/videodev2.h                |    2 +
 114 files changed, 62369 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
 create mode 100644 arch/arm64/configs/ti_sdk_arm64_release_defconfig
 create mode 100644 drivers/staging/media/vxd/common/addr_alloc.c
 create mode 100644 drivers/staging/media/vxd/common/addr_alloc.h
 create mode 100644 drivers/staging/media/vxd/common/dq.c
 create mode 100644 drivers/staging/media/vxd/common/dq.h
 create mode 100644 drivers/staging/media/vxd/common/hash.c
 create mode 100644 drivers/staging/media/vxd/common/hash.h
 create mode 100644 drivers/staging/media/vxd/common/idgen_api.c
 create mode 100644 drivers/staging/media/vxd/common/idgen_api.h
 create mode 100644 drivers/staging/media/vxd/common/img_errors.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem_man.c
 create mode 100644 drivers/staging/media/vxd/common/img_mem_man.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem_unified.c
 create mode 100644 drivers/staging/media/vxd/common/imgmmu.c
 create mode 100644 drivers/staging/media/vxd/common/imgmmu.h
 create mode 100644 drivers/staging/media/vxd/common/lst.c
 create mode 100644 drivers/staging/media/vxd/common/lst.h
 create mode 100644 drivers/staging/media/vxd/common/pool.c
 create mode 100644 drivers/staging/media/vxd/common/pool.h
 create mode 100644 drivers/staging/media/vxd/common/pool_api.c
 create mode 100644 drivers/staging/media/vxd/common/pool_api.h
 create mode 100644 drivers/staging/media/vxd/common/ra.c
 create mode 100644 drivers/staging/media/vxd/common/ra.h
 create mode 100644 drivers/staging/media/vxd/common/resource.c
 create mode 100644 drivers/staging/media/vxd/common/resource.h
 create mode 100644 drivers/staging/media/vxd/common/rman_api.c
 create mode 100644 drivers/staging/media/vxd/common/rman_api.h
 create mode 100644 drivers/staging/media/vxd/common/talmmu_api.c
 create mode 100644 drivers/staging/media/vxd/common/talmmu_api.h
 create mode 100644 drivers/staging/media/vxd/common/vid_buf.h
 create mode 100644 drivers/staging/media/vxd/common/work_queue.c
 create mode 100644 drivers/staging/media/vxd/common/work_queue.h
 create mode 100644 drivers/staging/media/vxd/decoder/Kconfig
 create mode 100644 drivers/staging/media/vxd/decoder/Makefile
 create mode 100644 drivers/staging/media/vxd/decoder/bspp.c
 create mode 100644 drivers/staging/media/vxd/decoder/bspp.h
 create mode 100644 drivers/staging/media/vxd/decoder/bspp_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/core.c
 create mode 100644 drivers/staging/media/vxd/decoder/core.h
 create mode 100644 drivers/staging/media/vxd/decoder/dec_resources.c
 create mode 100644 drivers/staging/media/vxd/decoder/dec_resources.h
 create mode 100644 drivers/staging/media/vxd/decoder/decoder.c
 create mode 100644 drivers/staging/media/vxd/decoder/decoder.h
 create mode 100644 drivers/staging/media/vxd/decoder/fw_interface.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_idx.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/h264_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_vlc.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264fw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264fw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevc_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/hevc_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevcfw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevcfw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/hw_control.c
 create mode 100644 drivers/staging/media/vxd/decoder/hw_control.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_dec_common.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_cmds.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_core_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_vdmc_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_vec_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pixfmts.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_profiles_levels.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_core_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_pixel_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_test_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_vdec_fw_msg.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_video_bus4_mmu_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpeg_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/jpeg_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpegfw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpegfw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/mem_io.h
 create mode 100644 drivers/staging/media/vxd/decoder/mmu_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/pixel_api.c
 create mode 100644 drivers/staging/media/vxd/decoder/pixel_api.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_entropy_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_vec_be_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/reg_io2.h
 create mode 100644 drivers/staging/media/vxd/decoder/scaler_setup.h
 create mode 100644 drivers/staging/media/vxd/decoder/swsr.c
 create mode 100644 drivers/staging/media/vxd/decoder/swsr.h
 create mode 100644 drivers/staging/media/vxd/decoder/translation_api.c
 create mode 100644 drivers/staging/media/vxd/decoder/translation_api.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils_buf.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdecfw_share.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecfw_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_core.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_dec.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_dec.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_ext.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_int.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_mmu_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_props.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_v4l2.c
Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#1 lore raw

PATCH 1/30 dt-bindings: Add binding for img,d5500-vxd for DRA8x

From: Sidraya <[email protected]>

Add the dt-binding for the img,d5500-vxd node for DRA8x.

---
 .../bindings/media/img,d5520-vxd.yaml         | 52 +++++++++++++++++++
 MAINTAINERS                                   |  7 +++
 2 files changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
Documentation/devicetree/bindings/media/img,d5520-vxd.yaml new file +52 -0
new file mode 100644
index 000000000000..812a431336a2
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/img,d5520-vxd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Imagination D5520-VXD Driver
+
+maintainers:
+  - Sidraya Jayagond <[email protected]>
+  - Prashanth Kumar Amai <[email protected]>
+
+description: |
+ The IMG VXD video decode driver for the D5500-VXD is a video decoder for
+ multiple video formats including H.264 and HEVC on the TI J721E family
+ of SoCs.
+
+properties:
+  compatible:
+    const: img,d5500-vxd
+
+  reg:
+    maxItems: 2
+
+  interrupts:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    d5520: video-decoder@4300000 {
+            /* IMG D5520 driver configuration */
+            compatible = "img,d5500-vxd";
+            reg = <0x00 0x04300000>,
+                  <0x00 0x100000>;
+            power-domains = <&k3_pds 144>;
+            interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
+    };
+
+...
MAINTAINERS +7 -0
index fd25e4ecf0b9..163b3176ccf9 100644
@@ -19531,6 +19531,13 @@ W:	https://linuxtv.org
 T:	git git://linuxtv.org/media_tree.git
 F:	drivers/media/test-drivers/vicodec/*
 
+VIDEO DECODER DRIVER FOR TI DRA8XX/J721E
+M:	Prashant Amai <[email protected]>
+M:	Sidraya Jayagond <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+
 VIDEO I2C POLLING DRIVER
 M:	Matt Ranostay <[email protected]>
 L:	[email protected]
Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#2 lore raw

PATCH 2/30 v4l: vxd-dec: Create mmu programming helper library

In reply to [email protected]

From: Sidraya <[email protected]>

The IMG D5520 has an MMU which needs to be programmed with all memory which it needs access to. This includes input buffers, output buffers and parameter buffers for each decode instance, as well as common buffers for firmware, etc.

Functions are provided for creating MMU directories (each stream will have it's own MMU context), retrieving the directory page, and mapping/unmapping a buffer into the MMU for a specific MMU context.

Also helper(s) are provided for querying the capabilities of the MMU.

---
 MAINTAINERS                               |   2 +
 drivers/staging/media/vxd/common/imgmmu.c | 782 ++++++++++++++++++++++
 drivers/staging/media/vxd/common/imgmmu.h | 180 +++++
 3 files changed, 964 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/imgmmu.c
 create mode 100644 drivers/staging/media/vxd/common/imgmmu.h
MAINTAINERS +2 -0
index 163b3176ccf9..2e921650a14c 100644
@@ -19537,6 +19537,8 @@ M:	Sidraya Jayagond <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	drivers/staging/media/vxd/common/imgmmu.c
+F:	drivers/staging/media/vxd/common/imgmmu.h
 
 VIDEO I2C POLLING DRIVER
 M:	Matt Ranostay <[email protected]>
drivers/staging/media/vxd/common/imgmmu.c new file +782 -0

782 lines not on this page · raw message

drivers/staging/media/vxd/common/imgmmu.h new file +180 -0

180 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
maintainer
#3 lore raw

Re: [PATCH 02/30] v4l: vxd-dec: Create mmu programming helper library

Quoted 13 lines · On Wed, Aug 18, 2021 at 07:40:09PM +0530, [email protected] wrote:

From: Sidraya <[email protected]>

The IMG D5520 has an MMU which needs to be programmed with all memory which it needs access to. This includes input buffers, output buffers and parameter buffers for each decode instance, as well as common buffers for firmware, etc.

Functions are provided for creating MMU directories (each stream will have it's own MMU context), retrieving the directory page, and mapping/unmapping a buffer into the MMU for a specific MMU context.

Also helper(s) are provided for querying the capabilities of the MMU.

Quoted 7 lines
---
 MAINTAINERS                               |   2 +
 drivers/staging/media/vxd/common/imgmmu.c | 782 ++++++++++++++++++++++
 drivers/staging/media/vxd/common/imgmmu.h | 180 +++++

Why are you adding new stuff to staging? Why can it not just go to the "real" part of the kernel?

If it is to go into staging, we need a TODO file that lists what needs to be done to get it out of staging.

thanks,

greg k-h

#4 lore raw

PATCH 3/30 v4l: vxd-dec: Create vxd_dec Mem Manager helper library

In reply to [email protected]

From: Sidraya <[email protected]>

The memory manager helper library provides functions for managing the memory context of a decode stream. Each stream will have it's own memory context with associated mmu context and heap allocations. The memory manager tracks the allocations and mappings per context, as well as providing a wrapper around the MMU library. It also provides functions for the driver to query information about the page table directory for a particular memory context.

In addition, the memory manager provides the ability to plug in

different heaps (unified, carveout, dmabuf, etc.) that the caller can use when doing memory allocations.

By default, the "unified" heap functionality is supported. No other types of heaps are supported at this time, though the framework is present to add more heap types in the future, if needed. This heap is used only for allocating internal buffers used for communication with the hardware, and for loading the firmware.

Functions are provided for creating/destroying a memory context, creating/destroying an MMU context, mapping and unmapping buffers in the device MMU, allocating and freeing buffers from specified available heaps, and retrieving information about those allocations.

---
 MAINTAINERS                                   |    3 +
 .../staging/media/vxd/common/img_mem_man.c    | 1124 +++++++++++++++++
 .../staging/media/vxd/common/img_mem_man.h    |  231 ++++
 .../media/vxd/common/img_mem_unified.c        |  276 ++++
 4 files changed, 1634 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/img_mem_man.c
 create mode 100644 drivers/staging/media/vxd/common/img_mem_man.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem_unified.c
MAINTAINERS +3 -0
index 2e921650a14c..150272927839 100644
@@ -19537,6 +19537,9 @@ M:	Sidraya Jayagond <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	drivers/staging/media/vxd/common/img_mem_man.c
+F:	drivers/staging/media/vxd/common/img_mem_man.h
+F:	drivers/staging/media/vxd/common/img_mem_unified.c
 F:	drivers/staging/media/vxd/common/imgmmu.c
 F:	drivers/staging/media/vxd/common/imgmmu.h
 
drivers/staging/media/vxd/common/img_mem_man.c new file +1124 -0

1,124 lines not on this page · raw message

drivers/staging/media/vxd/common/img_mem_man.h new file +231 -0

231 lines not on this page · raw message

drivers/staging/media/vxd/common/img_mem_unified.c new file +276 -0

276 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#5 lore raw

Re: [PATCH 03/30] v4l: vxd-dec: Create vxd_dec Mem Manager helper library

drivers/staging/media/vxd/common/img_mem_man.c line 179

Quoted 12 lines · On Wed, Aug 18, 2021 at 07:40:10PM +0530, [email protected] wrote:
drivers/staging/media/vxd/common/img_mem_man.c new file +12 -0
+int img_mem_create_ctx(struct mem_ctx **new_ctx)
+{
+	struct mem_man *mem_man = &mem_man_data;
+	struct mem_ctx *ctx;
+
+	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
+	if (!ctx)
+		return -ENOMEM;
+
+	ctx->buffers = kzalloc(sizeof(*ctx->buffers), GFP_KERNEL);
+	if (!ctx->buffers)
+		return -ENOMEM;

Smatch would have caught that this needs a kfree(ctx); before returning.

It wouldn't hurt to run Smatch over this code.

git clone https://repo.or.cz/w/smatch.git
cd smatch
yum install gcc make sqlite3 sqlite-devel sqlite perl-DBD-SQLite openssl-devel perl-Try-Tiny make
cd ~/kernel/
~/smatch/smatch_scripts/kchecker drivers/staging/media/vxd/common/img_mem_man.c

(I am the author of Smatch #BlowYourOwnTrumpet).

regards,
dan carpenter

#6 lore raw

Re: [PATCH 03/30] v4l: vxd-dec: Create vxd_dec Mem Manager helper library

Quoted 25 lines · Dan Carpenter

drivers/staging/media/vxd/common/img_mem_man.c line 179

Quoted 12 lines · On Wed, Aug 18, 2021 at 07:40:10PM +0530, [email protected] wrote:
drivers/staging/media/vxd/common/img_mem_man.c new file +12 -0
+int img_mem_create_ctx(struct mem_ctx **new_ctx)
+{
+	struct mem_man *mem_man = &mem_man_data;
+	struct mem_ctx *ctx;
+
+	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
+	if (!ctx)
+		return -ENOMEM;
+
+	ctx->buffers = kzalloc(sizeof(*ctx->buffers), GFP_KERNEL);
+	if (!ctx->buffers)
+		return -ENOMEM;

Smatch would have caught that this needs a kfree(ctx); before returning.

It wouldn't hurt to run Smatch over this code.

git clone https://repo.or.cz/w/smatch.git
cd smatch
yum install gcc make sqlite3 sqlite-devel sqlite perl-DBD-SQLite openssl-devel perl-Try-Tiny make
cd ~/kernel/
~/smatch/smatch_scripts/kchecker drivers/staging/media/vxd/common/img_mem_man.c

Quoted 5 lines

(I am the author of Smatch #BlowYourOwnTrumpet).

regards,
dan carpenter

I will run Smatch and will remove similar findings. Thank you for reviewing.

Signature · 20 lines
This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
maintainer
#7 lore raw

Re: [PATCH 03/30] v4l: vxd-dec: Create vxd_dec Mem Manager helper library

Quoted 12 lines · Sidraya Jayagond

This
message contains confidential information and is intended only for the
individual(s) named. If you are not the intended recipient, you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this mail and attached file/s is strictly prohibited. Please notify the
sender immediately and delete this e-mail
from your system. E-mail transmission
cannot be guaranteed to be secured or

Quoted 9 lines

error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Now deleted, this is not ok for kernel development mailing lists, sorry.

#8 lore raw

Re: [PATCH 03/30] v4l: vxd-dec: Create vxd_dec Mem Manager helper library

Quoted 23 lines · Greg KH
Quoted 12 lines · Sidraya Jayagond

This
message contains confidential information and is intended only for the
individual(s) named. If you are not the intended recipient, you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this mail and attached file/s is strictly prohibited. Please notify the
sender immediately and delete this e-mail
from your system. E-mail transmission
cannot be guaranteed to be secured or

Quoted 9 lines

error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Quoted 1 line

Now deleted, this is not ok for kernel development mailing lists, sorry.

We are able resolve and removed confidentiality signature for my email-id.
I apologize for the inconvenience.

#9 lore raw

PATCH 4/30 v4l: vxd-dec: Add vxd helper library

In reply to [email protected]

From: Sidraya <[email protected]>

The vxd helper provides the functionality for firmware blob preparation and loading, power management (core reset, etc.), firmware messaging, interrupt handling, managing the hardware status, and error handling.

The vxd helper also interacts with the memory manager helper to create a context for each stream and associate it with the mmu context. The common mappings are done during this creation for the firmware and rendec buffers.

---
 MAINTAINERS                                   |    4 +
 .../media/vxd/decoder/img_dec_common.h        |  278 +++
 drivers/staging/media/vxd/decoder/vxd_pvdec.c | 1745 +++++++++++++++++
 .../media/vxd/decoder/vxd_pvdec_priv.h        |  126 ++
 .../media/vxd/decoder/vxd_pvdec_regs.h        |  779 ++++++++
 5 files changed, 2932 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/img_dec_common.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
MAINTAINERS +4 -0
index 150272927839..0f8154b69a91 100644
@@ -19542,6 +19542,10 @@ F:	drivers/staging/media/vxd/common/img_mem_man.h
 F:	drivers/staging/media/vxd/common/img_mem_unified.c
 F:	drivers/staging/media/vxd/common/imgmmu.c
 F:	drivers/staging/media/vxd/common/imgmmu.h
+F:	drivers/staging/media/vxd/decoder/img_dec_common.h
+F:	drivers/staging/media/vxd/decoder/vxd_pvdec.c
+F:	drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
+F:	drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
 
 VIDEO I2C POLLING DRIVER
 M:	Matt Ranostay <[email protected]>
drivers/staging/media/vxd/decoder/img_dec_common.h new file +278 -0

278 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_pvdec.c new file +1745 -0

1,745 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h new file +126 -0

126 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h new file +779 -0

779 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#10 lore raw

PATCH 5/30 v4l: vxd-dec: Add IMG VXD Video Decoder mem to mem drive

In reply to [email protected]

From: Sidraya <[email protected]>

The IMG VXD Video Decoder uses the IMG D5520 to provide video decoding for various codecs including H.264 and HEVC. Scaling and rotation are also supported by the hardware and driver. The driver also supports multiple simultaneous video decodes.

Each mem2mem context is a single stream decode session. Each session creates it's own vxd context and associated mem mgr and mmu contexts. Firmware loading, firmware messaging, and hardware power management (reset) are supported, as well as MMU programming of the HW.

This patch adds the framework for the v4l2 IMG VXD video decoder driver, supporting HW initialization, MMU mapping and buffer management. The decoding functionality is not yet implemented.

---
 MAINTAINERS                                  |    3 +
 drivers/staging/media/vxd/decoder/vxd_core.c | 1683 ++++++++++++++++++
 drivers/staging/media/vxd/decoder/vxd_dec.c  |  185 ++
 drivers/staging/media/vxd/decoder/vxd_dec.h  |  477 +++++
 4 files changed, 2348 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_core.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_dec.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_dec.h
MAINTAINERS +3 -0
index 0f8154b69a91..47067f907539 100644
@@ -19543,6 +19543,9 @@ F:	drivers/staging/media/vxd/common/img_mem_unified.c
 F:	drivers/staging/media/vxd/common/imgmmu.c
 F:	drivers/staging/media/vxd/common/imgmmu.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
+F:	drivers/staging/media/vxd/decoder/vxd_core.c
+F:	drivers/staging/media/vxd/decoder/vxd_dec.c
+F:	drivers/staging/media/vxd/decoder/vxd_dec.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec.c
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
drivers/staging/media/vxd/decoder/vxd_core.c new file +1683 -0

1,683 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_dec.c new file +185 -0

185 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_dec.h new file +477 -0

477 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#11 lore raw

PATCH 6/30 v4l: vxd-dec: Add hardware control modules

In reply to [email protected]

From: Sidraya <[email protected]>

The TI Video Decoder uses IMG D5520 to provide video decoding for H.264 codec and this patch handles firmware messages transaction with firmware.
It prepares the batch and fragment messages for firmware.

---
 MAINTAINERS                                   |    2 +
 .../staging/media/vxd/decoder/hw_control.c    | 1211 +++++++++++++++++
 .../staging/media/vxd/decoder/hw_control.h    |  144 ++
 3 files changed, 1357 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/hw_control.c
 create mode 100644 drivers/staging/media/vxd/decoder/hw_control.h
MAINTAINERS +2 -0
index 47067f907539..2327ea12caa6 100644
@@ -19542,6 +19542,8 @@ F:	drivers/staging/media/vxd/common/img_mem_man.h
 F:	drivers/staging/media/vxd/common/img_mem_unified.c
 F:	drivers/staging/media/vxd/common/imgmmu.c
 F:	drivers/staging/media/vxd/common/imgmmu.h
+F:	drivers/staging/media/vxd/decoder/hw_control.c
+F:	drivers/staging/media/vxd/decoder/hw_control.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
 F:	drivers/staging/media/vxd/decoder/vxd_core.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.c
drivers/staging/media/vxd/decoder/hw_control.c new file +1211 -0

1,211 lines not on this page · raw message

drivers/staging/media/vxd/decoder/hw_control.h new file +144 -0

144 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#12 lore raw

PATCH 7/30 v4l: vxd-dec: Add vxd core module

In reply to [email protected]

From: Sidraya <[email protected]>

This patch prepares the picture commands for the firmware it includes reconstructed and alternate picture commands.

---
 MAINTAINERS                                 |    2 +
 drivers/staging/media/vxd/decoder/vxd_int.c | 1137 +++++++++++++++++++
 drivers/staging/media/vxd/decoder/vxd_int.h |  128 +++
 3 files changed, 1267 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_int.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_int.h
MAINTAINERS +2 -0
index 2327ea12caa6..7b21ebfc61d4 100644
@@ -19548,6 +19548,8 @@ F:	drivers/staging/media/vxd/decoder/img_dec_common.h
 F:	drivers/staging/media/vxd/decoder/vxd_core.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.h
+F:	drivers/staging/media/vxd/decoder/vxd_int.c
+F:	drivers/staging/media/vxd/decoder/vxd_int.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec.c
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
drivers/staging/media/vxd/decoder/vxd_int.c new file +1137 -0

1,137 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_int.h new file +128 -0

128 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#13 lore raw

PATCH 8/30 v4l: vxd-dec: Add translation control modules

In reply to [email protected]

From: Sidraya <[email protected]>

This patch adds the control allocation buffer for firmware and gets the data from decoder module and sent it to firmware through hardware control module.

It prepares all the standard headers, dma transfer commands, vlc table information and sends it to firmware.

---
 MAINTAINERS                                   |    2 +
 .../media/vxd/decoder/translation_api.c       | 1725 +++++++++++++++++
 .../media/vxd/decoder/translation_api.h       |   42 +
 3 files changed, 1769 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/translation_api.c
 create mode 100644 drivers/staging/media/vxd/decoder/translation_api.h
MAINTAINERS +2 -0
index 7b21ebfc61d4..538faa644d13 100644
@@ -19545,6 +19545,8 @@ F:	drivers/staging/media/vxd/common/imgmmu.h
 F:	drivers/staging/media/vxd/decoder/hw_control.c
 F:	drivers/staging/media/vxd/decoder/hw_control.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
+F:	drivers/staging/media/vxd/decoder/translation_api.c
+F:	drivers/staging/media/vxd/decoder/translation_api.h
 F:	drivers/staging/media/vxd/decoder/vxd_core.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.h
drivers/staging/media/vxd/decoder/translation_api.c new file +1725 -0

1,725 lines not on this page · raw message

drivers/staging/media/vxd/decoder/translation_api.h new file +42 -0

42 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#14 lore raw

PATCH 9/30 v4l: vxd-dec: Add idgen api modules

In reply to [email protected]

From: Sidraya <[email protected]>

This patch creates and destroy the context for idgen and it returns ids, based on ids it manage the resources

---
 MAINTAINERS                                  |   2 +
 drivers/staging/media/vxd/common/idgen_api.c | 449 +++++++++++++++++++
 drivers/staging/media/vxd/common/idgen_api.h |  59 +++
 3 files changed, 510 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/idgen_api.c
 create mode 100644 drivers/staging/media/vxd/common/idgen_api.h
MAINTAINERS +2 -0
index 538faa644d13..0468aaac3b7d 100644
@@ -19537,6 +19537,8 @@ M:	Sidraya Jayagond <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	drivers/staging/media/vxd/common/idgen_api.c
+F:	drivers/staging/media/vxd/common/idgen_api.h
 F:	drivers/staging/media/vxd/common/img_mem_man.c
 F:	drivers/staging/media/vxd/common/img_mem_man.h
 F:	drivers/staging/media/vxd/common/img_mem_unified.c
drivers/staging/media/vxd/common/idgen_api.c new file +449 -0

449 lines not on this page · raw message

drivers/staging/media/vxd/common/idgen_api.h new file +59 -0

59 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#15 lore raw

Re: [PATCH 09/30] v4l: vxd-dec: Add idgen api modules

Of course this is all staging code and we normally don't review staging code too hard when it's first sent because we understand that staging code needs a lot of work before it's acceptable.

One of the rules of staging is that you can't touch code outside of staging.

But since I happened to glance at a some of this code then here are some tiny comments:

drivers/staging/media/vxd/common/idgen_api.c line 66

Quoted 7 lines · On Wed, Aug 18, 2021 at 07:40:16PM +0530, [email protected] wrote:
drivers/staging/media/vxd/common/idgen_api.c new file +7 -0
+/*
+ * Structure contains the ID context.
+ */
+struct idgen_hdblk {
+	void **link; /* to be part of single linked list */
+	/* Array of handles in this block. */
+	void *ahhandles[1];

Don't use 1 element flex arrays. Do it like this:

	void *ahhandles[];

You will have to adjust all you math. But you should be using the "struct_size(hdblk, ahhandles, nr)" macro anyway to prevent integer overflows.

drivers/staging/media/vxd/common/idgen_api.c line 86

Quoted 9 lines
drivers/staging/media/vxd/common/idgen_api.c new file +9 -0
+int idgen_createcontext(unsigned int maxid, unsigned int blksize,
+			int incid, void **idgenhandle)
+{
+	struct idgen_context *idcontext;
+
+	/* Create context structure */
+	idcontext = kzalloc(sizeof(*idcontext), GFP_KERNEL);
+	if (!idcontext)
+		return IMG_ERROR_OUT_OF_MEMORY;

We need to get rid of all these weird error codes? You can add that to the TODO file.

Quoted 5 lines
drivers/staging/media/vxd/common/idgen_api.c new file +5 -0
+int idgen_destroycontext(void *idgenhandle)
+{
+	struct idgen_context *idcontext = (struct idgen_context *)idgenhandle;
+	struct idgen_hdblk *hdblk;
+

drivers/staging/media/vxd/common/idgen_api.c line 132

Quoted 10 lines
drivers/staging/media/vxd/common/idgen_api.c new file +10 -0
+	if (!idcontext)
+		return IMG_ERROR_INVALID_PARAMETERS;
+
+	/* If incrementing Ids, free the List of Incrementing Ids */
+	if (idcontext->incids) {
+		struct idgen_id *id;
+		unsigned int i = 0;
+
+		for (i = 0; i < idcontext->blksize; i++) {
+			id = lst_removehead(&idcontext->incidlist[i]);

You're not allowed to invent your own list API. :P Generally there just seems like too much extra helper functions and wrappers. Removing this kind of stuff is standard for staging drivers so that's normall. Add it to the TODO.

regards,
dan carpenter

#16 lore raw

Re: [PATCH 09/30] v4l: vxd-dec: Add idgen api modules

Quoted 61 lines · Dan Carpenter

Of course this is all staging code and we normally don't review staging code too hard when it's first sent because we understand that staging code needs a lot of work before it's acceptable.

One of the rules of staging is that you can't touch code outside of staging.

But since I happened to glance at a some of this code then here are some tiny comments:

drivers/staging/media/vxd/common/idgen_api.c line 66

Quoted 7 lines · On Wed, Aug 18, 2021 at 07:40:16PM +0530, [email protected] wrote:
drivers/staging/media/vxd/common/idgen_api.c new file +7 -0
+/*
+ * Structure contains the ID context.
+ */
+struct idgen_hdblk {
+	void **link; /* to be part of single linked list */
+	/* Array of handles in this block. */
+	void *ahhandles[1];

Don't use 1 element flex arrays. Do it like this:

	void *ahhandles[];

You will have to adjust all you math. But you should be using the "struct_size(hdblk, ahhandles, nr)" macro anyway to prevent integer overflows.

drivers/staging/media/vxd/common/idgen_api.c line 86

Quoted 9 lines
drivers/staging/media/vxd/common/idgen_api.c new file +9 -0
+int idgen_createcontext(unsigned int maxid, unsigned int blksize,
+			int incid, void **idgenhandle)
+{
+	struct idgen_context *idcontext;
+
+	/* Create context structure */
+	idcontext = kzalloc(sizeof(*idcontext), GFP_KERNEL);
+	if (!idcontext)
+		return IMG_ERROR_OUT_OF_MEMORY;

We need to get rid of all these weird error codes? You can add that to the TODO file.

Quoted 5 lines
drivers/staging/media/vxd/common/idgen_api.c new file +5 -0
+int idgen_destroycontext(void *idgenhandle)
+{
+	struct idgen_context *idcontext = (struct idgen_context *)idgenhandle;
+	struct idgen_hdblk *hdblk;
+

drivers/staging/media/vxd/common/idgen_api.c line 132

Quoted 10 lines
drivers/staging/media/vxd/common/idgen_api.c new file +10 -0
+	if (!idcontext)
+		return IMG_ERROR_INVALID_PARAMETERS;
+
+	/* If incrementing Ids, free the List of Incrementing Ids */
+	if (idcontext->incids) {
+		struct idgen_id *id;
+		unsigned int i = 0;
+
+		for (i = 0; i < idcontext->blksize; i++) {
+			id = lst_removehead(&idcontext->incidlist[i]);

You're not allowed to invent your own list API. :P Generally there just seems like too much extra helper functions and wrappers. Removing this kind of stuff is standard for staging drivers so that's normall. Add it to the TODO.

Quoted 3 lines

regards,
dan carpenter

I will make change for void *ahhandles[1] with void *ahhandles[];, will use "struct_size" while allocating memory.

I will replaced all Error macros with directly linux Error macros.

About customized data structure API e.g-list,queue, I am currently working on replacing them with Linux kernel generic dtata structure API's. Thank you for reviewing.

Signature · 20 lines
This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#17 lore raw

PATCH 10/30 v4l: vxd-dec: Add utility modules

In reply to [email protected]

From: Sidraya <[email protected]>

Contains utility module for double linked queues, single linked lists and workqueue.

---
 MAINTAINERS                                   |   6 +
 drivers/staging/media/vxd/common/dq.c         | 248 ++++++++++++++++++
 drivers/staging/media/vxd/common/dq.h         |  36 +++
 drivers/staging/media/vxd/common/lst.c        | 119 +++++++++
 drivers/staging/media/vxd/common/lst.h        |  37 +++
 drivers/staging/media/vxd/common/work_queue.c | 188 +++++++++++++
 drivers/staging/media/vxd/common/work_queue.h |  66 +++++
 7 files changed, 700 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/dq.c
 create mode 100644 drivers/staging/media/vxd/common/dq.h
 create mode 100644 drivers/staging/media/vxd/common/lst.c
 create mode 100644 drivers/staging/media/vxd/common/lst.h
 create mode 100644 drivers/staging/media/vxd/common/work_queue.c
 create mode 100644 drivers/staging/media/vxd/common/work_queue.h
MAINTAINERS +6 -0
index 0468aaac3b7d..2668eeb89a34 100644
@@ -19537,6 +19537,8 @@ M:	Sidraya Jayagond <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	drivers/staging/media/vxd/common/dq.c
+F:	drivers/staging/media/vxd/common/dq.h
 F:	drivers/staging/media/vxd/common/idgen_api.c
 F:	drivers/staging/media/vxd/common/idgen_api.h
 F:	drivers/staging/media/vxd/common/img_mem_man.c
@@ -19544,6 +19546,10 @@ F:	drivers/staging/media/vxd/common/img_mem_man.h
 F:	drivers/staging/media/vxd/common/img_mem_unified.c
 F:	drivers/staging/media/vxd/common/imgmmu.c
 F:	drivers/staging/media/vxd/common/imgmmu.h
+F:	drivers/staging/media/vxd/common/lst.c
+F:	drivers/staging/media/vxd/common/lst.h
+F:	drivers/staging/media/vxd/common/work_queue.c
+F:	drivers/staging/media/vxd/common/work_queue.h
 F:	drivers/staging/media/vxd/decoder/hw_control.c
 F:	drivers/staging/media/vxd/decoder/hw_control.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
drivers/staging/media/vxd/common/dq.c new file +248 -0

248 lines not on this page · raw message

drivers/staging/media/vxd/common/dq.h new file +36 -0
new file mode 100644
index 000000000000..4663a92aaf7a
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Utility module for doubly linked queues.
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2021 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Authors:
+ *	Lakshmi Sankar <[email protected]>
+ */
+#ifndef DQ_H
+#define DQ_H
+
+/* dq structure */
+struct dq_linkage_t {
+	struct dq_linkage_t *fwd;
+	struct dq_linkage_t *back;
+};
+
+/* Function Prototypes */
+void dq_addafter(void *predecessor, void *item);
+void dq_addbefore(void *successor, void *item);
+void dq_addhead(struct dq_linkage_t *queue, void *item);
+void dq_addtail(struct dq_linkage_t *queue, void *item);
+int dq_empty(struct dq_linkage_t *queue);
+void *dq_first(struct dq_linkage_t *queue);
+void *dq_last(struct dq_linkage_t *queue);
+void dq_init(struct dq_linkage_t *queue);
+void dq_move(struct dq_linkage_t *from, struct dq_linkage_t *to);
+void *dq_next(void *item);
+void *dq_previous(void *item);
+void dq_remove(void *item);
+void *dq_removehead(struct dq_linkage_t *queue);
+void *dq_removetail(struct dq_linkage_t *queue);
+
+#endif /* #define DQ_H */
drivers/staging/media/vxd/common/lst.c new file +119 -0

119 lines not on this page · raw message

drivers/staging/media/vxd/common/lst.h new file +37 -0
new file mode 100644
index 000000000000..ccf6eed19019
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * List processing primitives.
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2021 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Author:
+ *	Lakshmi Sankar <[email protected]>
+ */
+#ifndef __LIST_H__
+#define __LIST_H__
+
+#include <linux/types.h>
+
+struct lst_t {
+	void **first;
+	void **last;
+};
+
+void lst_add(struct lst_t *list, void *item);
+void lst_addhead(struct lst_t *list, void *item);
+
+/**
+ * lst_empty- Is list empty?
+ * @list: pointer to list
+ */
+int  lst_empty(struct lst_t *list);
+void *lst_first(struct lst_t *list);
+void lst_init(struct lst_t *list);
+void *lst_last(struct lst_t *list);
+void *lst_next(void *item);
+void *lst_remove(struct lst_t *list, void *item);
+void *lst_removehead(struct lst_t *list);
+int lst_check(struct lst_t *list, void *item);
+
+#endif /* __LIST_H__ */
drivers/staging/media/vxd/common/work_queue.c new file +188 -0

188 lines not on this page · raw message

drivers/staging/media/vxd/common/work_queue.h new file +66 -0

66 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#18 lore raw

PATCH 11/30 v4l: vxd-dec: Add TALMMU module

In reply to [email protected]

From: Sidraya <[email protected]>

It contains the implementation of Address allocation management APIs, list processing primitives, generic resource allocations, self scaling has tables and object pool memory allocator which are needed for TALMMU functionality

---
 MAINTAINERS                                   |  10 +
 drivers/staging/media/vxd/common/addr_alloc.c | 499 +++++++++
 drivers/staging/media/vxd/common/addr_alloc.h | 238 +++++
 drivers/staging/media/vxd/common/hash.c       | 481 +++++++++
 drivers/staging/media/vxd/common/hash.h       |  86 ++
 drivers/staging/media/vxd/common/pool.c       | 228 ++++
 drivers/staging/media/vxd/common/pool.h       |  66 ++
 drivers/staging/media/vxd/common/ra.c         | 972 ++++++++++++++++++
 drivers/staging/media/vxd/common/ra.h         | 200 ++++
 drivers/staging/media/vxd/common/talmmu_api.c | 753 ++++++++++++++
 drivers/staging/media/vxd/common/talmmu_api.h | 246 +++++
 11 files changed, 3779 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/addr_alloc.c
 create mode 100644 drivers/staging/media/vxd/common/addr_alloc.h
 create mode 100644 drivers/staging/media/vxd/common/hash.c
 create mode 100644 drivers/staging/media/vxd/common/hash.h
 create mode 100644 drivers/staging/media/vxd/common/pool.c
 create mode 100644 drivers/staging/media/vxd/common/pool.h
 create mode 100644 drivers/staging/media/vxd/common/ra.c
 create mode 100644 drivers/staging/media/vxd/common/ra.h
 create mode 100644 drivers/staging/media/vxd/common/talmmu_api.c
 create mode 100644 drivers/staging/media/vxd/common/talmmu_api.h
MAINTAINERS +10 -0
index 2668eeb89a34..2b0d0708d852 100644
@@ -19537,8 +19537,12 @@ M:	Sidraya Jayagond <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	drivers/staging/media/vxd/common/addr_alloc.c
+F:	drivers/staging/media/vxd/common/addr_alloc.h
 F:	drivers/staging/media/vxd/common/dq.c
 F:	drivers/staging/media/vxd/common/dq.h
+F:	drivers/staging/media/vxd/common/hash.c
+F:	drivers/staging/media/vxd/common/hash.h
 F:	drivers/staging/media/vxd/common/idgen_api.c
 F:	drivers/staging/media/vxd/common/idgen_api.h
 F:	drivers/staging/media/vxd/common/img_mem_man.c
@@ -19548,6 +19552,12 @@ F:	drivers/staging/media/vxd/common/imgmmu.c
 F:	drivers/staging/media/vxd/common/imgmmu.h
 F:	drivers/staging/media/vxd/common/lst.c
 F:	drivers/staging/media/vxd/common/lst.h
+F:	drivers/staging/media/vxd/common/pool.c
+F:	drivers/staging/media/vxd/common/pool.h
+F:	drivers/staging/media/vxd/common/ra.c
+F:	drivers/staging/media/vxd/common/ra.h
+F:	drivers/staging/media/vxd/common/talmmu_api.c
+F:	drivers/staging/media/vxd/common/talmmu_api.h
 F:	drivers/staging/media/vxd/common/work_queue.c
 F:	drivers/staging/media/vxd/common/work_queue.h
 F:	drivers/staging/media/vxd/decoder/hw_control.c
drivers/staging/media/vxd/common/addr_alloc.c new file +499 -0

499 lines not on this page · raw message

drivers/staging/media/vxd/common/addr_alloc.h new file +238 -0

238 lines not on this page · raw message

drivers/staging/media/vxd/common/hash.c new file +481 -0

481 lines not on this page · raw message

drivers/staging/media/vxd/common/hash.h new file +86 -0

86 lines not on this page · raw message

drivers/staging/media/vxd/common/pool.c new file +228 -0

228 lines not on this page · raw message

drivers/staging/media/vxd/common/pool.h new file +66 -0

66 lines not on this page · raw message

drivers/staging/media/vxd/common/ra.c new file +972 -0

972 lines not on this page · raw message

drivers/staging/media/vxd/common/ra.h new file +200 -0

200 lines not on this page · raw message

drivers/staging/media/vxd/common/talmmu_api.c new file +753 -0

206 lines not on this page · raw message

drivers/staging/media/vxd/common/talmmu_api.h new file +246 -0

246 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

Part of the diff is not shown here. View the raw message.

#19 lore raw

PATCH 12/30 v4l: vxd-dec: Add VDEC MMU wrapper

In reply to [email protected]

From: Sidraya <[email protected]>

It contains VDEC MMU APIs, used for buffer mapping, generating virtual addresses. It will use TALMMU APIs.

---
 MAINTAINERS                                   |   2 +
 .../media/vxd/decoder/vdec_mmu_wrapper.c      | 829 ++++++++++++++++++
 .../media/vxd/decoder/vdec_mmu_wrapper.h      | 174 ++++
 3 files changed, 1005 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
MAINTAINERS +2 -0
index 2b0d0708d852..6c3f7a55ce9b 100644
@@ -19565,6 +19565,8 @@ F:	drivers/staging/media/vxd/decoder/hw_control.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
 F:	drivers/staging/media/vxd/decoder/translation_api.c
 F:	drivers/staging/media/vxd/decoder/translation_api.h
+F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
+F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
 F:	drivers/staging/media/vxd/decoder/vxd_core.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.h
drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c new file +829 -0

829 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h new file +174 -0

174 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#20 lore raw

PATCH 13/30 v4l: vxd-dec: Add Bistream Preparser (BSPP) module

In reply to [email protected]

From: Sidraya <[email protected]>

Contains the implementation of Bitstream preparser, it supports preparsing of H264, HEVC and MJPEG bitstreams at present. It uses software shift register implementation for bitstream parsing.

---
 MAINTAINERS                                   |   11 +
 drivers/staging/media/vxd/decoder/bspp.c      | 2479 ++++++++++++++
 drivers/staging/media/vxd/decoder/bspp.h      |  363 ++
 drivers/staging/media/vxd/decoder/bspp_int.h  |  514 +++
 .../media/vxd/decoder/h264_secure_parser.c    | 3051 +++++++++++++++++
 .../media/vxd/decoder/h264_secure_parser.h    |  278 ++
 .../media/vxd/decoder/hevc_secure_parser.c    | 2895 ++++++++++++++++
 .../media/vxd/decoder/hevc_secure_parser.h    |  455 +++
 .../media/vxd/decoder/jpeg_secure_parser.c    |  645 ++++
 .../media/vxd/decoder/jpeg_secure_parser.h    |   37 +
 drivers/staging/media/vxd/decoder/swsr.c      | 1657 +++++++++
 drivers/staging/media/vxd/decoder/swsr.h      |  278 ++
 12 files changed, 12663 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/bspp.c
 create mode 100644 drivers/staging/media/vxd/decoder/bspp.h
 create mode 100644 drivers/staging/media/vxd/decoder/bspp_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/h264_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevc_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/hevc_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpeg_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/jpeg_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/swsr.c
 create mode 100644 drivers/staging/media/vxd/decoder/swsr.h
MAINTAINERS +11 -0
index 6c3f7a55ce9b..baf1f19e21f7 100644
@@ -19560,9 +19560,20 @@ F:	drivers/staging/media/vxd/common/talmmu_api.c
 F:	drivers/staging/media/vxd/common/talmmu_api.h
 F:	drivers/staging/media/vxd/common/work_queue.c
 F:	drivers/staging/media/vxd/common/work_queue.h
+F:	drivers/staging/media/vxd/decoder/bspp.c
+F:	drivers/staging/media/vxd/decoder/bspp.h
+F:	drivers/staging/media/vxd/decoder/bspp_int.h
+F:	drivers/staging/media/vxd/decoder/h264_secure_parser.c
+F:	drivers/staging/media/vxd/decoder/h264_secure_parser.h
+F:	drivers/staging/media/vxd/decoder/hevc_secure_parser.c
+F:	drivers/staging/media/vxd/decoder/hevc_secure_parser.h
 F:	drivers/staging/media/vxd/decoder/hw_control.c
 F:	drivers/staging/media/vxd/decoder/hw_control.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
+F:	drivers/staging/media/vxd/decoder/jpeg_secure_parser.c
+F:	drivers/staging/media/vxd/decoder/jpeg_secure_parser.h
+F:	drivers/staging/media/vxd/decoder/swsr.c
+F:	drivers/staging/media/vxd/decoder/swsr.h
 F:	drivers/staging/media/vxd/decoder/translation_api.c
 F:	drivers/staging/media/vxd/decoder/translation_api.h
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
drivers/staging/media/vxd/decoder/bspp.c new file +2479 -0

2,479 lines not on this page · raw message

drivers/staging/media/vxd/decoder/bspp.h new file +363 -0

363 lines not on this page · raw message

drivers/staging/media/vxd/decoder/bspp_int.h new file +514 -0

138 lines not on this page · raw message

drivers/staging/media/vxd/decoder/h264_secure_parser.c new file +3051 -0

3,051 lines not on this page · raw message

drivers/staging/media/vxd/decoder/h264_secure_parser.h new file +278 -0

278 lines not on this page · raw message

drivers/staging/media/vxd/decoder/hevc_secure_parser.c new file +2895 -0

2,895 lines not on this page · raw message

drivers/staging/media/vxd/decoder/hevc_secure_parser.h new file +455 -0

455 lines not on this page · raw message

drivers/staging/media/vxd/decoder/jpeg_secure_parser.c new file +645 -0

645 lines not on this page · raw message

drivers/staging/media/vxd/decoder/jpeg_secure_parser.h new file +37 -0
new file mode 100644
index 000000000000..439a38504b96

Lines of this file are not shown. View the raw message.

drivers/staging/media/vxd/decoder/swsr.c new file +1657 -0

1,657 lines not on this page · raw message

drivers/staging/media/vxd/decoder/swsr.h new file +278 -0

278 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

Part of the diff is not shown here. View the raw message.

#21 lore raw

PATCH 14/30 v4l: vxd-dec: Add common headers

In reply to [email protected]

From: Sidraya <[email protected]>

This patch includes all the common headers which is related to h264, HEVC and MJPEG firmware data and error defines and pixel format.

---
 MAINTAINERS                                   |  14 +
 drivers/staging/media/vxd/common/img_errors.h | 104 +++
 drivers/staging/media/vxd/common/img_mem.h    |  43 +
 .../staging/media/vxd/decoder/fw_interface.h  | 818 ++++++++++++++++++
 .../staging/media/vxd/decoder/h264fw_data.h   | 652 ++++++++++++++
 .../staging/media/vxd/decoder/hevcfw_data.h   | 472 ++++++++++
 .../staging/media/vxd/decoder/img_pixfmts.h   | 195 +++++
 .../media/vxd/decoder/img_profiles_levels.h   |  33 +
 .../staging/media/vxd/decoder/jpegfw_data.h   |  83 ++
 drivers/staging/media/vxd/decoder/mmu_defs.h  |  42 +
 .../staging/media/vxd/decoder/scaler_setup.h  |  59 ++
 drivers/staging/media/vxd/decoder/vdec_defs.h | 548 ++++++++++++
 drivers/staging/media/vxd/decoder/vxd_ext.h   |  74 ++
 .../staging/media/vxd/decoder/vxd_mmu_defs.h  |  30 +
 drivers/staging/media/vxd/decoder/vxd_props.h |  80 ++
 15 files changed, 3247 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/img_errors.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem.h
 create mode 100644 drivers/staging/media/vxd/decoder/fw_interface.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264fw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevcfw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pixfmts.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_profiles_levels.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpegfw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/mmu_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/scaler_setup.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_ext.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_mmu_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_props.h
MAINTAINERS +14 -0
index baf1f19e21f7..c7a6a0974415 100644
@@ -19545,6 +19545,8 @@ F:	drivers/staging/media/vxd/common/hash.c
 F:	drivers/staging/media/vxd/common/hash.h
 F:	drivers/staging/media/vxd/common/idgen_api.c
 F:	drivers/staging/media/vxd/common/idgen_api.h
+F:	drivers/staging/media/vxd/common/img_errors.h
+F:	drivers/staging/media/vxd/common/img_mem.h
 F:	drivers/staging/media/vxd/common/img_mem_man.c
 F:	drivers/staging/media/vxd/common/img_mem_man.h
 F:	drivers/staging/media/vxd/common/img_mem_unified.c
@@ -19563,26 +19565,38 @@ F:	drivers/staging/media/vxd/common/work_queue.h
 F:	drivers/staging/media/vxd/decoder/bspp.c
 F:	drivers/staging/media/vxd/decoder/bspp.h
 F:	drivers/staging/media/vxd/decoder/bspp_int.h
+F:	drivers/staging/media/vxd/decoder/fw_interface.h
 F:	drivers/staging/media/vxd/decoder/h264_secure_parser.c
 F:	drivers/staging/media/vxd/decoder/h264_secure_parser.h
+F:	drivers/staging/media/vxd/decoder/h264fw_data.h
 F:	drivers/staging/media/vxd/decoder/hevc_secure_parser.c
 F:	drivers/staging/media/vxd/decoder/hevc_secure_parser.h
+F:	drivers/staging/media/vxd/decoder/hevcfw_data.h
 F:	drivers/staging/media/vxd/decoder/hw_control.c
 F:	drivers/staging/media/vxd/decoder/hw_control.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
+F:	drivers/staging/media/vxd/decoder/img_pixfmts.h
+F:	drivers/staging/media/vxd/decoder/img_profiles_levels.h
 F:	drivers/staging/media/vxd/decoder/jpeg_secure_parser.c
 F:	drivers/staging/media/vxd/decoder/jpeg_secure_parser.h
+F:	drivers/staging/media/vxd/decoder/jpegfw_data.h
+F:	drivers/staging/media/vxd/decoder/mmu_defs.h
+F:	drivers/staging/media/vxd/decoder/scaler_setup.h
 F:	drivers/staging/media/vxd/decoder/swsr.c
 F:	drivers/staging/media/vxd/decoder/swsr.h
 F:	drivers/staging/media/vxd/decoder/translation_api.c
 F:	drivers/staging/media/vxd/decoder/translation_api.h
+F:	drivers/staging/media/vxd/decoder/vdec_defs.h
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
 F:	drivers/staging/media/vxd/decoder/vxd_core.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.h
+F:	drivers/staging/media/vxd/decoder/vxd_ext.h
 F:	drivers/staging/media/vxd/decoder/vxd_int.c
 F:	drivers/staging/media/vxd/decoder/vxd_int.h
+F:	drivers/staging/media/vxd/decoder/vxd_mmu_defs.h
+F;	drivers/staging/media/vxd/decoder/vxd_props.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec.c
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
drivers/staging/media/vxd/common/img_errors.h new file +104 -0

104 lines not on this page · raw message

drivers/staging/media/vxd/common/img_mem.h new file +43 -0

43 lines not on this page · raw message

drivers/staging/media/vxd/decoder/fw_interface.h new file +818 -0

818 lines not on this page · raw message

drivers/staging/media/vxd/decoder/h264fw_data.h new file +652 -0

652 lines not on this page · raw message

drivers/staging/media/vxd/decoder/hevcfw_data.h new file +472 -0

472 lines not on this page · raw message

drivers/staging/media/vxd/decoder/img_pixfmts.h new file +195 -0

195 lines not on this page · raw message

drivers/staging/media/vxd/decoder/img_profiles_levels.h new file +33 -0
new file mode 100644
index 000000000000..710b429f7f3e
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * VXD DEC SYSDEV and UI Interface header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2021 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Authors:
+ *	Amit Makani <[email protected]>
+ *
+ * Re-written for upstreamimg
+ *	Sidraya Jayagond <[email protected]>
+ */
+
+#ifndef __IMG_PROFILES_LEVELS_H
+#define __IMG_PROFILES_LEVELS_H
+
+#include "vdecdd_utils.h"
+
+/* Minimum level value for h.264 */
+#define H264_LEVEL_MIN              (9)
+/* Maximum level value for h.264 */
+#define H264_LEVEL_MAX             (52)
+/* Number of major levels for h.264 (5 + 1 for special levels) */
+#define H264_LEVEL_MAJOR_NUM        (6)
+/* Number of minor levels for h.264 */
+#define H264_LEVEL_MINOR_NUM            (4)
+/* Number of major levels for HEVC */
+#define HEVC_LEVEL_MAJOR_NUM        (6)
+/* Number of minor levels for HEVC */
+#define HEVC_LEVEL_MINOR_NUM        (3)
+
+#endif /*__IMG_PROFILES_LEVELS_H */
drivers/staging/media/vxd/decoder/jpegfw_data.h new file +83 -0

83 lines not on this page · raw message

drivers/staging/media/vxd/decoder/mmu_defs.h new file +42 -0

42 lines not on this page · raw message

drivers/staging/media/vxd/decoder/scaler_setup.h new file +59 -0

59 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vdec_defs.h new file +548 -0

453 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_ext.h new file +74 -0

74 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_mmu_defs.h new file +30 -0
new file mode 100644
index 000000000000..77d493cb39f2

Lines of this file are not shown. View the raw message.

drivers/staging/media/vxd/decoder/vxd_props.h new file +80 -0

80 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

Part of the diff is not shown here. View the raw message.

#22 lore raw

PATCH 15/30 v4l: vxd-dec: Add firmware interface headers

In reply to [email protected]

From: Sidraya <[email protected]>

This patch includes IMG D5520 registers and firmware headers and utility to decode the registers.

---
 MAINTAINERS                                   |  21 +
 drivers/staging/media/vxd/decoder/h264_idx.h  |  60 ++
 drivers/staging/media/vxd/decoder/h264_vlc.h  | 604 ++++++++++++
 .../media/vxd/decoder/h264fw_data_shared.h    | 759 +++++++++++++++
 .../media/vxd/decoder/hevcfw_data_shared.h    | 767 +++++++++++++++
 .../media/vxd/decoder/img_msvdx_cmds.h        | 279 ++++++
 .../media/vxd/decoder/img_msvdx_core_regs.h   |  22 +
 .../media/vxd/decoder/img_msvdx_vdmc_regs.h   |  26 +
 .../media/vxd/decoder/img_msvdx_vec_regs.h    |  60 ++
 .../media/vxd/decoder/img_pvdec_core_regs.h   |  60 ++
 .../media/vxd/decoder/img_pvdec_pixel_regs.h  |  35 +
 .../media/vxd/decoder/img_pvdec_test_regs.h   |  39 +
 .../media/vxd/decoder/img_vdec_fw_msg.h       | 192 ++++
 .../vxd/decoder/img_video_bus4_mmu_regs.h     | 120 +++
 .../media/vxd/decoder/jpegfw_data_shared.h    |  84 ++
 drivers/staging/media/vxd/decoder/mem_io.h    |  42 +
 .../media/vxd/decoder/pvdec_entropy_regs.h    |  33 +
 drivers/staging/media/vxd/decoder/pvdec_int.h |  82 ++
 .../media/vxd/decoder/pvdec_vec_be_regs.h     |  35 +
 drivers/staging/media/vxd/decoder/reg_io2.h   |  74 ++
 .../staging/media/vxd/decoder/vdecfw_share.h  |  36 +
 .../staging/media/vxd/decoder/vdecfw_shared.h | 893 ++++++++++++++++++
 22 files changed, 4323 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/h264_idx.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_vlc.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264fw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevcfw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_cmds.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_core_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_vdmc_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_vec_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_core_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_pixel_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_test_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_vdec_fw_msg.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_video_bus4_mmu_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpegfw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/mem_io.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_entropy_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_vec_be_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/reg_io2.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecfw_share.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecfw_shared.h
MAINTAINERS +21 -0
index c7a6a0974415..a00ac0852b2a 100644
@@ -19566,21 +19566,40 @@ F:	drivers/staging/media/vxd/decoder/bspp.c
 F:	drivers/staging/media/vxd/decoder/bspp.h
 F:	drivers/staging/media/vxd/decoder/bspp_int.h
 F:	drivers/staging/media/vxd/decoder/fw_interface.h
+F:	drivers/staging/media/vxd/decoder/h264_idx.h
 F:	drivers/staging/media/vxd/decoder/h264_secure_parser.c
 F:	drivers/staging/media/vxd/decoder/h264_secure_parser.h
+F:	drivers/staging/media/vxd/decoder/h264_vlc.h
 F:	drivers/staging/media/vxd/decoder/h264fw_data.h
+F:	drivers/staging/media/vxd/decoder/h264fw_data_shared.h
 F:	drivers/staging/media/vxd/decoder/hevc_secure_parser.c
 F:	drivers/staging/media/vxd/decoder/hevc_secure_parser.h
 F:	drivers/staging/media/vxd/decoder/hevcfw_data.h
+F:	drivers/staging/media/vxd/decoder/hevcfw_data_shared.h
 F:	drivers/staging/media/vxd/decoder/hw_control.c
 F:	drivers/staging/media/vxd/decoder/hw_control.h
 F:	drivers/staging/media/vxd/decoder/img_dec_common.h
+F:	drivers/staging/media/vxd/decoder/img_msvdx_cmds.h
+F:	drivers/staging/media/vxd/decoder/img_msvdx_core_regs.h
+F:	drivers/staging/media/vxd/decoder/img_msvdx_vdmc_regs.h
+F:	drivers/staging/media/vxd/decoder/img_msvdx_vec_regs.h
 F:	drivers/staging/media/vxd/decoder/img_pixfmts.h
 F:	drivers/staging/media/vxd/decoder/img_profiles_levels.h
+F:	drivers/staging/media/vxd/decoder/img_pvdec_core_regs.h
+F:	drivers/staging/media/vxd/decoder/img_pvdec_pixel_regs.h
+F:	drivers/staging/media/vxd/decoder/img_pvdec_test_regs.h
+F:	drivers/staging/media/vxd/decoder/img_vdec_fw_msg.h
+F:	drivers/staging/media/vxd/decoder/img_video_bus4_mmu_regs.h
 F:	drivers/staging/media/vxd/decoder/jpeg_secure_parser.c
 F:	drivers/staging/media/vxd/decoder/jpeg_secure_parser.h
 F:	drivers/staging/media/vxd/decoder/jpegfw_data.h
+F:	drivers/staging/media/vxd/decoder/jpegfw_data_shared.h
+F:	drivers/staging/media/vxd/decoder/mem_io.h
 F:	drivers/staging/media/vxd/decoder/mmu_defs.h
+F:	drivers/staging/media/vxd/decoder/pvdec_entropy_regs.h
+F:	drivers/staging/media/vxd/decoder/pvdec_int.h
+F:	drivers/staging/media/vxd/decoder/pvdec_vec_be_regs.h
+F:	drivers/staging/media/vxd/decoder/reg_io2.h
 F:	drivers/staging/media/vxd/decoder/scaler_setup.h
 F:	drivers/staging/media/vxd/decoder/swsr.c
 F:	drivers/staging/media/vxd/decoder/swsr.h
@@ -19589,6 +19608,8 @@ F:	drivers/staging/media/vxd/decoder/translation_api.h
 F:	drivers/staging/media/vxd/decoder/vdec_defs.h
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
+F:	drivers/staging/media/vxd/decoder/vdecfw_share.h
+F:	drivers/staging/media/vxd/decoder/vdecfw_shared.h
 F:	drivers/staging/media/vxd/decoder/vxd_core.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.c
 F:	drivers/staging/media/vxd/decoder/vxd_dec.h
drivers/staging/media/vxd/decoder/h264_idx.h new file +60 -0

60 lines not on this page · raw message

drivers/staging/media/vxd/decoder/h264_vlc.h new file +604 -0

604 lines not on this page · raw message

drivers/staging/media/vxd/decoder/h264fw_data_shared.h new file +759 -0

759 lines not on this page · raw message

drivers/staging/media/vxd/decoder/hevcfw_data_shared.h new file +767 -0

767 lines not on this page · raw message

drivers/staging/media/vxd/decoder/img_msvdx_cmds.h new file +279 -0

279 lines not on this page · raw message

drivers/staging/media/vxd/decoder/img_msvdx_core_regs.h new file +22 -0
new file mode 100644
index 000000000000..d46d5e04e826
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * IMG MSVDX core Registers
+ * This file contains the MSVDX_CORE_REGS_H Definitions
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2021 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Authors:
+ *	Amit Makani <[email protected]>
+ *
+ * Re-written for upstreamimg
+ *	Sidraya Jayagond <[email protected]>
+ */
+
+#ifndef _IMG_MSVDX_CORE_REGS_H
+#define _IMG_MSVDX_CORE_REGS_H
+
+#define MSVDX_CORE_CR_MMU_TILE_NO_ENTRIES               (4)
+#define MSVDX_CORE_CR_MMU_TILE_EXT_NO_ENTRIES           (4)
+
+#endif /* _IMG_MSVDX_CORE_REGS_H */
drivers/staging/media/vxd/decoder/img_msvdx_vdmc_regs.h new file +26 -0
new file mode 100644
index 000000000000..493eb7114ad7
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * IMG MSVDX VDMC Registers
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2021 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Authors:
+ *	Amit Makani <[email protected]>
+ *
+ * Re-written for upstreamimg
+ *	Sidraya Jayagond <[email protected]>
+ */
+
+#ifndef _IMG_MSVDX_VDMC_REGS_H
+#define _IMG_MSVDX_VDMC_REGS_H
+
+/* MSVDX_VDMC, CR_VDMC_MACROBLOCK_NUMBER, CR_VDMC_MACROBLOCK_X_OFFSET */
+#define MSVDX_VDMC_CR_VDMC_MACROBLOCK_NUMBER_CR_VDMC_MACROBLOCK_X_OFFSET_MASK           (0x0000FFFF)
+#define MSVDX_VDMC_CR_VDMC_MACROBLOCK_NUMBER_CR_VDMC_MACROBLOCK_X_OFFSET_SHIFT          (0)
+
+/* MSVDX_VDMC, CR_VDMC_MACROBLOCK_NUMBER, CR_VDMC_MACROBLOCK_Y_OFFSET */
+#define MSVDX_VDMC_CR_VDMC_MACROBLOCK_NUMBER_CR_VDMC_MACROBLOCK_Y_OFFSET_MASK           (0xFFFF0000)
+#define MSVDX_VDMC_CR_VDMC_MACROBLOCK_NUMBER_CR_VDMC_MACROBLOCK_Y_OFFSET_SHIFT          (16)
+
+#endif /* _IMG_MSVDX_VDMC_REGS_H */
drivers/staging/media/vxd/decoder/img_msvdx_vec_regs.h new file +60 -0

60 lines not on this page · raw message

drivers/staging/media/vxd/decoder/img_pvdec_core_regs.h new file +60 -0

60 lines not on this page · raw message

drivers/staging/media/vxd/decoder/img_pvdec_pixel_regs.h new file +35 -0
new file mode 100644
index 000000000000..be122c41d4b9
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * IMG PVDEC pixel Registers
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2021 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Authors:
+ *	Amit Makani <[email protected]>
+ *
+ * Re-written for upstreamimg
+ *	Sidraya Jayagond <[email protected]>
+ */
+
+#ifndef _IMG_PVDEC_PIXEL_REGS_H
+#define _IMG_PVDEC_PIXEL_REGS_H
+
+/* PVDEC_PIXEL, CR_MAX_FRAME_CONFIG, CR_PVDEC_HOR_MSB */
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_PVDEC_HOR_MSB_MASK           (0x001F0000)
+
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_PVDEC_HOR_MSB_SHIFT          (16)
+
+/* PVDEC_PIXEL, CR_MAX_FRAME_CONFIG, CR_PVDEC_VER_MSB */
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_PVDEC_VER_MSB_MASK           (0x1F000000)
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_PVDEC_VER_MSB_SHIFT          (24)
+
+/* PVDEC_PIXEL, CR_MAX_FRAME_CONFIG, CR_MSVDX_HOR_MSB */
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_MSVDX_HOR_MSB_MASK           (0x0000001F)
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_MSVDX_HOR_MSB_SHIFT          (0)
+
+/* PVDEC_PIXEL, CR_MAX_FRAME_CONFIG, CR_MSVDX_VER_MSB */
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_MSVDX_VER_MSB_MASK           (0x00001F00)
+#define PVDEC_PIXEL_CR_MAX_FRAME_CONFIG_CR_MSVDX_VER_MSB_SHIFT          (8)
+
+#endif /* _IMG_PVDEC_PIXEL_REGS_H */
drivers/staging/media/vxd/decoder/img_pvdec_test_regs.h new file +39 -0
new file mode 100644
index 000000000000..7cf2f2ded360
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * IMG PVDEC test Registers
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2021 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Authors:
+ *	Amit Makani <[email protected]>
+ *
+ * Re-written for upstreamimg
+ *	Sidraya Jayagond <[email protected]>
+ */
+
+#ifndef _IMG_PVDEC_TEST_REGS_H
+#define _IMG_PVDEC_TEST_REGS_H
+
+/* PVDEC_TEST, RAND_STL_MEM_RDATA_CONFIG, STALL_ENABLE_MEM_RDATA */
+#define PVDEC_TEST_MEM_READ_LATENCY_OFFSET              (0x00F0)
+
+/* PVDEC_TEST, MEM_READ_LATENCY, READ_RESPONSE_RAND_LATENCY */
+#define PVDEC_TEST_MEM_WRITE_RESPONSE_LATENCY_OFFSET            (0x00F4)
+
+/* PVDEC_TEST, MEM_WRITE_RESPONSE_LATENCY, WRITE_RESPONSE_RAND_LATENCY */
+#define PVDEC_TEST_MEM_CTRL_OFFSET              (0x00F8)
+
+/* PVDEC_TEST, RAND_STL_MEM_WDATA_CONFIG, STALL_ENABLE_MEM_WDATA */
+#define PVDEC_TEST_RAND_STL_MEM_WRESP_CONFIG_OFFSET             (0x00E8)
+
+/* PVDEC_TEST, RAND_STL_MEM_WRESP_CONFIG, STALL_ENABLE_MEM_WRESP */
+#define PVDEC_TEST_RAND_STL_MEM_RDATA_CONFIG_OFFSET             (0x00EC)
+
+/* PVDEC_TEST, MEMORY_BUS2_MONITOR_2, BUS2_ADDR */
+#define PVDEC_TEST_RAND_STL_MEM_CMD_CONFIG_OFFSET               (0x00E0)
+
+/* PVDEC_TEST, RAND_STL_MEM_CMD_CONFIG, STALL_ENABLE_MEM_CMD */
+#define PVDEC_TEST_RAND_STL_MEM_WDATA_CONFIG_OFFSET             (0x00E4)
+
+#endif /* _IMG_PVDEC_TEST_REGS_H */
drivers/staging/media/vxd/decoder/img_vdec_fw_msg.h new file +192 -0

192 lines not on this page · raw message

drivers/staging/media/vxd/decoder/img_video_bus4_mmu_regs.h new file +120 -0

49 lines not on this page · raw message

drivers/staging/media/vxd/decoder/jpegfw_data_shared.h new file +84 -0

84 lines not on this page · raw message

drivers/staging/media/vxd/decoder/mem_io.h new file +42 -0

42 lines not on this page · raw message

drivers/staging/media/vxd/decoder/pvdec_entropy_regs.h new file +33 -0
new file mode 100644
index 000000000000..3c495c198853

Lines of this file are not shown. View the raw message.

drivers/staging/media/vxd/decoder/pvdec_int.h new file +82 -0

82 lines not on this page · raw message

drivers/staging/media/vxd/decoder/pvdec_vec_be_regs.h new file +35 -0
new file mode 100644
index 000000000000..06593f050a97

Lines of this file are not shown. View the raw message.

drivers/staging/media/vxd/decoder/reg_io2.h new file +74 -0

74 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vdecfw_share.h new file +36 -0
new file mode 100644
index 000000000000..7c6b9df00472

Lines of this file are not shown. View the raw message.

drivers/staging/media/vxd/decoder/vdecfw_shared.h new file +893 -0

893 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

Part of the diff is not shown here. View the raw message.

#23 lore raw

PATCH 16/30 v4l: vxd-dec: Add pool api modules

In reply to [email protected]

From: Sidraya <[email protected]>

This patch create and destroy the pool of the resources and it manages the allocation and free of the resources.

---
 MAINTAINERS                                 |   2 +
 drivers/staging/media/vxd/common/pool_api.c | 709 ++++++++++++++++++++
 drivers/staging/media/vxd/common/pool_api.h | 113 ++++
 3 files changed, 824 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/pool_api.c
 create mode 100644 drivers/staging/media/vxd/common/pool_api.h
MAINTAINERS +2 -0
index a00ac0852b2a..f7e55791f355 100644
@@ -19556,6 +19556,8 @@ F:	drivers/staging/media/vxd/common/lst.c
 F:	drivers/staging/media/vxd/common/lst.h
 F:	drivers/staging/media/vxd/common/pool.c
 F:	drivers/staging/media/vxd/common/pool.h
+F:	drivers/staging/media/vxd/common/pool_api.c
+F:	drivers/staging/media/vxd/common/pool_api.h
 F:	drivers/staging/media/vxd/common/ra.c
 F:	drivers/staging/media/vxd/common/ra.h
 F:	drivers/staging/media/vxd/common/talmmu_api.c
drivers/staging/media/vxd/common/pool_api.c new file +709 -0

709 lines not on this page · raw message

drivers/staging/media/vxd/common/pool_api.h new file +113 -0

113 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#24 lore raw

PATCH 17/30 v4l: vxd-dec: This patch implements resource manage component

In reply to [email protected]

From: Sidraya <[email protected]>

This component is used to track decoder resources, and share them across other components.

---
 MAINTAINERS                                 |   2 +
 drivers/staging/media/vxd/common/rman_api.c | 620 ++++++++++++++++++++
 drivers/staging/media/vxd/common/rman_api.h |  66 +++
 3 files changed, 688 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/rman_api.c
 create mode 100644 drivers/staging/media/vxd/common/rman_api.h
MAINTAINERS +2 -0
index f7e55791f355..d126162984c6 100644
@@ -19560,6 +19560,8 @@ F:	drivers/staging/media/vxd/common/pool_api.c
 F:	drivers/staging/media/vxd/common/pool_api.h
 F:	drivers/staging/media/vxd/common/ra.c
 F:	drivers/staging/media/vxd/common/ra.h
+F:	drivers/staging/media/vxd/common/rman_api.c
+F:	drivers/staging/media/vxd/common/rman_api.h
 F:	drivers/staging/media/vxd/common/talmmu_api.c
 F:	drivers/staging/media/vxd/common/talmmu_api.h
 F:	drivers/staging/media/vxd/common/work_queue.c
drivers/staging/media/vxd/common/rman_api.c new file +620 -0

620 lines not on this page · raw message

drivers/staging/media/vxd/common/rman_api.h new file +66 -0

66 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#25 lore raw

PATCH 18/30 v4l: vxd-dec: This patch implements pixel processing library

In reply to [email protected]

From: Sidraya <[email protected]>

This library is used to handle different pixel format layouts.

---
 MAINTAINERS                                   |   2 +
 drivers/staging/media/vxd/decoder/pixel_api.c | 895 ++++++++++++++++++
 drivers/staging/media/vxd/decoder/pixel_api.h | 152 +++
 3 files changed, 1049 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/pixel_api.c
 create mode 100644 drivers/staging/media/vxd/decoder/pixel_api.h
MAINTAINERS +2 -0
index d126162984c6..bf47d48a1ec2 100644
@@ -19600,6 +19600,8 @@ F:	drivers/staging/media/vxd/decoder/jpegfw_data.h
 F:	drivers/staging/media/vxd/decoder/jpegfw_data_shared.h
 F:	drivers/staging/media/vxd/decoder/mem_io.h
 F:	drivers/staging/media/vxd/decoder/mmu_defs.h
+F:	drivers/staging/media/vxd/decoder/pixel_api.c
+F:	drivers/staging/media/vxd/decoder/pixel_api.h
 F:	drivers/staging/media/vxd/decoder/pvdec_entropy_regs.h
 F:	drivers/staging/media/vxd/decoder/pvdec_int.h
 F:	drivers/staging/media/vxd/decoder/pvdec_vec_be_regs.h
drivers/staging/media/vxd/decoder/pixel_api.c new file +895 -0

895 lines not on this page · raw message

drivers/staging/media/vxd/decoder/pixel_api.h new file +152 -0

152 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#26 lore raw

PATCH 19/30 v4l:vxd-dec:vdecdd utility library

In reply to [email protected]

From: Sidraya <[email protected]>

This library handles picture buffer pixel format checking and layout conversion to suit HW requirements.

---
 MAINTAINERS                                   |   3 +
 .../staging/media/vxd/decoder/vdecdd_utils.c  |  95 ++
 .../staging/media/vxd/decoder/vdecdd_utils.h  |  93 ++
 .../media/vxd/decoder/vdecdd_utils_buf.c      | 897 ++++++++++++++++++
 4 files changed, 1088 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils_buf.c
MAINTAINERS +3 -0
index bf47d48a1ec2..c7edc60f4d5b 100644
@@ -19614,6 +19614,9 @@ F:	drivers/staging/media/vxd/decoder/translation_api.h
 F:	drivers/staging/media/vxd/decoder/vdec_defs.h
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
+F:	drivers/staging/media/vxd/decoder/vdecdd_utils.c
+F:	drivers/staging/media/vxd/decoder/vdecdd_utils.h
+F:	drivers/staging/media/vxd/decoder/vdecdd_utils_buf.c
 F:	drivers/staging/media/vxd/decoder/vdecfw_share.h
 F:	drivers/staging/media/vxd/decoder/vdecfw_shared.h
 F:	drivers/staging/media/vxd/decoder/vxd_core.c
drivers/staging/media/vxd/decoder/vdecdd_utils.c new file +95 -0

95 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vdecdd_utils.h new file +93 -0

93 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vdecdd_utils_buf.c new file +897 -0

897 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#27 lore raw

PATCH 20/30 v4l:vxd-dec:Decoder resource component

In reply to [email protected]

From: Sidraya <[email protected]>

Decoder resource component is responsible for allocating all the internal, auxiliary resources required for decoder and maintain their life cycle.

---
 MAINTAINERS                                   |   2 +
 .../staging/media/vxd/decoder/dec_resources.c | 554 ++++++++++++++++++
 .../staging/media/vxd/decoder/dec_resources.h |  46 ++
 3 files changed, 602 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/dec_resources.c
 create mode 100644 drivers/staging/media/vxd/decoder/dec_resources.h
MAINTAINERS +2 -0
index c7edc60f4d5b..6dadec058ab3 100644
@@ -19569,6 +19569,8 @@ F:	drivers/staging/media/vxd/common/work_queue.h
 F:	drivers/staging/media/vxd/decoder/bspp.c
 F:	drivers/staging/media/vxd/decoder/bspp.h
 F:	drivers/staging/media/vxd/decoder/bspp_int.h
+F:	drivers/staging/media/vxd/decoder/dec_resources.c
+F:	drivers/staging/media/vxd/decoder/dec_resources.h
 F:	drivers/staging/media/vxd/decoder/fw_interface.h
 F:	drivers/staging/media/vxd/decoder/h264_idx.h
 F:	drivers/staging/media/vxd/decoder/h264_secure_parser.c
drivers/staging/media/vxd/decoder/dec_resources.c new file +554 -0

554 lines not on this page · raw message

drivers/staging/media/vxd/decoder/dec_resources.h new file +46 -0

46 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#28 lore raw

PATCH 21/30 v4l:vxd-dec:Decoder Core Component

In reply to [email protected]

From: Sidraya <[email protected]>

Core component is the entry point for decoder
stack, and manages decoder state machine.

---
 MAINTAINERS                              |    2 +
 drivers/staging/media/vxd/decoder/core.c | 3656 ++++++++++++++++++++++
 drivers/staging/media/vxd/decoder/core.h |   72 +
 3 files changed, 3730 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/core.c
 create mode 100644 drivers/staging/media/vxd/decoder/core.h
MAINTAINERS +2 -0
index 6dadec058ab3..41716f2916d1 100644
@@ -19569,6 +19569,8 @@ F:	drivers/staging/media/vxd/common/work_queue.h
 F:	drivers/staging/media/vxd/decoder/bspp.c
 F:	drivers/staging/media/vxd/decoder/bspp.h
 F:	drivers/staging/media/vxd/decoder/bspp_int.h
+F:	drivers/staging/media/vxd/decoder/core.c
+F:	drivers/staging/media/vxd/decoder/core.h
 F:	drivers/staging/media/vxd/decoder/dec_resources.c
 F:	drivers/staging/media/vxd/decoder/dec_resources.h
 F:	drivers/staging/media/vxd/decoder/fw_interface.h
drivers/staging/media/vxd/decoder/core.c new file +3656 -0

2,992 lines not on this page · raw message

drivers/staging/media/vxd/decoder/core.h new file +72 -0

72 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

Part of the diff is not shown here. View the raw message.

#29 lore raw

PATCH 22/30 v4l:vxd-dec:vdecdd headers added

In reply to [email protected]

From: Sidraya <[email protected]>

The header file define all the high level data structures required for decoder, hwcontrol, core and v4l2 decoder components.

---
 MAINTAINERS                                   |   1 +
 .../staging/media/vxd/decoder/vdecdd_defs.h   | 446 ++++++++++++++++++
 2 files changed, 447 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_defs.h
MAINTAINERS +1 -0
index 41716f2916d1..fa5c69d71c3e 100644
@@ -19618,6 +19618,7 @@ F:	drivers/staging/media/vxd/decoder/translation_api.h
 F:	drivers/staging/media/vxd/decoder/vdec_defs.h
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
 F:	drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
+F:	drivers/staging/media/vxd/decoder/vdecdd_defs.h
 F:	drivers/staging/media/vxd/decoder/vdecdd_utils.c
 F:	drivers/staging/media/vxd/decoder/vdecdd_utils.h
 F:	drivers/staging/media/vxd/decoder/vdecdd_utils_buf.c
drivers/staging/media/vxd/decoder/vdecdd_defs.h new file +446 -0

446 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#30 lore raw

PATCH 23/30 v4l:vxd-dec:Decoder Component

In reply to [email protected]

From: Sidraya <[email protected]>

Decoder component is responsible for managing decoder state machine and resource allocation, firmware message preparation and firmware response processing

---
 MAINTAINERS                                 |    2 +
 drivers/staging/media/vxd/decoder/decoder.c | 4622 +++++++++++++++++++
 drivers/staging/media/vxd/decoder/decoder.h |  375 ++
 3 files changed, 4999 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/decoder.c
 create mode 100644 drivers/staging/media/vxd/decoder/decoder.h
MAINTAINERS +2 -0
index fa5c69d71c3e..7c7c008efd97 100644
@@ -19573,6 +19573,8 @@ F:	drivers/staging/media/vxd/decoder/core.c
 F:	drivers/staging/media/vxd/decoder/core.h
 F:	drivers/staging/media/vxd/decoder/dec_resources.c
 F:	drivers/staging/media/vxd/decoder/dec_resources.h
+F:	drivers/staging/media/vxd/decoder/decoder.c
+F:	drivers/staging/media/vxd/decoder/decoder.h
 F:	drivers/staging/media/vxd/decoder/fw_interface.h
 F:	drivers/staging/media/vxd/decoder/h264_idx.h
 F:	drivers/staging/media/vxd/decoder/h264_secure_parser.c
drivers/staging/media/vxd/decoder/decoder.c new file +4622 -0

2,992 lines not on this page · raw message

drivers/staging/media/vxd/decoder/decoder.h new file +375 -0

375 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

Part of the diff is not shown here. View the raw message.

#31 lore raw

PATCH 24/30 v4l:vxd-dec: Add resource manager

In reply to [email protected]

From: Sidraya <[email protected]>

This module handles the resources which is added to list and return the resource based requested list.

---
 MAINTAINERS                                 |   2 +
 drivers/staging/media/vxd/common/resource.c | 576 ++++++++++++++++++++
 drivers/staging/media/vxd/common/resource.h |  66 +++
 3 files changed, 644 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/resource.c
 create mode 100644 drivers/staging/media/vxd/common/resource.h
MAINTAINERS +2 -0
index 7c7c008efd97..b5875f9015ba 100644
@@ -19560,6 +19560,8 @@ F:	drivers/staging/media/vxd/common/pool_api.c
 F:	drivers/staging/media/vxd/common/pool_api.h
 F:	drivers/staging/media/vxd/common/ra.c
 F:	drivers/staging/media/vxd/common/ra.h
+F:	drivers/staging/media/vxd/common/resource.c
+F:	drivers/staging/media/vxd/common/resource.h
 F:	drivers/staging/media/vxd/common/rman_api.c
 F:	drivers/staging/media/vxd/common/rman_api.h
 F:	drivers/staging/media/vxd/common/talmmu_api.c
drivers/staging/media/vxd/common/resource.c new file +576 -0

576 lines not on this page · raw message

drivers/staging/media/vxd/common/resource.h new file +66 -0

66 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
maintainer
#32 lore raw

Re: [PATCH 24/30] v4l:vxd-dec: Add resource manager

Quoted 4 lines · On Wed, Aug 18, 2021 at 07:40:31PM +0530, [email protected] wrote:

From: Sidraya <[email protected]>

This module handles the resources which is added to list and return the resource based requested list.

That does not describe this code at all.

Why is this needed? What is wrong with the in-kernel resource manager logic that requires this custom code instead?

Be more specific and verbose please.

thanks,

greg k-h

#33 lore raw

PATCH 25/30 v4l: videodev2: Add 10bit definitions for NV12 and NV16 color formats

In reply to [email protected]

From: Sidraya <[email protected]>

The default color formats support only 8bit color depth. This patch adds 10bit definitions for NV12 and NV16.

---
 drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++
 include/uapi/linux/videodev2.h       | 2 ++
 2 files changed, 4 insertions(+)
drivers/media/v4l2-core/v4l2-ioctl.c +2 -0
index 05d5db3d85e5..445458c15168 100644
@@ -1367,6 +1367,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	case V4L2_META_FMT_VIVID:       descr = "Vivid Metadata"; break;
 	case V4L2_META_FMT_RK_ISP1_PARAMS:	descr = "Rockchip ISP1 3A Parameters"; break;
 	case V4L2_META_FMT_RK_ISP1_STAT_3A:	descr = "Rockchip ISP1 3A Statistics"; break;
+	case V4L2_PIX_FMT_TI1210:       descr = "10-bit YUV 4:2:0 (NV12)"; break;
+	case V4L2_PIX_FMT_TI1610:       descr = "10-bit YUV 4:2:2 (NV16)"; break;
 
 	default:
 		/* Compressed formats */
include/uapi/linux/videodev2.h +2 -0
index 9260791b8438..a71ffd686050 100644
@@ -737,6 +737,8 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */
 #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */
 #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */
+#define V4L2_PIX_FMT_TI1210   v4l2_fourcc('T', 'I', '1', '2') /* TI NV12 10-bit, two bytes per channel */
+#define V4L2_PIX_FMT_TI1610   v4l2_fourcc('T', 'I', '1', '6') /* TI NV16 10-bit, two bytes per channel */
 
 /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */
 #define V4L2_PIX_FMT_IPU3_SBGGR10	v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */
Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#34 lore raw

Re: [PATCH 25/30] v4l: videodev2: Add 10bit definitions for NV12 and NV16 color formats

Le mercredi 18 août 2021 à 19:40 +0530, [email protected] a écrit :

Quoted 30 lines

From: Sidraya <[email protected]>

The default color formats support only 8bit color depth. This patch adds 10bit definitions for NV12 and NV16.

---
 drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++
 include/uapi/linux/videodev2.h       | 2 ++
 2 files changed, 4 insertions(+)
drivers/media/v4l2-core/v4l2-ioctl.c +2 -0
index 05d5db3d85e5..445458c15168 100644
@@ -1367,6 +1367,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	case V4L2_META_FMT_VIVID:       descr = "Vivid Metadata"; break;
 	case V4L2_META_FMT_RK_ISP1_PARAMS:	descr = "Rockchip ISP1 3A Parameters"; break;
 	case V4L2_META_FMT_RK_ISP1_STAT_3A:	descr = "Rockchip ISP1 3A Statistics"; break;
+	case V4L2_PIX_FMT_TI1210:       descr = "10-bit YUV 4:2:0 (NV12)"; break;
+	case V4L2_PIX_FMT_TI1610:       descr = "10-bit YUV 4:2:2 (NV16)"; break;
 
 	default:
 		/* Compressed formats */
include/uapi/linux/videodev2.h +0 -0
index 9260791b8438..a71ffd686050 100644

include/uapi/linux/videodev2.h struct v4l2_pix_format { · line 741

Quoted 5 lines
include/uapi/linux/videodev2.h +2 -0
@@ -737,6 +737,8 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */
 #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */
 #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */
+#define V4L2_PIX_FMT_TI1210   v4l2_fourcc('T', 'I', '1', '2') /* TI NV12 10-bit, two bytes per channel */
+#define V4L2_PIX_FMT_TI1610   v4l2_fourcc('T', 'I', '1', '6') /* TI NV16 10-bit, two bytes per channel */

As we try and avoid past mistakes (consider HM12 and Sunxi Tiled format as an example), what makes your pixel format 100% TI specific ? The only valid answer is usually compression or a very odd pixel arrangement that only makes sense for a specific HW, in any case, please provide all the information you can about this format (tiling pattern, block size, compression is any). This way we can judge if allocating a vendor format actually make sense. It would be sad if this turns out to be just another 16x16 tiled format (yes, we have multiple already).

From past experience with OMAP, TI CODECs uses linear tiling very similar to all other platforms, if that is the case, it should be added a generic format with with enough documentation for a third party to understand it. Of course, if any of the HW specification in this regard is public, please share or link to the related documents.

Quoted 7 lines
include/uapi/linux/videodev2.h +0 -0
 /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */
 #define V4L2_PIX_FMT_IPU3_SBGGR10	v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */
Signature · 1 line
2.17.1
#35 lore raw

PATCH 26/30 media: Kconfig: Add Video decoder kconfig and Makefile entries

In reply to [email protected]

From: Sidraya <[email protected]>

Add video decoder to Makefile
Add video decoder to Kconfig

---
 drivers/staging/media/Kconfig  | 2 ++
 drivers/staging/media/Makefile | 1 +
 2 files changed, 3 insertions(+)
drivers/staging/media/Kconfig +2 -0
index e3aaae920847..044763f8fe2e 100644
@@ -44,4 +44,6 @@ source "drivers/staging/media/ipu3/Kconfig"
 
 source "drivers/staging/media/av7110/Kconfig"
 
+source "drivers/staging/media/vxd/decoder/Kconfig"
+
 endif
drivers/staging/media/Makefile +1 -0
index 5b5afc5b03a0..567aed1d2d43 100644
@@ -11,3 +11,4 @@ obj-$(CONFIG_VIDEO_HANTRO)	+= hantro/
 obj-$(CONFIG_VIDEO_IPU3_IMGU)	+= ipu3/
 obj-$(CONFIG_VIDEO_ZORAN)	+= zoran/
 obj-$(CONFIG_DVB_AV7110)	+= av7110/
+obj-$(CONFIG_VIDEO_IMG_VXD_DEC)	+= vxd/decoder/
Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#36 lore raw

PATCH 27/30 media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile

In reply to [email protected]

From: Sidraya <[email protected]>

Add video decoder basic config to Kconfig and
select the required V4l2 modules.
Add video decoder Makefile.

---
 MAINTAINERS                                |   2 +
 drivers/staging/media/vxd/decoder/Kconfig  |  13 +++
 drivers/staging/media/vxd/decoder/Makefile | 129 +++++++++++++++++++++
 3 files changed, 144 insertions(+)
 create mode 100644 drivers/staging/media/vxd/decoder/Kconfig
 create mode 100644 drivers/staging/media/vxd/decoder/Makefile
MAINTAINERS +2 -0
index b5875f9015ba..0616ab620135 100644
@@ -19568,6 +19568,8 @@ F:	drivers/staging/media/vxd/common/talmmu_api.c
 F:	drivers/staging/media/vxd/common/talmmu_api.h
 F:	drivers/staging/media/vxd/common/work_queue.c
 F:	drivers/staging/media/vxd/common/work_queue.h
+F:	drivers/staging/media/vxd/decoder/Kconfig
+F:	drivers/staging/media/vxd/decoder/Makefile
 F:	drivers/staging/media/vxd/decoder/bspp.c
 F:	drivers/staging/media/vxd/decoder/bspp.h
 F:	drivers/staging/media/vxd/decoder/bspp_int.h
drivers/staging/media/vxd/decoder/Kconfig new file +13 -0
new file mode 100644
index 000000000000..5ee44cc07dd8
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config VIDEO_IMG_VXD_DEC
+	tristate "IMG VXD DEC (Video Decoder) driver"
+	depends on VIDEO_DEV && VIDEO_V4L2
+	select VIDEOBUF2_CORE
+	select VIDEOBUF2_DMA_CONTIG
+	select VIDEOBUF2_DMA_SG
+	select V4L2_MEM2MEM_DEV
+	help
+	  This is an IMG VXD DEC V4L2 driver that adds support for the
+	  Imagination D5520 (Video Decoder) hardware.
+	  The module name when built is vxd-dec.
drivers/staging/media/vxd/decoder/Makefile new file +129 -0

129 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#37 lore raw

Re: [PATCH 27/30] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile

I love your patch! Perhaps something to improve:

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on staging/staging-testing driver-core/driver-core-testing linus/master v5.14-rc6 next-20210818] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
base:   git://linuxtv.org/media_tree.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f42ae4f45639a6214f9e775d4280061bf52fc229
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811 git checkout f42ae4f45639a6214f9e775d4280061bf52fc229
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

In file included from include/linux/printk.h:456,
from include/linux/kernel.h:19,
from include/linux/radix-tree.h:12,
from include/linux/idr.h:15,
from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function '_img_mem_alloc':

>> drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
     290 |         dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
     134 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
     166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:9: note: in expansion of macro 'dev_dbg'
     290 |         dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
         |         ^~~~~~~
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:81: note: format string is defined here
     290 |         dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
         |                                                                               ~~^
         |                                                                                 |
         |                                                                                 unsigned int
         |                                                                               %lu
   In file included from include/linux/printk.h:456,
                    from include/linux/kernel.h:19,
                    from include/linux/radix-tree.h:12,
                    from include/linux/idr.h:15,
                    from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function 'img_mem_alloc':
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:25: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'long unsigned int' [-Wformat=]
     309 |         dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
     134 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
     166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:9: note: in expansion of macro 'dev_dbg'
     309 |         dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
         |         ^~~~~~~
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:51: note: format string is defined here
     309 |         dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
         |                                                 ~~^
         |                                                   |
         |                                                   unsigned int
         |                                                 %lu
   In file included from include/linux/printk.h:456,
                    from include/linux/kernel.h:19,
                    from include/linux/radix-tree.h:12,
                    from include/linux/idr.h:15,
                    from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
     333 |         dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
     134 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
     166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:9: note: in expansion of macro 'dev_dbg'
     333 |         dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
         |         ^~~~~~~
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:74: note: format string is defined here
     333 |         dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
         |                                                                        ~~^
         |                                                                          |
         |                                                                          unsigned int
         |                                                                        %lu
   In file included from include/linux/printk.h:456,
                    from include/linux/kernel.h:19,
                    from include/linux/radix-tree.h:12,
                    from include/linux/idr.h:15,
                    from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function '_img_mem_import':
   drivers/staging/media/vxd/decoder/../common/img_mem_man.c:372:25: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'long unsigned int' [-Wformat=]
     372 |         dev_dbg(device, "%s ctx %p created buffer %d (%p) actual_size %zu\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
     134 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
     166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
--
   drivers/staging/media/vxd/decoder/../common/work_queue.c: In function 'get_delayed_work_buff':
>> drivers/staging/media/vxd/decoder/../common/work_queue.c:148:22: warning: variable 'previous' set but not used [-Wunused-but-set-variable]
     148 |         struct node *previous = NULL;
         |                      ^~~~~~~~
--
>> drivers/staging/media/vxd/decoder/jpeg_secure_parser.c:596:5: warning: no previous prototype for 'bspp_jpeg_unit_parser' [-Wmissing-prototypes]

596 | int bspp_jpeg_unit_parser(void *swsr_ctx, struct bspp_unit_data *unit_data)
| ^~~~~~~~~~~~~~~~~~~~~

vim +290 drivers/staging/media/vxd/decoder/../common/img_mem_man.c

76b88427fbba69 Sidraya 2021-08-18  240  
76b88427fbba69 Sidraya 2021-08-18  241  static int _img_mem_alloc(void *device, struct mem_ctx *ctx,
76b88427fbba69 Sidraya 2021-08-18  242  			  struct heap *heap, unsigned long size,
76b88427fbba69 Sidraya 2021-08-18  243  			  enum mem_attr attr, struct buffer **buffer_new)
76b88427fbba69 Sidraya 2021-08-18  244  {
76b88427fbba69 Sidraya 2021-08-18  245  	struct buffer *buffer;
76b88427fbba69 Sidraya 2021-08-18  246  	int ret;
76b88427fbba69 Sidraya 2021-08-18  247  
76b88427fbba69 Sidraya 2021-08-18  248  	if (size == 0) {
76b88427fbba69 Sidraya 2021-08-18  249  		dev_err(device, "%s: buffer size is zero\n", __func__);
76b88427fbba69 Sidraya 2021-08-18  250  		return -EINVAL;
76b88427fbba69 Sidraya 2021-08-18  251  	}
76b88427fbba69 Sidraya 2021-08-18  252  
76b88427fbba69 Sidraya 2021-08-18  253  	if (!heap->ops || !heap->ops->alloc) {
76b88427fbba69 Sidraya 2021-08-18  254  		dev_err(device, "%s: no alloc function in heap %d!\n",
76b88427fbba69 Sidraya 2021-08-18  255  			__func__, heap->id);
76b88427fbba69 Sidraya 2021-08-18  256  		return -EINVAL;
76b88427fbba69 Sidraya 2021-08-18  257  	}
76b88427fbba69 Sidraya 2021-08-18  258  
76b88427fbba69 Sidraya 2021-08-18  259  	buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
76b88427fbba69 Sidraya 2021-08-18  260  	if (!buffer)
76b88427fbba69 Sidraya 2021-08-18  261  		return -ENOMEM;
76b88427fbba69 Sidraya 2021-08-18  262  
76b88427fbba69 Sidraya 2021-08-18  263  	ret = idr_alloc(ctx->buffers, buffer,
76b88427fbba69 Sidraya 2021-08-18  264  			MEM_MAN_MIN_BUFFER, MEM_MAN_MAX_BUFFER, GFP_KERNEL);
76b88427fbba69 Sidraya 2021-08-18  265  	if (ret < 0) {
76b88427fbba69 Sidraya 2021-08-18  266  		dev_err(device, "%s: idr_alloc failed\n", __func__);
76b88427fbba69 Sidraya 2021-08-18  267  		goto idr_alloc_failed;
76b88427fbba69 Sidraya 2021-08-18  268  	}
76b88427fbba69 Sidraya 2021-08-18  269  
76b88427fbba69 Sidraya 2021-08-18  270  	buffer->id = ret;
76b88427fbba69 Sidraya 2021-08-18  271  	buffer->request_size = size;
76b88427fbba69 Sidraya 2021-08-18  272  	buffer->actual_size = ((size + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE;
76b88427fbba69 Sidraya 2021-08-18  273  	buffer->device = device;
76b88427fbba69 Sidraya 2021-08-18  274  	buffer->mem_ctx = ctx;
76b88427fbba69 Sidraya 2021-08-18  275  	buffer->heap = heap;
76b88427fbba69 Sidraya 2021-08-18  276  	INIT_LIST_HEAD(&buffer->mappings);
76b88427fbba69 Sidraya 2021-08-18  277  	buffer->kptr = NULL;
76b88427fbba69 Sidraya 2021-08-18  278  	buffer->priv = NULL;
76b88427fbba69 Sidraya 2021-08-18  279  
76b88427fbba69 Sidraya 2021-08-18  280  	ret = heap->ops->alloc(device, heap, buffer->actual_size, attr,
76b88427fbba69 Sidraya 2021-08-18  281  		buffer);
76b88427fbba69 Sidraya 2021-08-18  282  	if (ret) {
76b88427fbba69 Sidraya 2021-08-18  283  		dev_err(device, "%s: heap %d alloc failed\n", __func__,
76b88427fbba69 Sidraya 2021-08-18  284  			heap->id);
76b88427fbba69 Sidraya 2021-08-18  285  		goto heap_alloc_failed;
76b88427fbba69 Sidraya 2021-08-18  286  	}
76b88427fbba69 Sidraya 2021-08-18  287  
76b88427fbba69 Sidraya 2021-08-18  288  	*buffer_new = buffer;
76b88427fbba69 Sidraya 2021-08-18  289  
76b88427fbba69 Sidraya 2021-08-18 @290  	dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
76b88427fbba69 Sidraya 2021-08-18  291  		__func__, heap, ctx, buffer->id, buffer, buffer->actual_size);
76b88427fbba69 Sidraya 2021-08-18  292  	return 0;
76b88427fbba69 Sidraya 2021-08-18  293  
76b88427fbba69 Sidraya 2021-08-18  294  heap_alloc_failed:
76b88427fbba69 Sidraya 2021-08-18  295  	idr_remove(ctx->buffers, buffer->id);
76b88427fbba69 Sidraya 2021-08-18  296  idr_alloc_failed:
76b88427fbba69 Sidraya 2021-08-18  297  	kfree(buffer);
76b88427fbba69 Sidraya 2021-08-18  298  	return ret;
76b88427fbba69 Sidraya 2021-08-18  299  }
76b88427fbba69 Sidraya 2021-08-18  300  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#38 lore raw

Re: [PATCH 27/30] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile

In reply to [email protected]
I love your patch! Yet something to improve:

Hi,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on staging/staging-testing driver-core/driver-core-testing linus/master v5.14-rc6 next-20210818] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
base:   git://linuxtv.org/media_tree.git master
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f42ae4f45639a6214f9e775d4280061bf52fc229
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811 git checkout f42ae4f45639a6214f9e775d4280061bf52fc229
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

drivers/staging/media/vxd/decoder/../common/img_mem_unified.c: In function 'unified_free':

>> drivers/staging/media/vxd/decoder/../common/img_mem_unified.c:159:17: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
     159 |                 vunmap(buffer->kptr);
         |                 ^~~~~~
         |                 kunmap
   drivers/staging/media/vxd/decoder/../common/img_mem_unified.c: In function 'unified_map_km':
>> drivers/staging/media/vxd/decoder/../common/img_mem_unified.c:197:24: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
     197 |         buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
         |                        ^~~~
         |                        kmap
>> drivers/staging/media/vxd/decoder/../common/img_mem_unified.c:197:63: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MTE'?
     197 |         buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
         |                                                               ^~~~~~
         |                                                               VM_MTE

drivers/staging/media/vxd/decoder/../common/img_mem_unified.c:197:63: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors

vim +159 drivers/staging/media/vxd/decoder/../common/img_mem_unified.c

76b88427fbba69 Sidraya 2021-08-18  145  
76b88427fbba69 Sidraya 2021-08-18  146  static void unified_free(struct heap *heap, struct buffer *buffer)
76b88427fbba69 Sidraya 2021-08-18  147  {
76b88427fbba69 Sidraya 2021-08-18  148  	void *dev = buffer->device;
76b88427fbba69 Sidraya 2021-08-18  149  	void *sgt = buffer->priv;
76b88427fbba69 Sidraya 2021-08-18  150  	void *sgl;
76b88427fbba69 Sidraya 2021-08-18  151  
76b88427fbba69 Sidraya 2021-08-18  152  	dev_dbg(dev, "%s:%d buffer %d (0x%p)\n", __func__, __LINE__,
76b88427fbba69 Sidraya 2021-08-18  153  		buffer->id, buffer);
76b88427fbba69 Sidraya 2021-08-18  154  
76b88427fbba69 Sidraya 2021-08-18  155  	if (buffer->kptr) {
76b88427fbba69 Sidraya 2021-08-18  156  		dev_dbg(dev, "%s vunmap 0x%p\n", __func__, buffer->kptr);
76b88427fbba69 Sidraya 2021-08-18  157  		dma_unmap_sg(dev, img_mmu_get_sgl(sgt), img_mmu_get_orig_nents(sgt),
76b88427fbba69 Sidraya 2021-08-18  158  			     DMA_FROM_DEVICE);
76b88427fbba69 Sidraya 2021-08-18 @159  		vunmap(buffer->kptr);
76b88427fbba69 Sidraya 2021-08-18  160  	}
76b88427fbba69 Sidraya 2021-08-18  161  
76b88427fbba69 Sidraya 2021-08-18  162  	sgl = img_mmu_get_sgl(sgt);
76b88427fbba69 Sidraya 2021-08-18  163  	while (sgl) {
76b88427fbba69 Sidraya 2021-08-18  164  		__free_page(sg_page(sgl));
76b88427fbba69 Sidraya 2021-08-18  165  		sgl = sg_next(sgl);
76b88427fbba69 Sidraya 2021-08-18  166  	}
76b88427fbba69 Sidraya 2021-08-18  167  	sg_free_table(sgt);
76b88427fbba69 Sidraya 2021-08-18  168  	kfree(sgt);
76b88427fbba69 Sidraya 2021-08-18  169  }
76b88427fbba69 Sidraya 2021-08-18  170  
76b88427fbba69 Sidraya 2021-08-18  171  static int unified_map_km(struct heap *heap, struct buffer *buffer)
76b88427fbba69 Sidraya 2021-08-18  172  {
76b88427fbba69 Sidraya 2021-08-18  173  	void *dev = buffer->device;
76b88427fbba69 Sidraya 2021-08-18  174  	void *sgt = buffer->priv;
76b88427fbba69 Sidraya 2021-08-18  175  	void *sgl = img_mmu_get_sgl(sgt);
76b88427fbba69 Sidraya 2021-08-18  176  	unsigned int num_pages = sg_nents(sgl);
76b88427fbba69 Sidraya 2021-08-18  177  	unsigned int orig_nents = img_mmu_get_orig_nents(sgt);
76b88427fbba69 Sidraya 2021-08-18  178  	void **pages;
76b88427fbba69 Sidraya 2021-08-18  179  	int ret;
76b88427fbba69 Sidraya 2021-08-18  180  	pgprot_t prot;
76b88427fbba69 Sidraya 2021-08-18  181  
76b88427fbba69 Sidraya 2021-08-18  182  	dev_dbg(dev, "%s:%d buffer %d (0x%p)\n", __func__, __LINE__, buffer->id, buffer);
76b88427fbba69 Sidraya 2021-08-18  183  
76b88427fbba69 Sidraya 2021-08-18  184  	if (buffer->kptr) {
76b88427fbba69 Sidraya 2021-08-18  185  		dev_warn(dev, "%s called for already mapped buffer %d\n", __func__, buffer->id);
76b88427fbba69 Sidraya 2021-08-18  186  		return 0;
76b88427fbba69 Sidraya 2021-08-18  187  	}
76b88427fbba69 Sidraya 2021-08-18  188  
76b88427fbba69 Sidraya 2021-08-18  189  	pages = kmalloc_array(num_pages, sizeof(void *), GFP_KERNEL);
76b88427fbba69 Sidraya 2021-08-18  190  	if (!pages)
76b88427fbba69 Sidraya 2021-08-18  191  		return -ENOMEM;
76b88427fbba69 Sidraya 2021-08-18  192  
76b88427fbba69 Sidraya 2021-08-18  193  	img_mmu_get_pages(pages, sgt);
76b88427fbba69 Sidraya 2021-08-18  194  
76b88427fbba69 Sidraya 2021-08-18  195  	prot = PAGE_KERNEL;
76b88427fbba69 Sidraya 2021-08-18  196  	prot = pgprot_writecombine(prot);
76b88427fbba69 Sidraya 2021-08-18 @197  	buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
76b88427fbba69 Sidraya 2021-08-18  198  	kfree(pages);
76b88427fbba69 Sidraya 2021-08-18  199  	if (!buffer->kptr) {
76b88427fbba69 Sidraya 2021-08-18  200  		dev_err(dev, "%s vmap failed!\n", __func__);
76b88427fbba69 Sidraya 2021-08-18  201  		return -EFAULT;
76b88427fbba69 Sidraya 2021-08-18  202  	}
76b88427fbba69 Sidraya 2021-08-18  203  
76b88427fbba69 Sidraya 2021-08-18  204  	ret = dma_map_sg(dev, sgl, orig_nents, DMA_FROM_DEVICE);
76b88427fbba69 Sidraya 2021-08-18  205  
76b88427fbba69 Sidraya 2021-08-18  206  	if (ret <= 0) {
76b88427fbba69 Sidraya 2021-08-18  207  		dev_err(dev, "%s dma_map_sg failed!\n", __func__);
76b88427fbba69 Sidraya 2021-08-18  208  		vunmap(buffer->kptr);
76b88427fbba69 Sidraya 2021-08-18  209  		return -EFAULT;
76b88427fbba69 Sidraya 2021-08-18  210  	}
76b88427fbba69 Sidraya 2021-08-18  211  	dev_dbg(dev, "%s:%d buffer %d orig_nents %d nents %d\n", __func__,
76b88427fbba69 Sidraya 2021-08-18  212  		__LINE__, buffer->id, orig_nents, ret);
76b88427fbba69 Sidraya 2021-08-18  213  
76b88427fbba69 Sidraya 2021-08-18  214  	img_mmu_set_sgt_nents(sgt, ret);
76b88427fbba69 Sidraya 2021-08-18  215  
76b88427fbba69 Sidraya 2021-08-18  216  	dev_dbg(dev, "%s:%d buffer %d vmap to 0x%p\n", __func__, __LINE__,
76b88427fbba69 Sidraya 2021-08-18  217  		buffer->id, buffer->kptr);
76b88427fbba69 Sidraya 2021-08-18  218  
76b88427fbba69 Sidraya 2021-08-18  219  	return 0;
76b88427fbba69 Sidraya 2021-08-18  220  }
76b88427fbba69 Sidraya 2021-08-18  221  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#39 lore raw

PATCH 28/30 IMG DEC V4L2 Interface function implementations

In reply to [email protected]

From: Sidraya <[email protected]>

Add Low-level VXD interface component and v4l2 wrapper Interface for VXD driver.

---
 MAINTAINERS                                  |    2 +
 drivers/staging/media/vxd/common/vid_buf.h   |   42 +
 drivers/staging/media/vxd/decoder/vxd_v4l2.c | 2129 ++++++++++++++++++
 3 files changed, 2173 insertions(+)
 create mode 100644 drivers/staging/media/vxd/common/vid_buf.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_v4l2.c
MAINTAINERS +2 -0
index 0616ab620135..c7b4c860f8a7 100644
@@ -19566,6 +19566,7 @@ F:	drivers/staging/media/vxd/common/rman_api.c
 F:	drivers/staging/media/vxd/common/rman_api.h
 F:	drivers/staging/media/vxd/common/talmmu_api.c
 F:	drivers/staging/media/vxd/common/talmmu_api.h
+F:	drivers/staging/media/vxd/common/vid_buf.h
 F:	drivers/staging/media/vxd/common/work_queue.c
 F:	drivers/staging/media/vxd/common/work_queue.h
 F:	drivers/staging/media/vxd/decoder/Kconfig
@@ -19641,6 +19642,7 @@ F;	drivers/staging/media/vxd/decoder/vxd_props.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec.c
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
 F:	drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
+F:	drivers/staging/media/vxd/decoder/vxd_v4l2.c
 
 VIDEO I2C POLLING DRIVER
 M:	Matt Ranostay <[email protected]>
drivers/staging/media/vxd/common/vid_buf.h new file +42 -0

42 lines not on this page · raw message

drivers/staging/media/vxd/decoder/vxd_v4l2.c new file +2129 -0

2,129 lines not on this page · raw message

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
#40 lore raw

Re: [PATCH 28/30] IMG DEC V4L2 Interface function implementations

I love your patch! Yet something to improve:

Hi,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on staging/staging-testing driver-core/driver-core-testing linus/master v5.14-rc6 next-20210818] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
base:   git://linuxtv.org/media_tree.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/ed83bf9b395e58893b5d92675196aee8f619efc9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811 git checkout ed83bf9b395e58893b5d92675196aee8f619efc9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate

All error/warnings (new ones prefixed by >>):

drivers/staging/media/vxd/decoder/vxd_core.c: In function 'stream_worker':

>> drivers/staging/media/vxd/decoder/vxd_core.c:549:25: warning: variable 'vxd' set but not used [-Wunused-but-set-variable]
     549 |         struct vxd_dev *vxd = NULL;
         |                         ^~~
--
   drivers/staging/media/vxd/decoder/vxd_v4l2.c: In function 'vxd_dec_buf_prepare':
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:712:36: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
     712 |                         new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
         |                                    ^~~~~~~~~~~~
         |                                    pfn_to_page
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:712:34: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     712 |                         new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
         |                                  ^
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:618:13: warning: variable 'pages' set but not used [-Wunused-but-set-variable]
     618 |         int pages;
         |             ^~~~~
   In file included from drivers/staging/media/vxd/decoder/vxd_props.h:19,
                    from drivers/staging/media/vxd/decoder/decoder.h:29,
                    from drivers/staging/media/vxd/decoder/core.h:20,
                    from drivers/staging/media/vxd/decoder/vxd_v4l2.c:52:
   At top level:
   drivers/staging/media/vxd/common/imgmmu.h:65:28: warning: 'VIRT_DIR_IDX_MASK' defined but not used [-Wunused-const-variable=]
      65 | static const unsigned long VIRT_DIR_IDX_MASK = (~((1 << MMU_DIR_SHIFT) - 1));
         |                            ^~~~~~~~~~~~~~~~~
   drivers/staging/media/vxd/common/imgmmu.h:62:28: warning: 'VIRT_PAGE_TBL_MASK' defined but not used [-Wunused-const-variable=]
      62 | static const unsigned long VIRT_PAGE_TBL_MASK =
         |                            ^~~~~~~~~~~~~~~~~~
   drivers/staging/media/vxd/common/imgmmu.h:60:28: warning: 'VIRT_PAGE_OFF_MASK' defined but not used [-Wunused-const-variable=]
      60 | static const unsigned long VIRT_PAGE_OFF_MASK = ((1 << MMU_PAGE_SHIFT) - 1);
         |                            ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/staging/media/vxd/decoder/hevc_secure_parser.c: In function 'bspp_hevc_parse_vps':
>> drivers/staging/media/vxd/decoder/hevc_secure_parser.c:594:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     594 | }
         | ^

vim +712 drivers/staging/media/vxd/decoder/vxd_v4l2.c

604
605 static int vxd_dec_buf_prepare(struct vb2_buffer *vb)
606 {
607 struct vxd_dec_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
608 struct device *dev = ctx->dev->dev;
609 struct vxd_dec_q_data *q_data;
610 void *sgt;
611 #ifdef CAPTURE_CONTIG_ALLOC
612 struct page *new_page;
613 #else
614 void *sgl;
615 #endif
616 struct sg_table *sgt_new;
617 void *sgl_new;

 > 618		int pages;
   619		int nents = 0;
   620		int size = 0;
   621		int plane, num_planes, ret = 0;
   622		struct vxd_buffer *buf =
   623			container_of(vb, struct vxd_buffer, buffer.vb.vb2_buf);
   624	
   625		q_data = get_q_data(ctx, vb->vb2_queue->type);
   626		if (!q_data)
   627			return -EINVAL;
   628	
   629		num_planes = q_data->fmt->num_planes;
   630	
   631		for (plane = 0; plane < num_planes; plane++) {
   632			if (vb2_plane_size(vb, plane) < q_data->size_image[plane]) {
   633				dev_err(dev, "data will not fit into plane (%lu < %lu)\n",
   634					vb2_plane_size(vb, plane),
   635					(long)q_data->size_image[plane]);
   636				return -EINVAL;
   637			}
   638		}
   639	
   640		if (buf->mapped)
   641			return 0;
   642	
   643		buf->buf_info.cpu_linear_addr = vb2_plane_vaddr(vb, 0);
   644		buf->buf_info.buf_size = vb2_plane_size(vb, 0);
   645		buf->buf_info.fd = -1;
   646		sgt = vb2_dma_sg_plane_desc(vb, 0);
   647		if (!sgt) {
   648			dev_err(dev, "Could not get sg_table from plane 0\n");
   649			return -EINVAL;
   650		}
   651	
   652		if (V4L2_TYPE_IS_OUTPUT(vb->type)) {
   653			ret = core_stream_map_buf_sg(ctx->res_str_id,
   654						     VDEC_BUFTYPE_BITSTREAM,
   655						     &buf->buf_info, sgt,
   656						     &buf->buf_map_id);
   657			if (ret) {
   658				dev_err(dev, "OUTPUT core_stream_map_buf_sg failed\n");
   659				return ret;
   660			}
   661	
   662			buf->bstr_info.buf_size = q_data->size_image[0];
   663			buf->bstr_info.cpu_virt_addr = buf->buf_info.cpu_linear_addr;
   664			buf->bstr_info.mem_attrib =
   665				SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE |
   666				SYS_MEMATTRIB_INPUT | SYS_MEMATTRIB_CPU_WRITE;
   667			buf->bstr_info.bufmap_id = buf->buf_map_id;
   668			lst_init(&buf->seq_unit.bstr_seg_list);
   669			lst_init(&buf->pic_unit.bstr_seg_list);
   670			lst_init(&buf->end_unit.bstr_seg_list);
   671	
   672			list_add_tail(&buf->list, &ctx->out_buffers);
   673		} else {
   674			/* Create a single sgt from the plane(s) */
   675			sgt_new = kmalloc(sizeof(*sgt_new), GFP_KERNEL);
   676			if (!sgt_new)
   677				return -EINVAL;
   678	
   679			for (plane = 0; plane < num_planes; plane++) {
   680				size += ALIGN(vb2_plane_size(vb, plane), PAGE_SIZE);
   681				sgt = vb2_dma_sg_plane_desc(vb, plane);
   682				if (!sgt) {
   683					dev_err(dev, "Could not get sg_table from plane %d\n", plane);
   684					kfree(sgt_new);
   685					return -EINVAL;
   686				}
   687	#ifdef CAPTURE_CONTIG_ALLOC
   688				nents += 1;
   689	#else
   690				nents += sg_nents(img_mmu_get_sgl(sgt));
   691	#endif
   692			}
   693			buf->buf_info.buf_size = size;
   694	
   695			pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
   696			ret = sg_alloc_table(sgt_new, nents, GFP_KERNEL);
   697			if (ret) {
   698				kfree(sgt_new);
   699				return -EINVAL;
   700			}
   701			sgl_new = img_mmu_get_sgl(sgt_new);
   702	
   703			for (plane = 0; plane < num_planes; plane++) {
   704				sgt = vb2_dma_sg_plane_desc(vb, plane);
   705				if (!sgt) {
   706					dev_err(dev, "Could not get sg_table from plane %d\n", plane);
   707					sg_free_table(sgt_new);
   708					kfree(sgt_new);
   709					return -EINVAL;
   710				}
   711	#ifdef CAPTURE_CONTIG_ALLOC
 > 712				new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
   713				sg_set_page(sgl_new, new_page, ALIGN(vb2_plane_size(vb, plane),
   714								     PAGE_SIZE), 0);
   715				sgl_new = sg_next(sgl_new);
   716	#else
   717				sgl = img_mmu_get_sgl(sgt);
   718	
   719				while (sgl) {
   720					sg_set_page(sgl_new, sg_page(sgl), img_mmu_get_sgl_length(sgl), 0);
   721					sgl = sg_next(sgl);
   722					sgl_new = sg_next(sgl_new);
   723				}
   724	#endif
   725			}
   726	
   727			buf->buf_info.pictbuf_cfg = ctx->pict_bufcfg;
   728			ret = core_stream_map_buf_sg(ctx->res_str_id,
   729						     VDEC_BUFTYPE_PICTURE,
   730						     &buf->buf_info, sgt_new,
   731						     &buf->buf_map_id);

732 sg_free_table(sgt_new);
733 kfree(sgt_new);
734 if (ret) {
735 dev_err(dev, "CAPTURE core_stream_map_buf_sg failed\n");
736 return ret;
737 }
738 list_add_tail(&buf->list, &ctx->cap_buffers);
739 }
740 buf->mapped = TRUE;
741 buf->reuse = TRUE;
742
743 return 0;
744 }
745

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#41 lore raw

PATCH 29/30 arm64: dts: dra82: Add v4l2 vxd_dec device node

In reply to [email protected]

From: Sidraya <[email protected]>

Enable v4l2 vxd_dec on dra82

---
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +9 -0
index cf3482376c1e..a10eb7bcce74 100644
@@ -1242,6 +1242,15 @@
 		power-domains = <&k3_pds 193 TI_SCI_PD_EXCLUSIVE>;
 	};
 
+	d5520: video-decoder@4300000 {
+	       /* IMG D5520 driver configuration */
+	       compatible = "img,d5500-vxd";
+	       reg = <0x00 0x04300000>,
+		     <0x00 0x100000>;
+	       power-domains = <&k3_pds 144 TI_SCI_PD_EXCLUSIVE>;
+	       interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
+	};
+
 	ufs_wrapper: ufs-wrapper@4e80000 {
 		compatible = "ti,j721e-ufs";
 		reg = <0x0 0x4e80000 0x0 0x100>;
Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.
maintainer
#42 lore raw

Re: [PATCH 29/30] arm64: dts: dra82: Add v4l2 vxd_dec device node

^^ $subject
you might want to run:
git log --oneline arch/arm64/boot/dts/ti/k3-j721e-main.dtsi

to see precedence of usage.

Quoted 3 lines · On 19:40-20210818, [email protected] wrote:

From: Sidraya <[email protected]>

Enable v4l2 vxd_dec on dra82

s/dra82/j721e

Quoted 43 lines
---
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +9 -0
index cf3482376c1e..a10eb7bcce74 100644
@@ -1242,6 +1242,15 @@
 		power-domains = <&k3_pds 193 TI_SCI_PD_EXCLUSIVE>;
 	};
 
+	d5520: video-decoder@4300000 {
+	       /* IMG D5520 driver configuration */
+	       compatible = "img,d5500-vxd";
+	       reg = <0x00 0x04300000>,
+		     <0x00 0x100000>;
+	       power-domains = <&k3_pds 144 TI_SCI_PD_EXCLUSIVE>;
+	       interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
+	};
+
 	ufs_wrapper: ufs-wrapper@4e80000 {
 		compatible = "ti,j721e-ufs";
 		reg = <0x0 0x4e80000 0x0 0x100>;
Signature · 15 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 

You might want to look up the MAINTAINER file to see who this patch and what list this should have been addressed to.

Further I DONOT want to see a single bit of confidential information based patch in my tree. Please discuss with your legal department and since TI is mentioned in the patches, please discuss with TI's legal team as well.

This patch, IMHO, series mis-represents TI's legal position and respect for upstream community and in no way represents the quality of patches we(TI) would like to contribute to upstream and DOES NOT represent the quality of contributions or collaboration expected of TI or representatives of TI.

So, sorry NAK for the complete series.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#43 lore raw

PATCH 30/30 ARM64: ti_sdk_arm64_release_defconfig: Enable d5520 video decoder driver

In reply to [email protected]

From: Sidraya <[email protected]>

This patch enables d5520 video decoder driver as module on J721e board.

---
 MAINTAINERS                                   |    1 +
 .../configs/ti_sdk_arm64_release_defconfig    | 7407 +++++++++++++++++
 2 files changed, 7408 insertions(+)
 create mode 100644 arch/arm64/configs/ti_sdk_arm64_release_defconfig
MAINTAINERS +1 -0
index c7b4c860f8a7..db47fcafbcfc 100644
@@ -19537,6 +19537,7 @@ M:	Sidraya Jayagond <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	arch/arm64/configs/tisdk_j7-evm_defconfig
 F:	drivers/staging/media/vxd/common/addr_alloc.c
 F:	drivers/staging/media/vxd/common/addr_alloc.h
 F:	drivers/staging/media/vxd/common/dq.c
arch/arm64/configs/ti_sdk_arm64_release_defconfig new file +7407 -0

2,993 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 30 lines
2.17.1


-- 






This
message contains confidential information and is intended only 
for the
individual(s) named. If you are not the intended
recipient, you are 
notified that disclosing, copying, distributing or taking any
action in 
reliance on the contents of this mail and attached file/s is strictly
prohibited. Please notify the
sender immediately and delete this e-mail 
from your system. E-mail transmission
cannot be guaranteed to be secured or 
error-free as information could be
intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain
viruses. The sender therefore does 
not accept liability for any errors or
omissions in the contents of this 
message, which arise as a result of e-mail
transmission.

Part of the diff is not shown here. View the raw message.

#44 lore raw

Re: [PATCH 30/30] ARM64: ti_sdk_arm64_release_defconfig: Enable d5520 video decoder driver

Quoted 4 lines · On 8/18/2021 9:10 AM, [email protected] wrote:

From: Sidraya<[email protected]>

This patch enables d5520 video decoder driver as module on J721e board.

Nack

Quoted 5 lines
---
  MAINTAINERS                                   |    1 +
  .../configs/ti_sdk_arm64_release_defconfig    | 7407 +++++++++++++++++

This defconfig doesnt belong in mainline.

MAINTAINERS M: Sidraya Jayagond<[email protected]> · line 19540

Quoted 12 lines
  2 files changed, 7408 insertions(+)

create mode 100644 arch/arm64/configs/ti_sdk_arm64_release_defconfig

MAINTAINERS +1 -0
index c7b4c860f8a7..db47fcafbcfc 100644
@@ -19537,6 +19537,7 @@ M:	Sidraya Jayagond<[email protected]>
  L:	[email protected]
  S:	Maintained
  F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	arch/arm64/configs/tisdk_j7-evm_defconfig

This is wrong.

Quoted 5 lines
MAINTAINERS +0 -0
  F:	drivers/staging/media/vxd/common/addr_alloc.c
  F:	drivers/staging/media/vxd/common/addr_alloc.h
  F:	drivers/staging/media/vxd/common/dq.c
arch/arm64/configs/ti_sdk_arm64_release_defconfig new file +0 -0
new file mode 100644
maintainer
#45 lore raw

Re: [PATCH 30/30] ARM64: ti_sdk_arm64_release_defconfig: Enable d5520 video decoder driver

In reply to [email protected]
Quoted 17 lines · On 19:40-20210818, [email protected] wrote:

From: Sidraya <[email protected]>

This patch enables d5520 video decoder driver as module on J721e board.

---
 MAINTAINERS                                   |    1 +
 .../configs/ti_sdk_arm64_release_defconfig    | 7407 +++++++++++++++++
 2 files changed, 7408 insertions(+)
 create mode 100644 arch/arm64/configs/ti_sdk_arm64_release_defconfig
MAINTAINERS +0 -0
index c7b4c860f8a7..db47fcafbcfc 100644

MAINTAINERS M: Sidraya Jayagond <[email protected]> · line 19540

Quoted 4 lines
MAINTAINERS +1 -0
@@ -19537,6 +19537,7 @@ M:	Sidraya Jayagond <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
+F:	arch/arm64/configs/tisdk_j7-evm_defconfig

Sigh.. no.

arch/arm64/configs/ti_sdk_arm64_release_defconfig line 4

Quoted 13 lines
MAINTAINERS +0 -0
 F:	drivers/staging/media/vxd/common/addr_alloc.c
 F:	drivers/staging/media/vxd/common/addr_alloc.h
 F:	drivers/staging/media/vxd/common/dq.c
arch/arm64/configs/ti_sdk_arm64_release_defconfig new file +4 -0
new file mode 100644
index 000000000000..a424c76d29da
@@ -0,0 +1,7407 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Linux/arm64 5.10.41 Kernel Configuration
+#

^^ NAK. we DONOT want to see additional configs in arm64 and definitely not one based on 5.10

Quoted 5 lines

This
message contains confidential information and is intended only for the
individual(s) named. If you are not the intended

If you are sending confidential information to a public mailing list, you might want to start talking to legal folks in your company.

Quoted 8 lines

recipient, you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this mail and attached file/s is strictly prohibited. Please notify the
sender immediately and delete this e-mail
from your system. E-mail transmission
cannot be guaranteed to be secured or

Quoted 8 lines

error-free as information could be
intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain
viruses. The sender therefore does
not accept liability for any errors or
omissions in the contents of this
message, which arise as a result of e-mail
transmission.

^^ please use a different mail provider.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#46 lore raw
In reply to [email protected]

Hi Sidraya,

Quoted 11 lines · On 18/08/2021 16:10, [email protected] wrote:

From: Sidraya <[email protected]>

This series of patches implements v4l2 based Decoder driver for H264, H265 and MJPEG decoding standards.This Driver is for D5520 H/W decoder on DRA8x SOC of J721e platform.
This driver has been tested on v5.14-rc6 kernel for following decoding standards on v4l2 based Gstreamer 1.16 plug-in.
1. H264
2. H265
3. MJPEG

Quoted 6 lines

Note:
Currently Driver uses list, map and queue custom data structure APIs implementation and IOMMU custom framework.We are working on replacing customised APIs with Linux kernel generic framework APIs. Meanwhile would like to address review comments from reviewers before merging to main media/platform subsystem.

OK, so I consider this an RFC series rather than an actual driver submission and I'll mark it as such in patchwork.

First of all, patch 13/30 never made it to the linux-media mailinglist, so the series as a whole will not apply. Can you repost 13/30? One possible reason why 13/30 might have been dropped is if it it a really large patch. You may have to split it up in that case.

Did you run v4l2-compliance for this driver? Always compile v4l2-compliance (part of https://git.linuxtv.org/v4l-utils.git/) from the git repo sources to make sure you have most recent tests.

I need to see the output of 'v4l2-compliance' as part of the cover letter. There shouldn't be any failures.

I see a lot of pointless #ifdef DEBUG_DECODER_DRIVER lines. Either just drop the debug code or use dev_dbg/pr_debug. Ditto for VDEC_ASSERT(). This really pollutes the code.

Can you provide a high-level description of the hardware? It seems like this driver is a lot more complex than other decoder drivers, but it is not immediately clear why that is. One reason might be that the hardware/firmware is a stateless decoder, while the driver exposes a stateful decoder API. See the m2m interface documentation for the differences between the two:

https://hverkuil.home.xs4all.nl/spec/userspace-api/v4l/dev-mem2mem.html

If that's the case, then the driver should really be a stateless driver, that will likely make things much easier.

In any case, this driver clearly needs a lot more work.

Regards,

Hans

Quoted 258 lines

Sidraya (30):
dt-bindings: Add binding for img,d5500-vxd for DRA8x
v4l: vxd-dec: Create mmu programming helper library
v4l: vxd-dec: Create vxd_dec Mem Manager helper library
v4l: vxd-dec: Add vxd helper library
v4l: vxd-dec: Add IMG VXD Video Decoder mem to mem drive
v4l: vxd-dec: Add hardware control modules
v4l: vxd-dec: Add vxd core module
v4l: vxd-dec: Add translation control modules
v4l: vxd-dec: Add idgen api modules
v4l: vxd-dec: Add utility modules
v4l: vxd-dec: Add TALMMU module
v4l: vxd-dec: Add VDEC MMU wrapper
v4l: vxd-dec: Add Bistream Preparser (BSPP) module
v4l: vxd-dec: Add common headers
v4l: vxd-dec: Add firmware interface headers
v4l: vxd-dec: Add pool api modules
v4l: vxd-dec: This patch implements resource manage component
v4l: vxd-dec: This patch implements pixel processing library v4l:vxd-dec:vdecdd utility library
v4l:vxd-dec:Decoder resource component
v4l:vxd-dec:Decoder Core Component
v4l:vxd-dec:vdecdd headers added
v4l:vxd-dec:Decoder Component
v4l:vxd-dec: Add resource manager
v4l: videodev2: Add 10bit definitions for NV12 and NV16 color formats
media: Kconfig: Add Video decoder kconfig and Makefile entries
media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile IMG DEC V4L2 Interface function implementations
arm64: dts: dra82: Add v4l2 vxd_dec device node
ARM64: ti_sdk_arm64_release_defconfig: Enable d5520 video decoder
driver

 .../bindings/media/img,d5520-vxd.yaml         |   52 +
 MAINTAINERS                                   |  114 +
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     |    9 +
 .../configs/ti_sdk_arm64_release_defconfig    | 7407 +++++++++++++++++
 drivers/media/v4l2-core/v4l2-ioctl.c          |    2 +
 drivers/staging/media/Kconfig                 |    2 +
 drivers/staging/media/Makefile                |    1 +
 drivers/staging/media/vxd/common/addr_alloc.c |  499 ++
 drivers/staging/media/vxd/common/addr_alloc.h |  238 +
 drivers/staging/media/vxd/common/dq.c         |  248 +
 drivers/staging/media/vxd/common/dq.h         |   36 +
 drivers/staging/media/vxd/common/hash.c       |  481 ++
 drivers/staging/media/vxd/common/hash.h       |   86 +
 drivers/staging/media/vxd/common/idgen_api.c  |  449 +
 drivers/staging/media/vxd/common/idgen_api.h  |   59 +
 drivers/staging/media/vxd/common/img_errors.h |  104 +
 drivers/staging/media/vxd/common/img_mem.h    |   43 +
 .../staging/media/vxd/common/img_mem_man.c    | 1124 +++
 .../staging/media/vxd/common/img_mem_man.h    |  231 +
 .../media/vxd/common/img_mem_unified.c        |  276 +
 drivers/staging/media/vxd/common/imgmmu.c     |  782 ++
 drivers/staging/media/vxd/common/imgmmu.h     |  180 +
 drivers/staging/media/vxd/common/lst.c        |  119 +
 drivers/staging/media/vxd/common/lst.h        |   37 +
 drivers/staging/media/vxd/common/pool.c       |  228 +
 drivers/staging/media/vxd/common/pool.h       |   66 +
 drivers/staging/media/vxd/common/pool_api.c   |  709 ++
 drivers/staging/media/vxd/common/pool_api.h   |  113 +
 drivers/staging/media/vxd/common/ra.c         |  972 +++
 drivers/staging/media/vxd/common/ra.h         |  200 +
 drivers/staging/media/vxd/common/resource.c   |  576 ++
 drivers/staging/media/vxd/common/resource.h   |   66 +
 drivers/staging/media/vxd/common/rman_api.c   |  620 ++
 drivers/staging/media/vxd/common/rman_api.h   |   66 +
 drivers/staging/media/vxd/common/talmmu_api.c |  753 ++
 drivers/staging/media/vxd/common/talmmu_api.h |  246 +
 drivers/staging/media/vxd/common/vid_buf.h    |   42 +
 drivers/staging/media/vxd/common/work_queue.c |  188 +
 drivers/staging/media/vxd/common/work_queue.h |   66 +
 drivers/staging/media/vxd/decoder/Kconfig     |   13 +
 drivers/staging/media/vxd/decoder/Makefile    |  129 +
 drivers/staging/media/vxd/decoder/bspp.c      | 2479 ++++++
 drivers/staging/media/vxd/decoder/bspp.h      |  363 +
 drivers/staging/media/vxd/decoder/bspp_int.h  |  514 ++
 drivers/staging/media/vxd/decoder/core.c      | 3656 ++++++++
 drivers/staging/media/vxd/decoder/core.h      |   72 +
 .../staging/media/vxd/decoder/dec_resources.c |  554 ++
 .../staging/media/vxd/decoder/dec_resources.h |   46 +
 drivers/staging/media/vxd/decoder/decoder.c   | 4622 ++++++++++
 drivers/staging/media/vxd/decoder/decoder.h   |  375 +
 .../staging/media/vxd/decoder/fw_interface.h  |  818 ++
 drivers/staging/media/vxd/decoder/h264_idx.h  |   60 +
 .../media/vxd/decoder/h264_secure_parser.c    | 3051 +++++++
 .../media/vxd/decoder/h264_secure_parser.h    |  278 +
 drivers/staging/media/vxd/decoder/h264_vlc.h  |  604 ++
 .../staging/media/vxd/decoder/h264fw_data.h   |  652 ++
 .../media/vxd/decoder/h264fw_data_shared.h    |  759 ++
 .../media/vxd/decoder/hevc_secure_parser.c    | 2895 +++++++
 .../media/vxd/decoder/hevc_secure_parser.h    |  455 +
 .../staging/media/vxd/decoder/hevcfw_data.h   |  472 ++
 .../media/vxd/decoder/hevcfw_data_shared.h    |  767 ++
 .../staging/media/vxd/decoder/hw_control.c    | 1211 +++
 .../staging/media/vxd/decoder/hw_control.h    |  144 +
 .../media/vxd/decoder/img_dec_common.h        |  278 +
 .../media/vxd/decoder/img_msvdx_cmds.h        |  279 +
 .../media/vxd/decoder/img_msvdx_core_regs.h   |   22 +
 .../media/vxd/decoder/img_msvdx_vdmc_regs.h   |   26 +
 .../media/vxd/decoder/img_msvdx_vec_regs.h    |   60 +
 .../staging/media/vxd/decoder/img_pixfmts.h   |  195 +
 .../media/vxd/decoder/img_profiles_levels.h   |   33 +
 .../media/vxd/decoder/img_pvdec_core_regs.h   |   60 +
 .../media/vxd/decoder/img_pvdec_pixel_regs.h  |   35 +
 .../media/vxd/decoder/img_pvdec_test_regs.h   |   39 +
 .../media/vxd/decoder/img_vdec_fw_msg.h       |  192 +
 .../vxd/decoder/img_video_bus4_mmu_regs.h     |  120 +
 .../media/vxd/decoder/jpeg_secure_parser.c    |  645 ++
 .../media/vxd/decoder/jpeg_secure_parser.h    |   37 +
 .../staging/media/vxd/decoder/jpegfw_data.h   |   83 +
 .../media/vxd/decoder/jpegfw_data_shared.h    |   84 +
 drivers/staging/media/vxd/decoder/mem_io.h    |   42 +
 drivers/staging/media/vxd/decoder/mmu_defs.h  |   42 +
 drivers/staging/media/vxd/decoder/pixel_api.c |  895 ++
 drivers/staging/media/vxd/decoder/pixel_api.h |  152 +
 .../media/vxd/decoder/pvdec_entropy_regs.h    |   33 +
 drivers/staging/media/vxd/decoder/pvdec_int.h |   82 +
 .../media/vxd/decoder/pvdec_vec_be_regs.h     |   35 +
 drivers/staging/media/vxd/decoder/reg_io2.h   |   74 +
 .../staging/media/vxd/decoder/scaler_setup.h  |   59 +
 drivers/staging/media/vxd/decoder/swsr.c      | 1657 ++++
 drivers/staging/media/vxd/decoder/swsr.h      |  278 +
 .../media/vxd/decoder/translation_api.c       | 1725 ++++
 .../media/vxd/decoder/translation_api.h       |   42 +
 drivers/staging/media/vxd/decoder/vdec_defs.h |  548 ++
 .../media/vxd/decoder/vdec_mmu_wrapper.c      |  829 ++
 .../media/vxd/decoder/vdec_mmu_wrapper.h      |  174 +
 .../staging/media/vxd/decoder/vdecdd_defs.h   |  446 +
 .../staging/media/vxd/decoder/vdecdd_utils.c  |   95 +
 .../staging/media/vxd/decoder/vdecdd_utils.h  |   93 +
 .../media/vxd/decoder/vdecdd_utils_buf.c      |  897 ++
 .../staging/media/vxd/decoder/vdecfw_share.h  |   36 +
 .../staging/media/vxd/decoder/vdecfw_shared.h |  893 ++
 drivers/staging/media/vxd/decoder/vxd_core.c  | 1683 ++++
 drivers/staging/media/vxd/decoder/vxd_dec.c   |  185 +
 drivers/staging/media/vxd/decoder/vxd_dec.h   |  477 ++
 drivers/staging/media/vxd/decoder/vxd_ext.h   |   74 +
 drivers/staging/media/vxd/decoder/vxd_int.c   | 1137 +++
 drivers/staging/media/vxd/decoder/vxd_int.h   |  128 +
 .../staging/media/vxd/decoder/vxd_mmu_defs.h  |   30 +
 drivers/staging/media/vxd/decoder/vxd_props.h |   80 +
 drivers/staging/media/vxd/decoder/vxd_pvdec.c | 1745 ++++
 .../media/vxd/decoder/vxd_pvdec_priv.h        |  126 +
 .../media/vxd/decoder/vxd_pvdec_regs.h        |  779 ++
 drivers/staging/media/vxd/decoder/vxd_v4l2.c  | 2129 +++++
 include/uapi/linux/videodev2.h                |    2 +
 114 files changed, 62369 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/img,d5520-vxd.yaml
 create mode 100644 arch/arm64/configs/ti_sdk_arm64_release_defconfig
 create mode 100644 drivers/staging/media/vxd/common/addr_alloc.c
 create mode 100644 drivers/staging/media/vxd/common/addr_alloc.h
 create mode 100644 drivers/staging/media/vxd/common/dq.c
 create mode 100644 drivers/staging/media/vxd/common/dq.h
 create mode 100644 drivers/staging/media/vxd/common/hash.c
 create mode 100644 drivers/staging/media/vxd/common/hash.h
 create mode 100644 drivers/staging/media/vxd/common/idgen_api.c
 create mode 100644 drivers/staging/media/vxd/common/idgen_api.h
 create mode 100644 drivers/staging/media/vxd/common/img_errors.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem_man.c
 create mode 100644 drivers/staging/media/vxd/common/img_mem_man.h
 create mode 100644 drivers/staging/media/vxd/common/img_mem_unified.c
 create mode 100644 drivers/staging/media/vxd/common/imgmmu.c
 create mode 100644 drivers/staging/media/vxd/common/imgmmu.h
 create mode 100644 drivers/staging/media/vxd/common/lst.c
 create mode 100644 drivers/staging/media/vxd/common/lst.h
 create mode 100644 drivers/staging/media/vxd/common/pool.c
 create mode 100644 drivers/staging/media/vxd/common/pool.h
 create mode 100644 drivers/staging/media/vxd/common/pool_api.c
 create mode 100644 drivers/staging/media/vxd/common/pool_api.h
 create mode 100644 drivers/staging/media/vxd/common/ra.c
 create mode 100644 drivers/staging/media/vxd/common/ra.h
 create mode 100644 drivers/staging/media/vxd/common/resource.c
 create mode 100644 drivers/staging/media/vxd/common/resource.h
 create mode 100644 drivers/staging/media/vxd/common/rman_api.c
 create mode 100644 drivers/staging/media/vxd/common/rman_api.h
 create mode 100644 drivers/staging/media/vxd/common/talmmu_api.c
 create mode 100644 drivers/staging/media/vxd/common/talmmu_api.h
 create mode 100644 drivers/staging/media/vxd/common/vid_buf.h
 create mode 100644 drivers/staging/media/vxd/common/work_queue.c
 create mode 100644 drivers/staging/media/vxd/common/work_queue.h
 create mode 100644 drivers/staging/media/vxd/decoder/Kconfig
 create mode 100644 drivers/staging/media/vxd/decoder/Makefile
 create mode 100644 drivers/staging/media/vxd/decoder/bspp.c
 create mode 100644 drivers/staging/media/vxd/decoder/bspp.h
 create mode 100644 drivers/staging/media/vxd/decoder/bspp_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/core.c
 create mode 100644 drivers/staging/media/vxd/decoder/core.h
 create mode 100644 drivers/staging/media/vxd/decoder/dec_resources.c
 create mode 100644 drivers/staging/media/vxd/decoder/dec_resources.h
 create mode 100644 drivers/staging/media/vxd/decoder/decoder.c
 create mode 100644 drivers/staging/media/vxd/decoder/decoder.h
 create mode 100644 drivers/staging/media/vxd/decoder/fw_interface.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_idx.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/h264_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264_vlc.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264fw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/h264fw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevc_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/hevc_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevcfw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/hevcfw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/hw_control.c
 create mode 100644 drivers/staging/media/vxd/decoder/hw_control.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_dec_common.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_cmds.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_core_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_vdmc_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_msvdx_vec_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pixfmts.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_profiles_levels.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_core_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_pixel_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_pvdec_test_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_vdec_fw_msg.h
 create mode 100644 drivers/staging/media/vxd/decoder/img_video_bus4_mmu_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpeg_secure_parser.c
 create mode 100644 drivers/staging/media/vxd/decoder/jpeg_secure_parser.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpegfw_data.h
 create mode 100644 drivers/staging/media/vxd/decoder/jpegfw_data_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/mem_io.h
 create mode 100644 drivers/staging/media/vxd/decoder/mmu_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/pixel_api.c
 create mode 100644 drivers/staging/media/vxd/decoder/pixel_api.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_entropy_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/pvdec_vec_be_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/reg_io2.h
 create mode 100644 drivers/staging/media/vxd/decoder/scaler_setup.h
 create mode 100644 drivers/staging/media/vxd/decoder/swsr.c
 create mode 100644 drivers/staging/media/vxd/decoder/swsr.h
 create mode 100644 drivers/staging/media/vxd/decoder/translation_api.c
 create mode 100644 drivers/staging/media/vxd/decoder/translation_api.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdec_mmu_wrapper.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecdd_utils_buf.c
 create mode 100644 drivers/staging/media/vxd/decoder/vdecfw_share.h
 create mode 100644 drivers/staging/media/vxd/decoder/vdecfw_shared.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_core.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_dec.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_dec.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_ext.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_int.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_int.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_mmu_defs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_props.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec.c
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec_priv.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_pvdec_regs.h
 create mode 100644 drivers/staging/media/vxd/decoder/vxd_v4l2.c
#47 lore raw
In reply to [email protected]
Quoted 13 lines · On Wed, Aug 18, 2021 at 07:40:07PM +0530, [email protected] wrote:

This
message contains confidential information and is intended only for the
individual(s) named. If you are not the intended recipient, you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this mail and attached file/s is strictly prohibited. Please notify the
sender immediately and delete this e-mail
from your system. E-mail transmission
cannot be guaranteed to be secured or

Quoted 8 lines

error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

You can't have this type of footer on your email for GPL source code. :P

regards,
dan carpenter