<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/platform/mtk-jpeg, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-04-05T20:34:35Z</updated>
<entry>
<title>media: mtk-jpeg: Correct return type for mem2mem buffer helpers</title>
<updated>2019-04-05T20:34:35Z</updated>
<author>
<name>Ezequiel Garcia</name>
</author>
<published>2019-02-08T16:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d544b0856f3f88de078066e135fbfb0398fdf7ed'/>
<id>urn:sha1:d544b0856f3f88de078066e135fbfb0398fdf7ed</id>
<content type='text'>
[ Upstream commit 1b275e4e8b70dbff9850874b30831c1bd8d3c504 ]

Fix the assigned type of mem2mem buffer handling API.
Namely, these functions:

 v4l2_m2m_next_buf
 v4l2_m2m_last_buf
 v4l2_m2m_buf_remove
 v4l2_m2m_next_src_buf
 v4l2_m2m_next_dst_buf
 v4l2_m2m_last_src_buf
 v4l2_m2m_last_dst_buf
 v4l2_m2m_src_buf_remove
 v4l2_m2m_dst_buf_remove

return a struct vb2_v4l2_buffer, and not a struct vb2_buffer.

Fixing this is necessary to fix the mem2mem buffer handling API,
changing the return to the correct struct vb2_v4l2_buffer instead
of a void pointer.

Signed-off-by: Ezequiel Garcia &lt;ezequiel@collabora.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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: use strscpy() instead of strlcpy()</title>
<updated>2018-09-11T17:32:17Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2018-09-10T12:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0decac19da3906d9b66291e57b7759489e1170f'/>
<id>urn:sha1:c0decac19da3906d9b66291e57b7759489e1170f</id>
<content type='text'>
The implementation of strscpy() is more robust and safer.

That's now the recommended way to copy NUL terminated strings.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: mem2mem: Make .job_abort optional</title>
<updated>2018-07-24T21:45:08Z</updated>
<author>
<name>Ezequiel Garcia</name>
</author>
<published>2018-06-18T04:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5525b8314389a0c558d15464e86f438974b94e32'/>
<id>urn:sha1:5525b8314389a0c558d15464e86f438974b94e32</id>
<content type='text'>
Implementing job_abort() does not make sense on some drivers.
This is not a problem, as the abort is not required to
wait for the job to finish. Quite the opposite, drivers
are encouraged not to wait.

Demote v4l2_m2m_ops.job_abort from required to optional, and
clean all drivers with dummy implementations.

Signed-off-by: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vcodec: fix ptr_ret.cocci warnings</title>
<updated>2018-05-09T19:58:30Z</updated>
<author>
<name>Fengguang Wu</name>
</author>
<published>2018-04-11T21:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb21cf4eecbd448dd6d9b91274589562467a1b41'/>
<id>urn:sha1:fb21cf4eecbd448dd6d9b91274589562467a1b41</id>
<content type='text'>
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1087:1-3: WARNING: PTR_ERR_OR_ZERO can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 648a9576932a ("media: vcodec: fix error return value from mtk_jpeg_clk_init()")

CC: Ryder Lee &lt;ryder.lee@mediatek.com&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: vcodec: fix error return value from mtk_jpeg_clk_init()</title>
<updated>2018-04-04T10:12:52Z</updated>
<author>
<name>Ryder Lee</name>
</author>
<published>2018-03-23T03:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=648a9576932a26e1c6a157b4c9345204de975957'/>
<id>urn:sha1:648a9576932a26e1c6a157b4c9345204de975957</id>
<content type='text'>
The error return value should be fixed as it may return EPROBE_DEFER.

Cc: Bin Liu &lt;bin.liu@mediatek.com&gt;
Signed-off-by: Ryder Lee &lt;ryder.lee@mediatek.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Acked-by: Rick Chang &lt;rick.chang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>media: vcodec: mediatek: constify v4l2_m2m_ops structures</title>
<updated>2017-08-20T12:03:55Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2017-08-06T08:25:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5003a83139be0d4226717ed1d960234516043c86'/>
<id>urn:sha1:5003a83139be0d4226717ed1d960234516043c86</id>
<content type='text'>
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.

Done with the help of Coccinelle.

// &lt;smpl&gt;
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };

@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&amp;i@p)

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct v4l2_m2m_ops i = { ... };
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Rick Chang &lt;rick.chang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>media: mediatek: constify vb2_ops structure</title>
<updated>2017-07-19T19:10:52Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2017-07-06T20:51:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fda7e347239343349fcce30be723ebf1290f34c9'/>
<id>urn:sha1:fda7e347239343349fcce30be723ebf1290f34c9</id>
<content type='text'>
Check for vb2_ops structures that are only stored in the ops field of a
vb2_queue structure. That field is declared const, so vb2_ops structures
that have this property can be declared as const also.

This issue was detected using Coccinelle and the following semantic patch:

@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };

@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &amp;i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };

Signed-off-by: Gustavo A. R. Silva &lt;garsilva@embeddedor.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] vcodec: mediatek: mark pm functions as __maybe_unused</title>
<updated>2017-04-10T09:43:10Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-03-20T09:47:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51d979c0bb99cb82d597795439eb5d74d280df50'/>
<id>urn:sha1:51d979c0bb99cb82d597795439eb5d74d280df50</id>
<content type='text'>
When CONFIG_PM is disabled, we get a couple of unused functions:

drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:927:13: error: 'mtk_jpeg_clk_off' defined but not used [-Werror=unused-function]
 static void mtk_jpeg_clk_off(struct mtk_jpeg_dev *jpeg)
             ^~~~~~~~~~~~~~~~
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:916:13: error: 'mtk_jpeg_clk_on' defined but not used [-Werror=unused-function]
 static void mtk_jpeg_clk_on(struct mtk_jpeg_dev *jpeg)

Rather than adding more error-prone #ifdefs around those, this patch
removes the existing #ifdef checks and marks the PM functions as __maybe_unused
to let gcc do the right thing.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Rick Chang &lt;rick.chang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] media: mtk-jpeg: fix continuous log "Context is NULL"</title>
<updated>2017-04-05T18:08:26Z</updated>
<author>
<name>Minghsiu Tsai</name>
</author>
<published>2017-03-14T14:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba40be0fa21afd10a66bdfaee37d3ebcd9187c05'/>
<id>urn:sha1:ba40be0fa21afd10a66bdfaee37d3ebcd9187c05</id>
<content type='text'>
The symptom is continuous log "mtk-jpeg 18004000.jpegdec: Context is NULL"
in kernel log. It is because the error handling in irq doesn't clear
interrupt.

The calling flow like as below when issue happen
mtk_jpeg_device_run()
mtk_jpeg_job_abort()
  v4l2_m2m_job_finish() -&gt; m2m_dev-&gt;curr_ctx = NULL;
mtk_jpeg_dec_irq()
  v4l2_m2m_get_curr_priv()
     -&gt; m2m_dev-&gt;curr_ctx == NULL
     -&gt; return NULL
log "Context is NULL"

There is race condition between job_abort() and irq. In order to simplify
code, don't want to add extra flag to maintain state, empty job_abort() and
clear interrupt before v4l2_m2m_get_curr_priv() in irq.

Signed-off-by: Minghsiu Tsai &lt;minghsiu.tsai@mediatek.com&gt;
Acked-by: Rick Chang &lt;rick.chang@mediatek.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
<entry>
<title>[media] vcodec: mediatek: fix platform_no_drv_owner.cocci warnings</title>
<updated>2017-03-22T14:37:07Z</updated>
<author>
<name>Fengguang Wu</name>
</author>
<published>2017-03-08T20:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7423b72639e51ab83ed0dd268b65b6fdde07496'/>
<id>urn:sha1:c7423b72639e51ab83ed0dd268b65b6fdde07496</id>
<content type='text'>
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1296:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Rick Chang &lt;rick.chang@mediatek.com&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
</content>
</entry>
</feed>
