<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/platform/amphion, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-10-24T07:57:50Z</updated>
<entry>
<title>media: amphion: fix a bug that vpu core may not resume after suspend</title>
<updated>2022-10-24T07:57:50Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-08-18T03:18:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=325de494d8ce4d595849e83dc1bc856e30b83c4e'/>
<id>urn:sha1:325de494d8ce4d595849e83dc1bc856e30b83c4e</id>
<content type='text'>
[ Upstream commit 0202a665bf17fbe98fed954944aabbcb4f14a4cc ]

driver will enable the vpu core when request the first instance
on the core.
one vpu core can only support 8 streaming instances in the same
time, the instance won't be added to core's list before streamon.

so the actual instance count may be greater then the number in
the core's list.

in pm resume callback, driver will resume the core immediately if
core's list is not empty.
but this check is not accurate,
if suspend during one instance is requested, but not streamon,
then after suspend, the core won't be resume, and led to instance failure.

use the request_count instead of the core's list to check
whether is the core needed to resume immediately after suspend.

And it can make the pm suspend and resume callback more clear.

Fixes: 9f599f351e86 ("media: amphion: add vpu core driver")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: don't change the colorspace reported by decoder.</title>
<updated>2022-10-24T07:57:50Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-07-26T03:02:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47fd2c400869a29f0fbc2837207a04f49665d3d3'/>
<id>urn:sha1:47fd2c400869a29f0fbc2837207a04f49665d3d3</id>
<content type='text'>
[ Upstream commit 61c2698ee60630c6a7d2e99850fa81ff6450270a ]

decoder will report the colorspace information
which is parsed from the sequence header,
if they are unspecified, just let application to determine it,
don't change it in driver.

Fixes: 6de8d628df6ef ("media: amphion: add v4l2 m2m vpu decoder stateful driver")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: adjust the encoder's value range of gop size</title>
<updated>2022-10-24T07:57:49Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-07-15T07:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50c335d997738b17bb42c6cbc9a5771caabb54d4'/>
<id>urn:sha1:50c335d997738b17bb42c6cbc9a5771caabb54d4</id>
<content type='text'>
[ Upstream commit 996f4e89fabe44ab9ac0aabb0697aeecbe717eca ]

adjust the value range of gop size from [0, 65535] to [1, 8000].
when the gop size is set to a too large value,
it may affect the encoded picture quality.
so constrain it to a reasonable range.

Fixes: 0401e659c1f92 ("media: amphion: add v4l2 m2m vpu encoder stateful driver")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: insert picture startcode after seek for vc1g format</title>
<updated>2022-10-24T07:57:49Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-07-15T07:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96fe4befacef40dd9cc37da4de60c5dda9e13764'/>
<id>urn:sha1:96fe4befacef40dd9cc37da4de60c5dda9e13764</id>
<content type='text'>
[ Upstream commit f7fd6c318c8a5d06bf3fe611f30763d62eaaf7f0 ]

For format vc1, the amphion vpu requires driver to
help insert some custom startcode before sequence and frame.
the startcode is different for vc1l and vc1g format.

But the sequence startcode is only needed at the beginning,
and it's not expected after seek.
driver need to treat the codec header and the first frame after seek
as a normal frame, and insert picture startcode for it.

In previous patch, I just fix it for vc1l format,
and should fix the similar issue for vc1g too.

Fixes: e670f5d672ef (media: amphion: only insert the first sequence startcode for vc1l format)
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: only insert the first sequence startcode for vc1l format</title>
<updated>2022-08-17T13:14:44Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-07-08T08:56:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7496e06d0e6f687e5eb855f6a01039cd0d70886a'/>
<id>urn:sha1:7496e06d0e6f687e5eb855f6a01039cd0d70886a</id>
<content type='text'>
[ Upstream commit e670f5d672ef3d00b0b8c69eff09a019e6dd4ef9 ]

For format V4L2_PIX_FMT_VC1_ANNEX_L,
the amphion vpu requires driver to help insert some custom startcode
before sequence and frame.
but only the first sequence startcode is needed,
the extra startcode will cause decoding error.
So after seek, we don't need to insert the sequence startcode.

In other words, for V4L2_PIX_FMT_VC1_ANNEX_L,
the vpu doesn't support dynamic resolution change.

Fixes: 145e936380edb ("media: amphion: implement malone decoder rpc interface")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: sync buffer status with firmware during abort</title>
<updated>2022-08-17T13:14:44Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-07-01T05:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59dbfddc11aa6713b0a1227a561b2f88ebd6684a'/>
<id>urn:sha1:59dbfddc11aa6713b0a1227a561b2f88ebd6684a</id>
<content type='text'>
[ Upstream commit d8f1eb105eab7aab36323c6b488dda479d5bd2da ]

1. prevent to allocate buffer to firmware during abort
2. release buffer when clear the slots

Fixes: 6de8d628df6ef ("media: amphion: add v4l2 m2m vpu decoder stateful driver")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: defer setting last_buffer_dequeued until resolution changes are processed</title>
<updated>2022-08-17T13:14:44Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-06-28T05:21:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34e14ee5331078659231706e5a7fe89a243c7d23'/>
<id>urn:sha1:34e14ee5331078659231706e5a7fe89a243c7d23</id>
<content type='text'>
[ Upstream commit afba6e20801ad9a2f863c52c21e609e021269d83 ]

Don't set last_buffer_dequeued during dynamic resolution change,
otherwise it may be cleared in handling resolution change,
as streamoff may be called in dynamic resolution change.

Normally, this does not happen.
But we encounter a special testcase,
User issue V4L2_DEC_CMD_STOP after enqueue one buffer
that only contains codec config header, but not any frame data.
So VPU report the parsed resolution, then report the eos event.

So driver should notify user to handle resolution change first,
after it's handled, set the last_buffer_dequeued.
then the user can exit decoding normally.

Otherwise the user may be stalled.

Fixes: 6de8d628df6ef ("media: amphion: add v4l2 m2m vpu decoder stateful driver")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: release core lock before reset vpu core</title>
<updated>2022-08-17T13:14:43Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-06-28T05:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70b148acab7095e577e5594b82a4665c3b51dcac'/>
<id>urn:sha1:70b148acab7095e577e5594b82a4665c3b51dcac</id>
<content type='text'>
[ Upstream commit a621cc4bed97e49f5a8019f5215dec7e208a7c4d ]

In reset vpu core, driver will wait for a response event,
but if there are still some events unhandled,
they will be handled first, driver may acquire core lock for that.
So if we do reset in core lock, it may led to reset timeout.

Fixes: 9f599f351e86a ("media: amphion: add vpu core driver")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: output firmware error message</title>
<updated>2022-08-17T13:14:34Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-06-10T06:26:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08baa39c2a2e5fea68b405fce5752bd00f127388'/>
<id>urn:sha1:08baa39c2a2e5fea68b405fce5752bd00f127388</id>
<content type='text'>
[ Upstream commit 89e3f3fb3d9014efa59ed6bb526d5f1a00168452 ]

Firmware may send the error event with some error message,
and it help locate the firmware error,
so output the error message if it exists

Fixes: 61cbf1c1fa6d7 ("media: amphion: implement vpu core communication based on mailbox")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&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: amphion: return error if format is unsupported by vpu</title>
<updated>2022-08-17T13:14:31Z</updated>
<author>
<name>Ming Qian</name>
</author>
<published>2022-06-09T09:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c33a0d48eb15aee4bb4ce9cf1b1e060dc8f0b8b'/>
<id>urn:sha1:4c33a0d48eb15aee4bb4ce9cf1b1e060dc8f0b8b</id>
<content type='text'>
[ Upstream commit a3a2efca36a3a1ddba229a7be7991e8b5de4ac35 ]

return error if format is unsupported by vpu,
otherwise the vpu will be stalled at decoding

Fixes: 3cd084519c6f9 ("media: amphion: add vpu v4l2 m2m support")
Signed-off-by: Ming Qian &lt;ming.qian@nxp.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
