<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/media/platform/mediatek/vcodec/decoder/vdec, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-07-11T10:50:58Z</updated>
<entry>
<title>media: mediatek: vcodec: Only free buffer VA that is not NULL</title>
<updated>2024-07-11T10:50:58Z</updated>
<author>
<name>Fei Shao</name>
<email>fshao@chromium.org</email>
</author>
<published>2023-12-21T09:17:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=303d01082edaf817ee2df53a40dca9da637a2c04'/>
<id>urn:sha1:303d01082edaf817ee2df53a40dca9da637a2c04</id>
<content type='text'>
[ Upstream commit eb005c801ec70ff4307727bd3bd6e8280169ef32 ]

In the MediaTek vcodec driver, while mtk_vcodec_mem_free() is mostly
called only when the buffer to free exists, there are some instances
that didn't do the check and triggered warnings in practice.

We believe those checks were forgotten unintentionally. Add the checks
back to fix the warnings.

Signed-off-by: Fei Shao &lt;fshao@chromium.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Signed-off-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: support 36 bits physical address</title>
<updated>2024-03-26T08:52:59Z</updated>
<author>
<name>Yunfei Dong</name>
<email>yunfei.dong@mediatek.com</email>
</author>
<published>2024-03-06T12:19:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d353c3c34af08cfd4eaafc8c55f664eacec274ee'/>
<id>urn:sha1:d353c3c34af08cfd4eaafc8c55f664eacec274ee</id>
<content type='text'>
The physical address on the MT8188 platform is larger than 32 bits,
change the type from unsigned int to dma_addr_t to be able to access
the high bits of the address.

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: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Fix oops when HEVC init fails</title>
<updated>2024-03-26T08:52:58Z</updated>
<author>
<name>Nicolas Dufresne</name>
<email>nicolas.dufresne@collabora.com</email>
</author>
<published>2024-02-26T21:19:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=97c75ee5de060d271d80109b0c47cb6008439e5b'/>
<id>urn:sha1:97c75ee5de060d271d80109b0c47cb6008439e5b</id>
<content type='text'>
The stateless HEVC decoder saves the instance pointer in the context
regardless if the initialization worked or not. This caused a use after
free, when the pointer is freed in case of a failure in the deinit
function.
Only store the instance pointer when the initialization was successful,
to solve this issue.

 Hardware name: Acer Tomato (rev3 - 4) board (DT)
 pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : vcodec_vpu_send_msg+0x4c/0x190 [mtk_vcodec_dec]
 lr : vcodec_send_ap_ipi+0x78/0x170 [mtk_vcodec_dec]
 sp : ffff80008750bc20
 x29: ffff80008750bc20 x28: ffff1299f6d70000 x27: 0000000000000000
 x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
 x23: ffff80008750bc98 x22: 000000000000a003 x21: ffffd45c4cfae000
 x20: 0000000000000010 x19: ffff1299fd668310 x18: 000000000000001a
 x17: 000000040044ffff x16: ffffd45cb15dc648 x15: 0000000000000000
 x14: ffff1299c08da1c0 x13: ffffd45cb1f87a10 x12: ffffd45cb2f5fe80
 x11: 0000000000000001 x10: 0000000000001b30 x9 : ffffd45c4d12b488
 x8 : 1fffe25339380d81 x7 : 0000000000000001 x6 : ffff1299c9c06c00
 x5 : 0000000000000132 x4 : 0000000000000000 x3 : 0000000000000000
 x2 : 0000000000000010 x1 : ffff80008750bc98 x0 : 0000000000000000
 Call trace:
  vcodec_vpu_send_msg+0x4c/0x190 [mtk_vcodec_dec]
  vcodec_send_ap_ipi+0x78/0x170 [mtk_vcodec_dec]
  vpu_dec_deinit+0x1c/0x30 [mtk_vcodec_dec]
  vdec_hevc_slice_deinit+0x30/0x98 [mtk_vcodec_dec]
  vdec_if_deinit+0x38/0x68 [mtk_vcodec_dec]
  mtk_vcodec_dec_release+0x20/0x40 [mtk_vcodec_dec]
  fops_vcodec_release+0x64/0x118 [mtk_vcodec_dec]
  v4l2_release+0x7c/0x100
  __fput+0x80/0x2d8
  __fput_sync+0x58/0x70
  __arm64_sys_close+0x40/0x90
  invoke_syscall+0x50/0x128
  el0_svc_common.constprop.0+0x48/0xf0
  do_el0_svc+0x24/0x38
  el0_svc+0x38/0xd8
  el0t_64_sync_handler+0xc0/0xc8
  el0t_64_sync+0x1a8/0x1b0
 Code: d503201f f9401660 b900127f b900227f (f9400400)

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Fixes: 2674486aac7d ("media: mediatek: vcodec: support stateless hevc decoder")
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: Handle VP9 superframe bitstream with 8 sub-frames</title>
<updated>2024-03-26T08:52:58Z</updated>
<author>
<name>Irui Wang</name>
<email>irui.wang@mediatek.com</email>
</author>
<published>2024-03-06T02:12:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=502892bbd2021fbe20f0d702b6b0bae281a742fa'/>
<id>urn:sha1:502892bbd2021fbe20f0d702b6b0bae281a742fa</id>
<content type='text'>
The VP9 bitstream uses superframes, which each contain 8 sub-frames,
enable accessing the last superframe by increasing the range of the index
vaidation as the maximum number of superframes is 8 and not 7, so that the
last sub-frame can be decoded normally with the stateful VP9 decoder.

Signed-off-by: Irui Wang &lt;irui.wang@mediatek.com&gt;
Signed-off-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vcodec: drop excess struct members descriptions</title>
<updated>2024-01-24T10:38:34Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil-cisco@xs4all.nl</email>
</author>
<published>2024-01-22T09:26:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=04447d48afd365a837e23cde631517f166045b9d'/>
<id>urn:sha1:04447d48afd365a837e23cde631517f166045b9d</id>
<content type='text'>
Drop obsolete @wait_key_frame and @mv_joint struct member descriptions.

This fixes two warnings:

drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c:57: warning: Excess struct member 'wait_key_frame' description in 'vdec_vp8_slice_info'
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c:166: warning: Excess struct member 'mv_joint' description in 'vdec_vp9_slice_counts_map'

Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
</content>
</entry>
<entry>
<title>media: mediatek: vdec: Remove useless loop</title>
<updated>2023-11-23T11:01:46Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2023-11-09T16:29:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=066f7c4199acbefeed419ca1d3b70405753d0cef'/>
<id>urn:sha1:066f7c4199acbefeed419ca1d3b70405753d0cef</id>
<content type='text'>
Simplify code by removing useless loop by using video buffer index.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Reviewed-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
CC: Bin Liu &lt;bin.liu@mediatek.com&gt;
CC: Matthias Brugger &lt;matthias.bgg@gmail.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: separate decoder and encoder</title>
<updated>2023-08-10T05:58:34Z</updated>
<author>
<name>Yunfei Dong</name>
<email>yunfei.dong@mediatek.com</email>
</author>
<published>2023-07-29T02:55:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0934d37596151edce115c6d0843a9ad7d5e5d232'/>
<id>urn:sha1:0934d37596151edce115c6d0843a9ad7d5e5d232</id>
<content type='text'>
Move all decoder files to folder decoder.
Move all encoder files to folder encoder.
Move common files which shared for encoder and decoder to folder common.

Change include header files and Makefile to fix build error.

Signed-off-by: Yunfei Dong &lt;yunfei.dong@mediatek.com&gt;
Reviewed-by: Nicolas Dufresne &lt;nicolas.dufresne@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;
</content>
</entry>
</feed>
