<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/test-drivers, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-04-12T07:46:06Z</updated>
<entry>
<title>media: Zero-initialize all structures passed to subdev pad operations</title>
<updated>2023-04-12T07:46:06Z</updated>
<author>
<name>Laurent Pinchart</name>
</author>
<published>2023-02-15T15:18:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecefa105cc44fff6d170ac5f441e76cb229f8e19'/>
<id>urn:sha1:ecefa105cc44fff6d170ac5f441e76cb229f8e19</id>
<content type='text'>
Several drivers call subdev pad operations, passing structures that are
not fully zeroed. While the drivers initialize the fields they care
about explicitly, this results in reserved fields having uninitialized
values. Future kernel API changes that make use of those fields thus
risk breaking proper driver operation in ways that could be hard to
detect.

To avoid this, make the code more robust by zero-initializing all the
structures passed to subdev pad operation. Maintain a consistent coding
style by preferring designated initializers (which zero-initialize all
the fields that are not specified) over memset() where possible, and
make variable declarations local to inner scopes where applicable. One
notable exception to this rule is in the ipu3 driver, where a memset()
is needed as the structure is not a local variable but a function
parameter provided by the caller.

Not all fields of those structures can be initialized when declaring the
variables, as the values for those fields are computed later in the
code. Initialize the 'which' field in all cases, and other fields when
the variable declaration is so close to the v4l2_subdev_call() call that
it keeps all the context easily visible when reading the code, to avoid
hindering readability.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt; # For vimc
Reviewed-by: Lad Prabhakar &lt;prabhakar.csengg@gmail.com&gt; # For am437x
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham+renesas@ideasonboard.com&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt; # For drivers/staging/media/imx/
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vivid-core: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:21Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:32:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc63c5b12a7d1f4bd6c78a2133691dc370930434'/>
<id>urn:sha1:fc63c5b12a7d1f4bd6c78a2133691dc370930434</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: visl-core: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:21Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:32:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1727b7164705c09553f1213217501eaf8fbad9ad'/>
<id>urn:sha1:1727b7164705c09553f1213217501eaf8fbad9ad</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vimc-core: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:21Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19136807ad6931f2a3bc92dc9aa3deb29024b0c3'/>
<id>urn:sha1:19136807ad6931f2a3bc92dc9aa3deb29024b0c3</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vim2m: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:21Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:32:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4e1d46f632a94d2a66c0d9f78fd833b1c25c11a'/>
<id>urn:sha1:a4e1d46f632a94d2a66c0d9f78fd833b1c25c11a</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vidtv_bridge: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:21Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:32:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8b615b530a228feb81a0e91e16ffcf60102ebff'/>
<id>urn:sha1:b8b615b530a228feb81a0e91e16ffcf60102ebff</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vicodec-core: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:21Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:32:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3675a017f236a7ffa37c63b0f314167d18287d7'/>
<id>urn:sha1:f3675a017f236a7ffa37c63b0f314167d18287d7</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vivid: drop bitmap and clipping output overlay support</title>
<updated>2023-03-19T23:30:27Z</updated>
<author>
<name>Hans Verkuil</name>
</author>
<published>2023-03-02T12:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e19bfc8ab175ce1a5251d2b580b19add8a8f1fd'/>
<id>urn:sha1:2e19bfc8ab175ce1a5251d2b580b19add8a8f1fd</id>
<content type='text'>
This test driver is the only remaining driver still using
the clipping and bitmap method. Drop support for this so
we can remove this in the V4L2 API as well.

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: vivid: drop overlay support</title>
<updated>2023-03-19T23:29:46Z</updated>
<author>
<name>Hans Verkuil</name>
</author>
<published>2023-03-02T12:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ccaa9d50ca73d136accbf66798c04fb25ca44bd5'/>
<id>urn:sha1:ccaa9d50ca73d136accbf66798c04fb25ca44bd5</id>
<content type='text'>
Destructive overlay support (i.e. where the video frame is DMA-ed
straight into a framebuffer) is effectively dead. It was a
necessary evil in the early days when computers were not fast enough
to copy SDTV video frames around, but today that's no longer a problem.

It requires access to the framebuffer memory, which is a bad idea and
very hard to do safely. In addition, in drm it is today almost
impossible to get hold of the framebuffer address.

So drop support for this.

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: visl: make visl_qops static</title>
<updated>2023-02-08T07:29:53Z</updated>
<author>
<name>Hans Verkuil</name>
</author>
<published>2023-01-26T11:58:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b6a1af0362b3232c7b474b9b46e49b862602018c'/>
<id>urn:sha1:b6a1af0362b3232c7b474b9b46e49b862602018c</id>
<content type='text'>
This struct can be static. This fixes a sparse warning:

visl-video.c:690:22: warning: symbol 'visl_qops' was not declared. Should it be static?

Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Cc: Daniel Almeida &lt;daniel.almeida@collabora.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
</feed>
