<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/platform/mtk-vcodec, branch linux-5.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-04-17T14:11:56Z</updated>
<entry>
<title>media: mtk-vpu: avoid unaligned access to DTCM buffer.</title>
<updated>2020-04-17T14:11:56Z</updated>
<author>
<name>Hsin-Yi Wang</name>
</author>
<published>2020-03-04T02:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47886aacd66e47932f7476fda3e21c2659175746'/>
<id>urn:sha1:47886aacd66e47932f7476fda3e21c2659175746</id>
<content type='text'>
[ Upstream commit e6599adfad30c340d06574e49a86afa7015c5c60 ]

Previously, vpu-&gt;recv_buf and send_buf are forced cast from
void __iomem *tcm. vpu-&gt;recv_buf-&gt;share_buf is passed to
vpu_ipi_desc.handler(). It's not able to do unaligned access. Otherwise
kernel would crash due to unable to handle kernel paging request.

struct vpu_run {
	u32 signaled;
	char fw_ver[VPU_FW_VER_LEN];
	unsigned int	dec_capability;
	unsigned int	enc_capability;
	wait_queue_head_t wq;
};

fw_ver starts at 4 byte boundary. If system enables
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, strscpy() will do
read_word_at_a_time(), which tries to read 8-byte: *(unsigned long *)addr

vpu_init_ipi_handler() calls strscpy(), which would lead to crash.

vpu_init_ipi_handler() and several other handlers (eg.
vpu_dec_ipi_handler) only do read access to this data, so they can be
const, and we can use memcpy_fromio() to copy the buf to another non iomem
buffer then pass to handler.

Fixes: 85709cbf1524 ("media: replace strncpy() by strscpy()")
Signed-off-by: Hsin-Yi Wang &lt;hsinyi@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding"</title>
<updated>2019-11-10T17:10:11Z</updated>
<author>
<name>Hans Verkuil</name>
</author>
<published>2019-11-10T13:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dca6b3733a4a46e63603496f544ece8ace541fde'/>
<id>urn:sha1:dca6b3733a4a46e63603496f544ece8ace541fde</id>
<content type='text'>
This reverts commit 3192b2ca79b3f72fbc0eab9cd95432e3c317ab0d.

There are indications that this patch causes problems on some
platforms due to some hardware prefetch. Reverting this patch
for now until this is better understood.

Reported-by: Tomasz Figa &lt;tfiga@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: mtk-vcodec: Remove extra area allocation in an input buffer on encoding</title>
<updated>2019-11-10T06:25:34Z</updated>
<author>
<name>Hirokazu Honda</name>
</author>
<published>2019-11-10T06:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3192b2ca79b3f72fbc0eab9cd95432e3c317ab0d'/>
<id>urn:sha1:3192b2ca79b3f72fbc0eab9cd95432e3c317ab0d</id>
<content type='text'>
MediaTek encoder allocates non pixel data area for an input buffer every
plane. As the input buffer should be read-only, the driver should not write
anything in the buffer. Therefore, the extra data should be unnecessary.

Signed-off-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Reviewed-by: Tomasz Figa &lt;tfiga@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: platform: Use devm_platform_ioremap_resource() in two functions</title>
<updated>2019-10-10T10:29:07Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2019-09-18T09:20:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8b1ad7ce76513efaa463c25d261dab67f7f1f67'/>
<id>urn:sha1:d8b1ad7ce76513efaa463c25d261dab67f7f1f67</id>
<content type='text'>
Simplify these function implementations by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Tested-by: Niklas Söderlund &lt;niklas.soderlund@ragnatech.se&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mtk-vcodec: vdec: clean up vidioc_vdec_s_fmt a bit</title>
<updated>2019-10-01T19:46:42Z</updated>
<author>
<name>Alexandre Courbot</name>
</author>
<published>2019-09-06T11:55:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c7b5eedb9884dc012a9146d523f7c5194e757d5'/>
<id>urn:sha1:1c7b5eedb9884dc012a9146d523f7c5194e757d5</id>
<content type='text'>
Check for a potentially NULL pointer that was overlooked and use shorter
accessors to the same data. While we are at it, sprinkle a few comments.

Signed-off-by: Alexandre Courbot &lt;acourbot@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mtk-vcodec: vdec: set VPI IPI handler in one place</title>
<updated>2019-10-01T19:45:25Z</updated>
<author>
<name>Alexandre Courbot</name>
</author>
<published>2019-09-06T11:55:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2abb4db289d757cddf2bf8aae34be65bad653bb7'/>
<id>urn:sha1:2abb4db289d757cddf2bf8aae34be65bad653bb7</id>
<content type='text'>
Each of the supported decoder formats used to set the same RPC
interrupt handler by themselves, even though this could be done
by the IF init function itself. Move it to the right place and stop
making its symbol public.

Signed-off-by: Alexandre Courbot &lt;acourbot@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mtk-vcodec: vdec: fix incorrect pointer dereference</title>
<updated>2019-10-01T19:44:57Z</updated>
<author>
<name>Yunfei Dong</name>
</author>
<published>2019-09-06T11:55:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dda8415e17c99ad3d6ac56d8aa722198f816fc74'/>
<id>urn:sha1:dda8415e17c99ad3d6ac56d8aa722198f816fc74</id>
<content type='text'>
mtk_q_data::fmt is actually a pointer and must be dereferenced as such.
This went under the radar because mtk_v4l2_debug() evaluates to nothing
unless DEBUG is defined.

[acourbot: split into its own commit]

Signed-off-by: Yunfei Dong &lt;yunfei.dong@mediatek.com&gt;
Signed-off-by: Alexandre Courbot &lt;acourbot@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION</title>
<updated>2019-08-19T17:57:40Z</updated>
<author>
<name>Maxime Jourdan</name>
</author>
<published>2019-08-15T14:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=abf8dd2922b51710387e44307884615f072abc18'/>
<id>urn:sha1:abf8dd2922b51710387e44307884615f072abc18</id>
<content type='text'>
Tag all the coded formats where the mtk-vcodec decoder supports dynamic
resolution switching.

Signed-off-by: Maxime Jourdan &lt;mjourdan@baylibre.com&gt;
Reviewed-by: Paul Kocialkowski &lt;paul.kocialkowski@bootlin.com&gt;
Reviewed-by: Alexandre Courbot &lt;acourbot@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mtk-vcodec: Handle H264 error bitstreams</title>
<updated>2019-08-07T20:05:29Z</updated>
<author>
<name>Rui Wang</name>
</author>
<published>2019-07-31T04:29:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00ab9c1a620dc29f3651d5b61ad12aa327d4dd12'/>
<id>urn:sha1:00ab9c1a620dc29f3651d5b61ad12aa327d4dd12</id>
<content type='text'>
Error h264 bitstreams which picture info are out range of
decoder hardware specification, and no nal start code at the
beginning of the buffer, stop decoding and exit.

Signed-off-by: Rui Wang &lt;gtk_ruiwang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mtk-vcodec: remove unneeded proxy functions</title>
<updated>2019-06-21T21:10:20Z</updated>
<author>
<name>Alexandre Courbot</name>
</author>
<published>2019-06-14T07:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9fcb242be63db7c43c65401b615012225c648515'/>
<id>urn:sha1:9fcb242be63db7c43c65401b615012225c648515</id>
<content type='text'>
We were getting the codec interface through a proxy function that does
not bring anything compared to just accessing the interface definition
directly, so just do that. Also make the decoder interfaces const.

Signed-off-by: Alexandre Courbot &lt;acourbot@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
</feed>
