<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/media/platform/mediatek/vcodec, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/media/platform/mediatek/vcodec?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/media/platform/mediatek/vcodec?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-07T18:04:35Z</updated>
<entry>
<title>Merge tag 'media/v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media</title>
<updated>2022-10-07T18:04:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-10-07T18:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5d435a3f7b6cb1db566d0f56f5f8dc33be0dde69'/>
<id>urn:sha1:5d435a3f7b6cb1db566d0f56f5f8dc33be0dde69</id>
<content type='text'>
Pull media updates from Mauro Carvalho Chehab:

 - New driver for Mediatek MDP V3

 - New driver for NXP i.MX DW100 dewarper

 - Zoran driver got promoted from staging

 - Hantro and related drivers got promoted from staging

 - Several VB1 drivers got moved to staging/deprecated (cpia2, fsl-viu,
   meye, saa7146, av7110, stkwebcam, tm6000, vpfe_capture, davinci,
   zr364xx)

 - Usual set of driver fixes, improvements and cleanups

* tag 'media/v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (107 commits)
  media: destage Hantro VPU driver
  media: platform: mtk-mdp3: add MediaTek MDP3 driver
  media: dt-binding: mediatek: add bindings for MediaTek CCORR and WDMA
  media: dt-binding: mediatek: add bindings for MediaTek MDP3 components
  media: xilinx: vipp: Fix refcount leak in xvip_graph_dma_init
  media: xilinx: video: Add 1X12 greyscale format
  media: xilinx: csi2rxss: Add 1X12 greyscale format
  media: staging: media: imx: imx7-media-csi: Increase video mem limit
  media: uvcvideo: Limit power line control for Sonix Technology
  media: uvcvideo: Use entity get_cur in uvc_ctrl_set
  media: uvcvideo: Fix typo 'the the' in comment
  media: uvcvideo: Use indexed loops in uvc_ctrl_init_ctrl()
  media: uvcvideo: Fix memory leak in uvc_gpio_parse
  media: renesas: vsp1: Add support for RZ/G2L VSPD
  media: renesas: vsp1: Add VSP1_HAS_NON_ZERO_LBA feature bit
  media: renesas: vsp1: Add support for VSP software version
  media: renesas: vsp1: Add support to deassert/assert reset line
  media: dt-bindings: media: renesas,vsp1: Document RZ/G2L VSPD bindings
  media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start()
  media: amphion: fix a bug that vpu core may not resume after suspend
  ...
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Drop platform_get_resource(IORESOURCE_IRQ)</title>
<updated>2022-09-27T08:24:44Z</updated>
<author>
<name>Nícolas F. R. A. Prado</name>
<email>nfraprado@collabora.com</email>
</author>
<published>2022-06-17T20:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a2d2e593d39bc2f29a1cd5e3779af457fd26490c'/>
<id>urn:sha1:a2d2e593d39bc2f29a1cd5e3779af457fd26490c</id>
<content type='text'>
Commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource
from DT core") removed support for calling platform_get_resource(...,
IORESOURCE_IRQ, ...) on DT-based drivers, but the probe() function of
mtk-vcodec's encoder was still making use of it. This caused the encoder
driver to fail probe.

Since the platform_get_resource() call was only being used to check for
the presence of the interrupt (its returned resource wasn't even used)
and platform_get_irq() was already being used to get the IRQ, simply
drop the use of platform_get_resource(IORESOURCE_IRQ) and handle the
failure of platform_get_irq(), to get the driver probing again.

[hverkuil: drop unused struct resource *res]

Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@collabora.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Skip non CBR bitrate mode</title>
<updated>2022-08-30T12:41:15Z</updated>
<author>
<name>Hirokazu Honda</name>
<email>hiroh@chromium.org</email>
</author>
<published>2022-08-02T04:42:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e7bfdf0a854037e8c0597f1f44f72651869c424d'/>
<id>urn:sha1:e7bfdf0a854037e8c0597f1f44f72651869c424d</id>
<content type='text'>
V4L2_MPEG_VIDEO_BITRATE_MODE_CBR is the only bitrate mode supported
by the mediatek driver. The other bitrates must be skipped in
QUERY_MENU.

Fixes: d8e8aa866ed8 ("media: mediatek: vcodec: Report supported bitrate modes")
Signed-off-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Reviewed-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Add mt8188 encoder's chip name</title>
<updated>2022-08-30T12:40:47Z</updated>
<author>
<name>Yunfei Dong</name>
<email>yunfei.dong@mediatek.com</email>
</author>
<published>2022-07-27T02:37:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b813e39a6906908e2169574063cace9a03bd8ed6'/>
<id>urn:sha1:b813e39a6906908e2169574063cace9a03bd8ed6</id>
<content type='text'>
Getting mt8188's chip name according to encoder compatible name.

Signed-off-by: Yunfei Dong &lt;yunfei.dong@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: add decoder compatible to support mt8188</title>
<updated>2022-08-30T12:33:42Z</updated>
<author>
<name>Yunfei Dong</name>
<email>yunfei.dong@mediatek.com</email>
</author>
<published>2022-07-27T02:37:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b9b9db6a2d68b16b8473ae79a1aae255feaf1bca'/>
<id>urn:sha1:b9b9db6a2d68b16b8473ae79a1aae255feaf1bca</id>
<content type='text'>
1: add mt8188's compatible name: mediatek,mt8188-vcodec-dec.
2: mt8188 is lat single core architecture, using mtk_lat_sig_core_pdata to
   initialize private data.
3: Getting mt8188's chip name according to decoder compatible name.

Signed-off-by: Yunfei Dong &lt;yunfei.dong@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Use ctx vb2_queue mutex instead of device mutex</title>
<updated>2022-08-30T12:32:39Z</updated>
<author>
<name>Irui Wang</name>
<email>irui.wang@mediatek.com</email>
</author>
<published>2022-07-20T08:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=58037ad43f2d33746d0d7d16514de44d6e8f566e'/>
<id>urn:sha1:58037ad43f2d33746d0d7d16514de44d6e8f566e</id>
<content type='text'>
There is only one device mutex to lock vb2_queue when running
multi-instance encoding, it can be set by each encoder context.

[hverkuil: fix q_mutex documentation in the header]

Signed-off-by: Irui Wang &lt;irui.wang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Fix bitstream crop information error</title>
<updated>2022-08-30T12:32:09Z</updated>
<author>
<name>Irui Wang</name>
<email>irui.wang@mediatek.com</email>
</author>
<published>2022-07-20T08:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cd61f3c6794bea2b717fe6083ca2ad189db75418'/>
<id>urn:sha1:cd61f3c6794bea2b717fe6083ca2ad189db75418</id>
<content type='text'>
Usually, the real bitstream width and height will set to driver
by vidioc_s_fmt, and vidioc_try_fmt() does align to get the
buffer width and height, driver calculate the encoded bitstream
crop information through them. The aligned resolution will be set
as real resolution now if user didn't set crop info by
V4L2_SEL_TGT_CROP, and the encoded bitstream may exist green line
because of crop information error.

Fixs: 'b6c57d313f5f8 ("media: mtk-vcodec: venc: remove redundant code")'

Signed-off-by: Irui Wang &lt;irui.wang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Remove encoder driver get IRQ resource</title>
<updated>2022-08-30T12:31:40Z</updated>
<author>
<name>Irui Wang</name>
<email>irui.wang@mediatek.com</email>
</author>
<published>2022-07-20T08:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=223afdf9caa073114a25b79915781e09eadb23b7'/>
<id>urn:sha1:223afdf9caa073114a25b79915781e09eadb23b7</id>
<content type='text'>
The "platform_get_resource(pdev, IORESOURCE_IRQ, 0)" is no longer
used after commit a1a2b7125e107("of/platform: Drop static setup of
IRQ resource from DT core"), so just remove the function in
encoder driver to avoid driver probe failed.

Signed-off-by: Irui Wang &lt;irui.wang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Add mt8188 encoder driver</title>
<updated>2022-08-30T12:31:06Z</updated>
<author>
<name>Irui Wang</name>
<email>irui.wang@mediatek.com</email>
</author>
<published>2022-07-20T08:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=53ed4873a256cabf70c6698c7bfffdbdc26a2a92'/>
<id>urn:sha1:53ed4873a256cabf70c6698c7bfffdbdc26a2a92</id>
<content type='text'>
Add mt8188's compatible "mediatek,mt8188-vcodec-enc".
Add mt8188's device private data "mt8188_pdata".

Signed-off-by: Irui Wang &lt;irui.wang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Add encoder driver support for 34-bit iova</title>
<updated>2022-08-30T12:30:18Z</updated>
<author>
<name>Irui Wang</name>
<email>irui.wang@mediatek.com</email>
</author>
<published>2022-07-20T08:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=34cb6947bfc9ea43dde303210b98c57e1aedcb92'/>
<id>urn:sha1:34cb6947bfc9ea43dde303210b98c57e1aedcb92</id>
<content type='text'>
Encoder driver got iova from IOMMU is 34-bit, for example:

Here is the sample code:
encoder input frame buffer dma address is:
frm_buf =
    vb2_dma_contig_plane_dma_addr(&amp;vb2_v4l2_buffer-&gt;vb2_buf, 0);
the value of frm_buf is 0x1_ff30_0000.

encoder driver got the frm_buf and send the iova to SCP firmware
through SCP IPI message, then write to encoder hardware in SCP.
The iova is stored in IPI message as uint32_t data type, so the
value will be truncated from *0x1_ff30_0000* to *0xff30_0000*,
and then *0xff30_0000* will be written to encoder hardware, but
IOMMU will help to add the high *0x1_* bit back, so IOMMU can
translate the iova to PA correctly, encoder hardware can access
the correct memory for encoding.
Another reason to do this is the encoder hardware can't access
the 34-bit iova, IOMMU will help to add the remaining high bits
of iova. But for mt8188, encoder hardware can access 34-bit iova
directly, and encoder driver need write all 34 bits because
IOMMU can't help driver do this if the hardware support access
34-bit iova.
For the reasons above, this patch is added to support transfer
34-bit iova between kernel and SCP encoder driver. Use uint64_t
data type to store the iova, for compatibility with old chipsets,
add some new struct definitions for 34-bit.

[hverkuil: initialize wb and wb_34 to NULL]

Signed-off-by: Irui Wang &lt;irui.wang@mediatek.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
</feed>
