linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 00/10] Qualcomm video decoder/encoder driver
@ 2017-04-28  9:13 Stanimir Varbanov
  2017-04-28  9:13 ` [PATCH v8 01/10] firmware: qcom_scm: Fix to allow COMPILE_TEST-ing Stanimir Varbanov
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2017-04-28  9:13 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil
  Cc: Andy Gross, Bjorn Andersson, Stephen Boyd, Srinivas Kandagatla,
	linux-media, linux-kernel, linux-arm-msm, Stanimir Varbanov

Hi everyone,

The changes since v7 are:
  * fixed error path in recovery handler.
  * fixed the logic in helper_vb2_buf_prepare.
  * added comments over venus_format arrays why MPLANE formats are used.
  * added sequence for output queue as well.
  * added COMPILE_TEST Kconfig option for the venus driver. To make
  compile testing of the venus driver possible I had to create a patch
  01/10 which fixing the qcom SCM driver.

I have made various fixes and improvements of the decoder and encoder
to make them work on Venus hw versions 1xx & 3xx (Venus hw v.1xx is found
on SoC apq8016 / db410c SBC board, and Venus hw v.3xx on apq8096).
A brief of the changes:
  * implemented buffer reference handling. This is adding delayed process
  of the newly queued buffers until the firmware release them completely.
  With this in place now vidioc_create_bufs op works properly.
  * implemented vidioc_try_decoder_cmd and vidioc_decoder_cmd v4l2 ioctl
  ops.
  * cleanups and run checkpatch --strict

The patchset is based on next-20170426 and applies cleanly on media_tree
as well.

The report of v4l2-compliance is below patchset diff status.

regards,
Stan
  
Stanimir Varbanov (10):
  firmware: qcom_scm: Fix to allow COMPILE_TEST-ing
  media: v4l2-mem2mem: extend m2m APIs for more accurate buffer
    management
  doc: DT: venus: binding document for Qualcomm video driver
  MAINTAINERS: Add Qualcomm Venus video accelerator driver
  media: venus: adding core part and helper functions
  media: venus: vdec: add video decoder files
  media: venus: venc: add video encoder files
  media: venus: hfi: add Host Firmware Interface (HFI)
  media: venus: hfi: add Venus HFI files
  media: venus: enable building of Venus video driver

 .../devicetree/bindings/media/qcom,venus.txt       |  107 ++
 MAINTAINERS                                        |    8 +
 drivers/firmware/Kconfig                           |    2 +-
 drivers/firmware/qcom_scm.h                        |   72 +-
 drivers/media/platform/Kconfig                     |   13 +
 drivers/media/platform/Makefile                    |    2 +
 drivers/media/platform/qcom/venus/Makefile         |   11 +
 drivers/media/platform/qcom/venus/core.c           |  388 +++++
 drivers/media/platform/qcom/venus/core.h           |  323 ++++
 drivers/media/platform/qcom/venus/firmware.c       |  107 ++
 drivers/media/platform/qcom/venus/firmware.h       |   22 +
 drivers/media/platform/qcom/venus/helpers.c        |  725 +++++++++
 drivers/media/platform/qcom/venus/helpers.h        |   44 +
 drivers/media/platform/qcom/venus/hfi.c            |  522 +++++++
 drivers/media/platform/qcom/venus/hfi.h            |  175 +++
 drivers/media/platform/qcom/venus/hfi_cmds.c       | 1255 ++++++++++++++++
 drivers/media/platform/qcom/venus/hfi_cmds.h       |  304 ++++
 drivers/media/platform/qcom/venus/hfi_helper.h     | 1050 +++++++++++++
 drivers/media/platform/qcom/venus/hfi_msgs.c       | 1056 +++++++++++++
 drivers/media/platform/qcom/venus/hfi_msgs.h       |  283 ++++
 drivers/media/platform/qcom/venus/hfi_venus.c      | 1571 ++++++++++++++++++++
 drivers/media/platform/qcom/venus/hfi_venus.h      |   23 +
 drivers/media/platform/qcom/venus/hfi_venus_io.h   |  113 ++
 drivers/media/platform/qcom/venus/vdec.c           | 1152 ++++++++++++++
 drivers/media/platform/qcom/venus/vdec.h           |   23 +
 drivers/media/platform/qcom/venus/vdec_ctrls.c     |  149 ++
 drivers/media/platform/qcom/venus/venc.c           | 1281 ++++++++++++++++
 drivers/media/platform/qcom/venus/venc.h           |   23 +
 drivers/media/platform/qcom/venus/venc_ctrls.c     |  269 ++++
 drivers/media/v4l2-core/v4l2-mem2mem.c             |   37 +
 include/linux/qcom_scm.h                           |   32 -
 include/media/v4l2-mem2mem.h                       |   92 ++
 32 files changed, 11190 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/qcom,venus.txt
 create mode 100644 drivers/media/platform/qcom/venus/Makefile
 create mode 100644 drivers/media/platform/qcom/venus/core.c
 create mode 100644 drivers/media/platform/qcom/venus/core.h
 create mode 100644 drivers/media/platform/qcom/venus/firmware.c
 create mode 100644 drivers/media/platform/qcom/venus/firmware.h
 create mode 100644 drivers/media/platform/qcom/venus/helpers.c
 create mode 100644 drivers/media/platform/qcom/venus/helpers.h
 create mode 100644 drivers/media/platform/qcom/venus/hfi.c
 create mode 100644 drivers/media/platform/qcom/venus/hfi.h
 create mode 100644 drivers/media/platform/qcom/venus/hfi_cmds.c
 create mode 100644 drivers/media/platform/qcom/venus/hfi_cmds.h
 create mode 100644 drivers/media/platform/qcom/venus/hfi_helper.h
 create mode 100644 drivers/media/platform/qcom/venus/hfi_msgs.c
 create mode 100644 drivers/media/platform/qcom/venus/hfi_msgs.h
 create mode 100644 drivers/media/platform/qcom/venus/hfi_venus.c
 create mode 100644 drivers/media/platform/qcom/venus/hfi_venus.h
 create mode 100644 drivers/media/platform/qcom/venus/hfi_venus_io.h
 create mode 100644 drivers/media/platform/qcom/venus/vdec.c
 create mode 100644 drivers/media/platform/qcom/venus/vdec.h
 create mode 100644 drivers/media/platform/qcom/venus/vdec_ctrls.c
 create mode 100644 drivers/media/platform/qcom/venus/venc.c
 create mode 100644 drivers/media/platform/qcom/venus/venc.h
 create mode 100644 drivers/media/platform/qcom/venus/venc_ctrls.c

dragonboard-410c:~$ ./v4l2-compliance -d /dev/video0
v4l2-compliance SHA   : 8fc88615b49843acb82cd8316d0bc4ab8474cba2

Driver Info:
        Driver name   : qcom-venus
        Card type     : Qualcomm Venus video decoder
        Bus info      : platform:qcom-venus
        Driver version: 4.9.0
        Capabilities  : 0x84204000
                Video Memory-to-Memory Multiplanar
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04204000
                Video Memory-to-Memory Multiplanar
                Streaming
                Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second video open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
        test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

        Control ioctls:
                test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
                test VIDIOC_QUERYCTRL: OK
                test VIDIOC_G/S_CTRL: OK
                test VIDIOC_G/S/TRY_EXT_CTRLS: OK
                test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
                test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
                Standard Controls: 7 Private Controls: 0

        Format ioctls:
                test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
                test VIDIOC_G/S_PARM: OK (Not Supported)
                test VIDIOC_G_FBUF: OK (Not Supported)
                test VIDIOC_G_FMT: OK
                test VIDIOC_TRY_FMT: OK
                test VIDIOC_S_FMT: OK
                test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
                test Cropping: OK (Not Supported)
                test Composing: OK (Not Supported)
                test Scaling: OK

        Codec ioctls:
                test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
                test VIDIOC_G_ENC_INDEX: OK (Not Supported)
                test VIDIOC_(TRY_)DECODER_CMD: OK

        Buffer ioctls:
                test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
                test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 43, Failed: 0, Warnings: 0



dragonboard-410c:~$ ./v4l2-compliance -d /dev/video1
v4l2-compliance SHA   : 8fc88615b49843acb82cd8316d0bc4ab8474cba2

Driver Info:
        Driver name   : qcom-venus
        Card type     : Qualcomm Venus video encoder
        Bus info      : platform:qcom-venus
        Driver version: 4.9.0
        Capabilities  : 0x84204000
                Video Memory-to-Memory Multiplanar
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04204000
                Video Memory-to-Memory Multiplanar
                Streaming
                Extended Pix Format

Compliance test for device /dev/video1 (not using libv4l2):

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second video open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
        test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

        Control ioctls:
                test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
                test VIDIOC_QUERYCTRL: OK
                test VIDIOC_G/S_CTRL: OK
                test VIDIOC_G/S/TRY_EXT_CTRLS: OK
                test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
                test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
                Standard Controls: 28 Private Controls: 0

        Format ioctls:
                test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
                test VIDIOC_G/S_PARM: OK
                test VIDIOC_G_FBUF: OK (Not Supported)
                test VIDIOC_G_FMT: OK
                test VIDIOC_TRY_FMT: OK
                test VIDIOC_S_FMT: OK
                test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
                test Cropping: OK
                test Composing: OK (Not Supported)
                test Scaling: OK

        Codec ioctls:
                test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
                test VIDIOC_G_ENC_INDEX: OK (Not Supported)
                test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

        Buffer ioctls:
                test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
                test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 43, Failed: 0, Warnings: 0
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-05-05 14:30 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28  9:13 [PATCH v8 00/10] Qualcomm video decoder/encoder driver Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 01/10] firmware: qcom_scm: Fix to allow COMPILE_TEST-ing Stanimir Varbanov
2017-05-02 19:22   ` Bjorn Andersson
2017-05-05 11:34   ` Hans Verkuil
2017-05-05 13:23     ` Stanimir Varbanov
2017-05-05 14:30       ` Hans Verkuil
2017-04-28  9:13 ` [PATCH v8 02/10] media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management Stanimir Varbanov
2017-05-05 11:36   ` Hans Verkuil
2017-04-28  9:13 ` [PATCH v8 03/10] doc: DT: venus: binding document for Qualcomm video driver Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 04/10] MAINTAINERS: Add Qualcomm Venus video accelerator driver Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 05/10] media: venus: adding core part and helper functions Stanimir Varbanov
2017-04-28 22:02   ` Jordan Crouse
2017-04-29 20:22     ` Bjorn Andersson
2017-05-02  9:17       ` Stanimir Varbanov
2017-05-03 13:46         ` Jordan Crouse
2017-04-29 22:21   ` Sakari Ailus
2017-05-02  8:52     ` Stanimir Varbanov
2017-05-02 18:52       ` Bjorn Andersson
2017-05-05 13:29         ` Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 06/10] media: venus: vdec: add video decoder files Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 07/10] media: venus: venc: add video encoder files Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 08/10] media: venus: hfi: add Host Firmware Interface (HFI) Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 09/10] media: venus: hfi: add Venus HFI files Stanimir Varbanov
2017-04-28  9:13 ` [PATCH v8 10/10] media: venus: enable building of Venus video driver Stanimir Varbanov
2017-05-05 12:44 ` [PATCH v8 00/10] Qualcomm video decoder/encoder driver Hans Verkuil
2017-05-05 13:42   ` Stanimir Varbanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).