30 Jan, 2021
2 commits
-
Add a new member jpeg_parse_error in mxc_jpeg_src_buf, to indicate
an error while parsing the input jpeg stream.
Do not run the decoder when the source buffer is marked with
jpeg_parse_error, instead mark both the source and destination
buffer with VB2_BUF_STATE_ERROR. This will prevent an application
getting stuck waiting to dequeue the destination buffer.Signed-off-by: Mirela Rabulea
-
End of buffer was not properly detected in case of an invalid
buffer stream, such as a stream of null bytes, for example.
This was leading to a kernel oups.
Let get_byte return type be int, so it can return an error for
reaching end of stream.While at it, replace 0 with NULL, for null pointer initialization.
Fixes: 36649dec0eb7 ("mxc-jpeg: Fix result independent of operands")
Signed-off-by: Mirela Rabulea
22 Jan, 2021
1 commit
-
Remove less-than-zero comparison of an unsigned value
Signed-off-by: Sandor Yu
Reviewed-by: Robby Cai
20 Jan, 2021
1 commit
-
This is the 5.10.5 stable release
* tag 'v5.10.5': (63 commits)
Linux 5.10.5
device-dax: Fix range release
ext4: avoid s_mb_prefetch to be zero in individual scenarios
...Signed-off-by: Jason Liu
06 Jan, 2021
1 commit
-
commit d0ac1a26ed5943127cb0156148735f5f52a07075 upstream.
As reported on:
https://lore.kernel.org/linux-media/20190627222020.45909-1-willemdebruijn.kernel@gmail.com/if gp8psk_usb_in_op() returns an error, the status var is not
initialized. Yet, this var is used later on, in order to
identify:
- if the device was already started;
- if firmware has loaded;
- if the LNBf was powered on.Using status = 0 seems to ensure that everything will be
properly powered up.So, instead of the proposed solution, let's just set
status = 0.Reported-by: syzbot
Reported-by: Willem de Bruijn
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman
04 Jan, 2021
2 commits
-
This is the 5.10.4 stable release
* tag 'v5.10.4': (717 commits)
Linux 5.10.4
x86/CPU/AMD: Save AMD NodeId as cpu_die_id
drm/edid: fix objtool warning in drm_cvt_modes()
...Signed-off-by: Jason Liu
Conflicts:
drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/media/i2c/ov5640.c -
This is the 5.10.3 stable release
* tag 'v5.10.3': (41 commits)
Linux 5.10.3
md: fix a warning caused by a race between concurrent md_ioctl()s
nl80211: validate key indexes for cfg80211_registered_device
...Signed-off-by: Jason Liu
30 Dec, 2020
29 commits
-
commit 219a8b9c04e54872f9a4d566633fb42f08bcbe2a upstream.
The ipu3-cio2 doesn't make use of the field and this is reflected in V4L2
buffers as well as the try format. Do this in active format, too.Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Signed-off-by: Sakari Ailus
Reviewed-by: Bingbu Cao
Reviewed-by: Andy Shevchenko
Reviewed-by: Laurent Pinchart
Cc: stable@vger.kernel.org # v4.16 and up
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit a86cf9b29e8b12811cf53c4970eefe0c1d290476 upstream.
Validate media bus code, width and height when setting the subdev format.
This effectively reworks how setting subdev format is implemented in the
driver.Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Signed-off-by: Sakari Ailus
Reviewed-by: Andy Shevchenko
Reviewed-by: Laurent Pinchart
Cc: stable@vger.kernel.org # v4.16 and up
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit 55a6c6b2be3d6670bf5772364d8208bd8dc17da4 upstream.
Pad format can be accessed from user space. Serialise access to it.
Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Signed-off-by: Sakari Ailus
Reviewed-by: Laurent Pinchart
Reviewed-by: Bingbu Cao
Reviewed-by: Andy Shevchenko
Cc: stable@vger.kernel.org # v4.16 and up
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit 8160e86702e0807bd36d40f82648f9f9820b9d5a upstream.
Return actual subdev format on ipu3-cio2 subdev pads. The earlier
implementation was based on an infinite recursion that exhausted the
stack.Reported-by: Tsuchiya Yuto
Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Signed-off-by: Sakari Ailus
Reviewed-by: Laurent Pinchart
Reviewed-by: Bingbu Cao
Reviewed-by: Andy Shevchenko
Cc: stable@vger.kernel.org # v4.16 and up
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit 61e7f892b5ee1dd10ea8bff805f3c3fe6e535959 upstream.
If starting a video buffer queue fails, the buffers are returned to
videobuf2. Remove the reference to the buffer from the driver's queue as
well.Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Signed-off-by: Sakari Ailus
Cc: stable@vger.kernel.org # v4.16 and up
Reviewed-by: Andy Shevchenko
Reviewed-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit e297ddf296de35037fa97f4302782def196d350a upstream.
If the call to spi_register_master() fails on probe of the NetUP
Universal DVB driver, the spi_master struct is erroneously not freed.Likewise, if spi_new_device() fails, the spi_controller struct is
not unregistered. Plug the leaks.While at it, fix an ordering issue in netup_spi_release() wherein
spi_unregister_master() is called after fiddling with the IRQ control
register. The correct order is to call spi_unregister_master() *before*
this teardown step because bus accesses may still be ongoing until that
function returns.Fixes: 52b1eaf4c59a ("[media] netup_unidvb: NetUP Universal DVB-S/S2/T/T2/C PCI-E card driver")
Signed-off-by: Lukas Wunner
Reviewed-by: Mauro Carvalho Chehab
Cc: # v4.3+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation
Cc: # v4.3+
Cc: Kozlov Sergey
Link: https://lore.kernel.org/r/c4c24f333fc7840f4a3db24789e6e10dd660bede.1607286887.git.lukas@wunner.de
Signed-off-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
commit 3f56df4c8ffeb120ed41906d3aae71799b7e726a upstream.
If a user holds a button down on a remote, then no ir idle interrupt will
be generated until the user releases the button, depending on how quickly
the remote repeats. No IR is processed until that point, which means that
holding down a button may not do anything.This also resolves an issue on a Cubieboard 1 where the IR receiver is
picking up ambient infrared as IR and spews out endless
"rc rc0: IR event FIFO is full!" messages unless you choose to live in
the dark.Cc: stable@vger.kernel.org
Tested-by: Hans Verkuil
Acked-by: Maxime Ripard
Reported-by: Hans Verkuil
Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
commit e469d0b09a19496e1972a20974bbf55b728151eb upstream.
The gspca driver leaks memory when a probe fails. gspca_dev_probe2()
calls v4l2_device_register(), which takes a reference to the
underlying device node (in this case, a USB interface). But the
failure pathway neglects to call v4l2_device_unregister(), the routine
responsible for dropping this reference. Consequently the memory for
the USB interface and its device never gets released.This patch adds the missing function call.
Reported-and-tested-by: syzbot+44e64397bd81d5e84cba@syzkaller.appspotmail.com
Signed-off-by: Alan Stern
CC:
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman -
[ Upstream commit 8e4d86e241cf035d6d3467cd346e7ce490681937 ]
The "a->index" value comes from the user via the ioctl. The problem is
that the shift can wrap resulting in setting "mxb->cur_audinput" to an
invalid value, which later results in an array overflow.Fixes: 6680427791c9 ("[media] mxb: fix audio handling")
Signed-off-by: Dan Carpenter
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit eb08c48132a1f594478ab9fa2b6ee646c3513a49 ]
If of_graph_get_endpoint_by_regs() return NULL, it will return 0 rather
than an errno, because we doesn't initialize the return value.Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support")
Reported-by: Hulk Robot
Signed-off-by: Zhang Xiaoxu
Reviewed-by: Marco Felsch
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 1ed36ecd1459b653cced8929bfb37dba94b64c5d ]
To comply with the intended usage of the V4L2 selection target when
used to retrieve a sensor image properties, adjust the rectangles
returned by the imx219 driver.The top/left crop coordinates of the TGT_CROP rectangle were set to
(0, 0) instead of (8, 8) which is the offset from the larger physical
pixel array rectangle. This was also a mismatch with the default values
crop rectangle value, so this is corrected. Found with v4l2-compliance.While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and
CROP_BOUNDS have the same size as the non-active pixels are not readable
using the selection API. Found with v4l2-compliance.[reword commit message, use macros for pixel offsets]
Fixes: e6d4ef7d58aa7 ("media: i2c: imx219: Implement get_selection")
Signed-off-by: Hans Verkuil
Signed-off-by: Jacopo Mondi
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 7fe1d4453fb6bf103d668a19d957a7b2fc21887c ]
The MAX9271 GPIO1 line that controls the sensor reset is by default
enabled after a serializer chip reset.As rdacm20 does not go through an explicit serializer reset, make sure
GPIO1 is enabled to make the camera module driver more robust.Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver")
Signed-off-by: Jacopo Mondi
Reviewed-by: Kieran Bingham
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 909a0a189c677307edd461e21fd962784370d27f ]
Fix GPIO enable/disable operations which wrongly read the 0x0f register
to obtain the current mask of the enabled lines instead of using
the correct 0x0e register.Also fix access to bit 0 of the register which is marked as reserved.
Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver")
Signed-off-by: Jacopo Mondi
Reviewed-by: Geert Uytterhoeven
Reviewed-by: Kieran Bingham
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 9b1b0cb0636166187478ef68d5b95f5caea062ec ]
This is supposed to return negative error codes but the type is bool so
it returns true instead.Fixes: b47b79d8a231 ("[media] media: i2c: max2175: Add MAX2175 support")
Signed-off-by: Dan Carpenter
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit eeb76afbe8d91e112396c6281cd020725160f006 ]
Stop video streaming when requested.
When s_stream is called to stop the video streaming, if/else condition calls
start_streaming function instead of the one for stopping it.Fixes: 436190596241 ("media: imx214: Add imx214 camera sensor driver")
Signed-off-by: Daniel Gomez
Signed-off-by: Ricardo Ribalda
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit abf287eeff4c6da6aa804bbd429dfd9d0dfb6ea7 ]
When dvb_create_media_graph fails, the debugfs kept inside client should
be released. However, the current implementation does not release them.Fix this by adding a new goto label to call smsdvb_debugfs_release.
Fixes: 0d3ab8410dcb ("[media] dvb core: must check dvb_create_media_graph()")
Signed-off-by: Keita Suzuki
Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit dcdff74fa6bc00c32079d0bebd620764c26f2d89 ]
Fix to goto snd_error in error handling case when fails
to do snd_ctl_add, as done elsewhere in this function.Fixes: 28cae868cd24 ("[media] solo6x10: move out of staging into drivers/media/pci.")
Reported-by: Hulk Robot
Signed-off-by: Qinglang Miao
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit eff5ce02e170125936c43ca96c7dc701a86681ed ]
As per current implementation, video driver is unvoting "videom-mem" path
for last video session during vdec_session_release().
While video playback when we try to suspend device, we see video clock
warnings since votes are already removed during vdec_session_release().corrected this by putting dummy vote on "video-mem" after last video
session release and unvoting it during suspend.suspend")
Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
Signed-off-by: Mansur Alisha Shaik
Reviewed-by: Stephen Boyd
Signed-off-by: Stanimir Varbanov
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit e44fb034b03231cd117d6db73fb8048deab6ea41 ]
As per bandwidth table video driver is voting with average bandwidth
for "video-mem" and "cpu-cfg" paths as peak bandwidth is zero
in bandwidth table.suspend")
Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
Signed-off-by: Mansur Alisha Shaik
Reviewed-by: Stephen Boyd
Signed-off-by: Stanimir Varbanov
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 9e8efdb5787986cc0d0134925cf5c4f001bb3f2e ]
Currently video driver is voting for venus0-ebi path during buffer
processing with an average bandwidth of all the instances and
unvoting during session release.While video streaming when we try to do XO-SD using the command
"echo mem > /sys/power/state command" , device is not entering
to suspend state and from interconnect summary seeing votes for venus0-ebiCorrected this by voting for venus0-ebi path in venus_runtime_resume()
and unvote during venus_runtime_suspend().suspend")
Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
Signed-off-by: Mansur Alisha Shaik
Reviewed-by: Stephen Boyd
Signed-off-by: Stanimir Varbanov
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 21926d466e3a4f35c2536244d1d56512cc81a0a9 ]
Currently video driver is voting after clk enable and un voting
before clk disable. This is incorrect, video driver should vote
before clk enable and unvote after clk disable.Corrected this by changing the order of clk enable and clk disable.
suspend")
Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
Signed-off-by: Mansur Alisha Shaik
Reviewed-by: Stephen Boyd
Signed-off-by: Stanimir Varbanov
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 0d72f489995bb8565f6fe30539d4504c88356a9e ]
if mtk_jpeg_clk_init() succeed, mtk_jpeg_probe() and mtk_jpeg_remove()
doesn't have a corresponding put_device(). Thus add a new helper
mtk_jpeg_clk_release() to fix it.Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver")
Signed-off-by: Yu Kuai
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 68579b32e786f9680e7c6b6c7d17e26943bb02b3 ]
Fix PCLK polarity not being taken into account.
Add comments about BT656 register control.
Remove useless ov5640_set_stream_bt656() function.
Refine comments about MIPI IO register control.Fixes: 4039b03720f7 ("media: i2c: ov5640: Add support for BT656 mode")
Signed-off-by: Hugues Fruchet
Reviewed-by: Jacopo Mondi
Tested-by: Lad Prabhakar
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 69baf338fc16a4d55c78da8874ce3f06feb38c78 ]
Return -EINVAL if invalid bus-type is detected while parsing endpoints.
Fixes: 26c1126c9b56 ("media: v4l: fwnode: Use media bus type for bus parser selection")
Signed-off-by: Lad Prabhakar
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 4affafd7bec7c65da31777f18bd20420f1aeb5f8 ]
if of_find_device_by_node() succeed, mtk_vcodec_init_enc_pm() doesn't have
a corresponding put_device(). Thus add jump target to fix the exception
handling for this function implementation.Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver")
Signed-off-by: Yu Kuai
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 27c3943683f74e35e1d390ceb2e3639eff616ad6 ]
mtk_vcodec_release_dec_pm() will be called in two places:
a. mtk_vcodec_init_dec_pm() succeed while mtk_vcodec_probe() return error.
b. mtk_vcodec_dec_remove().In both cases put_device() call is needed, since of_find_device_by_node()
was called in mtk_vcodec_init_dec_pm() previously.Thus add put_devices() call in mtk_vcodec_release_dec_pm()
Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver")
Signed-off-by: Yu Kuai
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit 5d4fa2c50125c9cda9e380d89268757cc5fa743d ]
if of_find_device_by_node() succeed, mtk_vcodec_init_dec_pm() doesn't have
a corresponding put_device(). Thus add jump target to fix the exception
handling for this function implementation.Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver")
Signed-off-by: Yu Kuai
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit f28a81a3b64270da3588174feff4628c36e0ff4e ]
if of_find_device_by_node() succeeds, mtk_jpeg_clk_init() doesn't have
a corresponding put_device(). Thus add put_device() to fix the exception
handling for this function implementation.Fixes: 648372a87cee ("media: platform: Change the call functions of getting/enable/disable the jpeg's clock")
Signed-off-by: Yu Kuai
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin -
[ Upstream commit a08ad6339e0441ca12533969ed94a87e3655426e ]
The are two instances of sizeof() being used incorrectly. The
sizeof(void *) is incorrect because urb_buffer is a char ** pointer,
fix this by using sizeof(*dev->urb_buffer). The sizeof(dma_addr_t *)
is incorrect, it should be sizeof(*dev->urb_dma), which is a dma_addr_t
and not a dma_addr_t *. This errors did not cause any issues because
it just so happens the sizes are the same.Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")
Fixes: 16427faf2867 ("[media] tm6000: Add parameter to keep urb bufs allocated")
Signed-off-by: Colin Ian King
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin
26 Dec, 2020
1 commit
-
commit 9c60cc797cf72e95bb39f32316e9f0e5f85435f9 upstream.
SPI bus number must be assigned dynamically for each device, otherwise it
will crash when multiple devices are plugged to system.Reported-and-tested-by: syzbot+c60ddb60b685777d9d59@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Antti Palosaari
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman
18 Dec, 2020
3 commits
-
* pxp/next: (8 commits)
LF-1596 dma: pxp: add checking for out against NULL
LF-1595 dma: pxp: fix the typo for possible_inputs_s1 checking
LF-1594 dma: pxp: fix out-of-bounds access
LF-1162-19 media: mxc: pxp_v4l2: change to use VFL_TYPE_VIDEO
LF-105-1 dmaengine: pxp: fix build warning of fall through
... -
* mxc/next: (279 commits)
LF-2111-2: mxc: vpu_windsor: Avoid hide parameter
MLK-24960: [8QM_MEK/8QXP_MEK]mxc:vpu_malone: move timestamp manager to firmware
MLK-24959: [8QM_MEK/8QXP_MEK]mxc:vpu_windsor: move timestamp handler to firmware
MLK-24906: [8QM_MEK/8QXP_MEK]mxc:vpu_malone: report V4L2_COLORSPACE_DEFAULT before seq hdr found
MLK-24593:[8QM_MEK/8QXP_MEK]mxc:vpu_windsor: support change bitrate dynamically
... -
* capture/next: (165 commits)
LF-2976 media: adv7180: fix not work by "ERROR: v4l2 capture: slave not found!"
MLK-24081: hdmirx: fix build error in LF branch
MLK-24081-06: staging: media: imx: Add hdmi rx driver
MLK-24081-04: staging: media: imx_csi: support hdmi rx for imx8qm
MLK-24081-04: staging: media: imx_csi: support hdmi rx for imx8qm
...