linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Xia Jiang <xia.jiang@mediatek.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	Rick Chang <rick.chang@mediatek.com>
Cc: devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	linux-kernel@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>,
	linux-mediatek@lists.infradead.org, linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [PATCH v4 0/5] Add support for mt2701 JPEG ENC support
Date: Thu, 17 Oct 2019 16:40:28 +0800	[thread overview]
Message-ID: <20191017084033.28299-1-xia.jiang@mediatek.com> (raw)

This patchset add support for mt2701 JPEG ENC support.

This is the compliance test result for jpeg dec and enc.

The JPEG dec log:                                           
------------------------------------------------------------
v4l2-compliance -d /dev/video0                                                     
v4l2-compliance SHA: b51e9a8a74eed6da15127fe5eadf515914347f76, 32 bits             
                                                                                   
Compliance test for mtk-jpeg device /dev/video0:                                   
                                                                                   
Driver Info:                                                                       
        Driver name      : mtk-jpeg                                                
        Card type        : mtk-jpeg decoder                                        
        Bus info         : platform:15004000.jpegdec                               
        Driver version   : 5.4.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                                                
        Detected JPEG Decoder                                                      
                                                                                   
Required ioctls:                                                                   
        test VIDIOC_QUERYCAP: OK                                                   
                                                                                   
Allow for multiple opens:                                                          
        test second /dev/video0 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 (Not Supported)                
        test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)                               
        Standard Controls: 0 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                                                          
        test Composing: OK                                                         
        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 Requests: OK (Not Supported)                                          
                                                                                   
Total for mtk-jpeg device /dev/video0: 44, Succeeded: 44, Failed: 0, Warnings: 0   
------------------------------------------------------------

The JPEG enc log:

------------------------------------------------------------
v4l2-compliance -d /dev/video1 
v4l2-compliance SHA: b51e9a8a74eed6da15127fe5eadf515914347f76, 32 bits

Compliance test for mtk-jpeg device /dev/video1:

Driver Info:
        Driver name      : mtk-jpeg
        Card type        : mtk-jpeg encoder
        Bus info         : platform:1500a000.jpegenc
        Driver version   : 5.4.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
        Detected JPEG Encoder

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second /dev/video1 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: 4 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
        test Composing: OK
        test Scaling: OK (Not Supported)

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 Requests: OK (Not Supported)

Total for mtk-jpeg device /dev/video1: 44, Succeeded: 44, Failed: 0, Warnings: 0
------------------------------------------------------------

Change compared to v3:
-put original v4l2-compliance bug fix in a separate patch.
-split mtk_jpeg_try_fmt_mplane() to two functions, one for encoder, one
 for decoder.
-split mtk_jpeg_set_default_params() to two functions, one for encoder,
 one for decoder.
-add cropping support for encoder in g/s_selection ioctls.
-cancle v3 patch 'media:v4l2-ctrl: Add jpeg enc exif mode control',
 because that exif information can use V4L2_JPEG_ACTIVE_MARKER_APP1
 annotation: Exif metadata are restricted in size to 64kB in JPEG
 images because according to the specification this information be
 contained within a single JPEG APP1 segment (from wikipedia).
-change MTK_JPEG_MAX_WIDTH/MTK_JPEG_MAX_HEIGH from 8192 to 65535 by
 specification.
-move width shifting operation behind aligning operation in
 mtk_jpeg_try_enc_fmt_mplane() for bug fix.
-fix user abuseing data_offset issue for DMABUF in
 mtk_jpeg_set_enc_src().
-fix kbuild warings: change MTK_JPEG_MIN_HEIGHT/MTK_JPEG_MAX_HEIGHT and
                     MTK_JPEG_MIN_WIDTH/MTK_JPEG_MAX_WIDTH from int
                     type to unsigned int type.
                     fix msleadingly indented of 'else'.

Xia Jiang (5):
  media: dt-bindings: Add jpeg enc device tree node document
  arm: dts: Add jpeg enc device tree node
  media: platform: Rename jpeg dec file name
  media: platform: Fix v4l2-compliance test bug
  media: platform: Add jpeg dec/enc feature

 .../bindings/media/mediatek-jpeg-encoder.txt  |  37 +
 arch/arm/boot/dts/mt2701.dtsi                 |  13 +
 drivers/media/platform/mtk-jpeg/Makefile      |   5 +-
 .../media/platform/mtk-jpeg/mtk_jpeg_core.c   | 746 ++++++++++++++----
 .../media/platform/mtk-jpeg/mtk_jpeg_core.h   | 123 ++-
 .../{mtk_jpeg_hw.c => mtk_jpeg_dec_hw.c}      |   2 +-
 .../{mtk_jpeg_hw.h => mtk_jpeg_dec_hw.h}      |   9 +-
 ...{mtk_jpeg_parse.c => mtk_jpeg_dec_parse.c} |   2 +-
 ...{mtk_jpeg_parse.h => mtk_jpeg_dec_parse.h} |   2 +-
 .../{mtk_jpeg_reg.h => mtk_jpeg_dec_reg.h}    |   0
 .../media/platform/mtk-jpeg/mtk_jpeg_enc_hw.c | 175 ++++
 .../media/platform/mtk-jpeg/mtk_jpeg_enc_hw.h |  60 ++
 .../platform/mtk-jpeg/mtk_jpeg_enc_reg.h      |  49 ++
 13 files changed, 1069 insertions(+), 154 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.txt
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_hw.c => mtk_jpeg_dec_hw.c} (99%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_hw.h => mtk_jpeg_dec_hw.h} (91%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_parse.c => mtk_jpeg_dec_parse.c} (98%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_parse.h => mtk_jpeg_dec_parse.h} (92%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_reg.h => mtk_jpeg_dec_reg.h} (100%)
 create mode 100644 drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_hw.c
 create mode 100644 drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_hw.h
 create mode 100644 drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_reg.h

-- 
2.18.0




_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

             reply	other threads:[~2019-10-17  8:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17  8:40 Xia Jiang [this message]
2019-10-17  8:40 ` [PATCH v4 1/5] media: dt-bindings: Add jpeg enc device tree node document Xia Jiang
2019-10-17  8:40 ` [PATCH v4 2/5] arm: dts: Add jpeg enc device tree node Xia Jiang
2019-10-17  8:40 ` [PATCH v4 3/5] media: platform: Rename jpeg dec file name Xia Jiang
2019-10-17  8:40 ` [PATCH v4 4/5] media: platform: Fix v4l2-compliance test bug Xia Jiang
2019-10-17  8:40 ` [PATCH v4 5/5] media: platform: Add jpeg dec/enc feature Xia Jiang
2019-10-21  9:23   ` Hans Verkuil
2019-12-06  8:06     ` Xia Jiang
2019-10-23 10:39   ` Tomasz Figa
2019-10-24  8:38     ` Xia Jiang
2019-10-24  9:23       ` Tomasz Figa
2019-10-28  2:25         ` Xia Jiang
2019-11-11  7:01           ` Tomasz Figa
2019-12-06  9:59     ` Xia Jiang
2020-03-10  4:17       ` Tomasz Figa
2020-04-22  7:00         ` Xia Jiang
2020-05-01 15:15           ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191017084033.28299-1-xia.jiang@mediatek.com \
    --to=xia.jiang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=rick.chang@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).