<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/media/platform/mediatek, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/media/platform/mediatek?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/media/platform/mediatek?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-27T08:27:56Z</updated>
<entry>
<title>Merge fixes into media_stage</title>
<updated>2022-09-27T08:27:56Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@kernel.org</email>
</author>
<published>2022-09-27T08:27:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d67614f276c1499ad939fa5c1aadd35498cc6b34'/>
<id>urn:sha1:d67614f276c1499ad939fa5c1aadd35498cc6b34</id>
<content type='text'>
* fixes:
  media: rkvdec: Disable H.264 error detection
  media: mediatek: vcodec: Drop platform_get_resource(IORESOURCE_IRQ)
  media: dvb_vb2: fix possible out of bound access
  media: v4l2-ioctl.c: fix incorrect error path
  media: v4l2-compat-ioctl32.c: zero buffer passed to v4l2_compat_get_array_args()
  media: uvcvideo: Fix InterfaceProtocol for Quanta camera
</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: platform: mtk-mdp3: fix PM reference leak in mdp_comp_clock_on()</title>
<updated>2022-09-24T06:53:43Z</updated>
<author>
<name>Sun Ke</name>
<email>sunke32@huawei.com</email>
</author>
<published>2022-09-02T08:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ff464745e4576ed8670bc2fc8da27e022f0ea56c'/>
<id>urn:sha1:ff464745e4576ed8670bc2fc8da27e022f0ea56c</id>
<content type='text'>
mdp_comp_clock_on will increase runtime PM usage counter,
and mdp_comp_clock_off will decrease the runtime PM usage counter.
so, if mdp_comp_clock_on failed after increment runtime PM usage
counter, it should decrease it before return a error code.

pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

And if failed to enable clk, add pm_runtime_put() to decrease the
runtime PM usage counter.

Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Signed-off-by: Sun Ke &lt;sunke32@huawei.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: platform: mtk-mdp3: fix error code in mdp_vpu_dev_init()</title>
<updated>2022-09-24T06:52:55Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-09-01T14:47:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dec7920e55db35ac429b002025aa1fafc0ec7d57'/>
<id>urn:sha1:dec7920e55db35ac429b002025aa1fafc0ec7d57</id>
<content type='text'>
Return a negative error code if mdp_vpu_shared_mem_alloc() fails.

Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: 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: platform: mtk-mdp3: add pointer checks and use devm_kfree</title>
<updated>2022-09-24T06:51:31Z</updated>
<author>
<name>Moudy Ho</name>
<email>moudy.ho@mediatek.com</email>
</author>
<published>2022-08-31T08:56:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=74869a88f9d551add870412b53c2be8a192b8d12'/>
<id>urn:sha1:74869a88f9d551add870412b53c2be8a192b8d12</id>
<content type='text'>
Fix two errors reported by smatch:
    drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c:292
        mdp_probe() error: we previously assumed 'mdp' could be null
    drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c:460
        mdp_cmdq_send() error: we previously assumed 'cmd' could be null

Also, avoid warnings reported by smatch:
    drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c:872
        mdp_comp_create() warn: passing devm_ allocated variable to kfree. 'comp'

[hverkuil: fix devm_kfree call]

Signed-off-by: Moudy Ho &lt;moudy.ho@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: platform: mtk-mdp3: add MediaTek MDP3 driver</title>
<updated>2022-08-30T14:25:51Z</updated>
<author>
<name>Moudy Ho</name>
<email>moudy.ho@mediatek.com</email>
</author>
<published>2022-08-23T02:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=61890ccaefaff89f5babd2c8412fd222c3f5fe38'/>
<id>urn:sha1:61890ccaefaff89f5babd2c8412fd222c3f5fe38</id>
<content type='text'>
This patch adds driver for MediaTek's Media Data Path ver.3 (MDP3).
It provides the following functions:
  color transform, format conversion, resize, crop, rotate, flip
  and additional image quality enhancement.

The MDP3 driver is mainly used for Google Chromebook products to
import the new architecture to set the HW settings as shown below:
  User -&gt; V4L2 framework
    -&gt; MDP3 driver -&gt; SCP (setting calculations)
      -&gt; MDP3 driver -&gt; CMDQ (GCE driver) -&gt; HW

Each modules' related operation control is sited in mtk-mdp3-comp.c
Each modules' register table is defined in file with "mdp_reg_" prefix
GCE related API, operation control  sited in mtk-mdp3-cmdq.c
V4L2 m2m device functions are implemented in mtk-mdp3-m2m.c
Probe, power, suspend/resume, system level functions are defined in
mtk-mdp3-core.c

[hverkuil: add 'depends on REMOTEPROC']

Signed-off-by: Ping-Hsun Wu &lt;ping-hsun.wu@mediatek.com&gt;
Signed-off-by: daoyuan huang &lt;daoyuan.huang@mediatek.com&gt;
Signed-off-by: Moudy Ho &lt;moudy.ho@mediatek.com&gt;
Tested-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: platform: fix some double free in meson-ge2d and mtk-jpeg and s5p-mfc</title>
<updated>2022-08-30T13:20:49Z</updated>
<author>
<name>Hangyu Hua</name>
<email>hbh25y@gmail.com</email>
</author>
<published>2022-08-16T08:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c65c3f3a2cbf21ed429d9b9c725bdb5dc6abf4cf'/>
<id>urn:sha1:c65c3f3a2cbf21ed429d9b9c725bdb5dc6abf4cf</id>
<content type='text'>
video_unregister_device will release device internally. There is no need to
call video_device_release after video_unregister_device.

Signed-off-by: Hangyu Hua &lt;hbh25y@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: 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>
</feed>
