Commit Graph

1105656 Commits

Author SHA1 Message Date
Marek Vasut
76a48e755f media: docs: Fix VIVIOC typo
Replace VIVIOC_ with VIDIOC_ , trivial typo fix.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 14:50:33 +01:00
Marek Vasut
6811c98ca2 media: v4l2-ctrls: Fix missing newline in examples
Replace supportedn with supported\n , i.e. add the missing backslash.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 14:49:19 +01:00
AngeloGioacchino Del Regno
ab14c99c03 media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment
The mdp_ipi_comm structure defines a command that is either
PROCESS (start processing) or DEINIT (destroy instance); we
are using this one to send PROCESS or DEINIT commands from Linux
to an MDP instance through a VPU write but, while the first wants
us to stay 4-bytes aligned, the VPU instead requires an 8-bytes
data alignment.

Keeping in mind that these commands are executed immediately
after sending them (hence not chained with others before the
VPU/MDP "actually" start executing), it is fine to simply add
a padding of 4 bytes to this structure: this keeps the same
performance as before, as we're still stack-allocating it,
while avoiding hackery inside of mtk-vpu to ensure alignment
bringing a definitely bigger performance impact.

Fixes: c8eb2d7e82 ("[media] media: Add Mediatek MDP Driver")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Houlong Wei <houlong.wei@mediatek.com>
Reviewed-by: Irui Wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 14:48:35 +01:00
Jiang Jian
b813aa3dc6 media: pvrusb2: drop unexpected word 'a' in comments
there is an unexpected word 'a' in the comments that need to be dropped

file - drivers/media/usb/pvrusb2/pvrusb2-hdw.c
line - 5044

But now it's a a chicken and egg problem...) */

changed to:

But now it's a chicken and egg problem...) */

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 14:47:21 +01:00
Jiang Jian
1a2a24d9b9 media: ti: drop unexpected word 'a' in comments
there is an unexpected word 'a' in the comments that need to be dropped

file - drivers/media/platform/ti/cal/cal-camerarx.c
line - 308

 * DRA80xM TRMs have a a slightly simplified sequence.

changed to:

 * DRA80xM TRMs have a slightly simplified sequence.

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 14:47:00 +01:00
Jiang Jian
9e535e6c49 media: gspca: drop unexpected word 'is' in the comments
there is an unexpected word 'is' in the comments that need to be dropped

file - drivers/media/usb/gspca/spca501.c
line - 491

* This is is for the 3com HomeConnect Lite which is spca501a based.

changed to:

* This is for the 3com HomeConnect Lite which is spca501a based.

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 14:46:08 +01:00
Jiang Jian
c1601ea9a6 media: cx18: Fix typo in comments
Remove the repeated word 'and' from comments

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 14:45:24 +01:00
Wan Jiabing
6abcf98eec media: c8sectpfe: Remove unneeded NULL check before clk_disable_unprepare
clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL.
Remove unneeded NULL check for fei->c8sectpfeclk.

Link: https://lore.kernel.org/linux-media/20220516131254.13816-1-wanjiabing@vivo.com
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 12:05:01 +01:00
Andy Shevchenko
64e46b637b media: c8sectpfe: Clean up handling of *_buffer_aligned
There are a few cases where code is harder than needed to read.
Improve those by:
- dropping unnecessary castings (see note below)
- use PTR_ALING() to be more explicit on what's going on there
- use proper definitions instead of hard coded values

Note, dropping castings will allow to perform an additional check
that type is not changed from void * to something else, e.g. u64,
which may very well break the bitmap APIs.

Link: https://lore.kernel.org/linux-media/20220209182521.55632-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 12:02:24 +01:00
Vikash Garodia
c0ab2901fc media: venus: hfi_platform: Correct supported codecs for sc7280
VP8 codec is deprecated for sc7280 SOC. Fix in platform layer to
update the supported codecs accordingly.

Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Tested-by: Fritz Koenig<frkoenig@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-07 09:21:08 +01:00
Dikshita Agarwal
748b080f21 media: venus: Add support for SSR trigger using fault injection
Here we introduce a new fault injection for SSR trigger.

To trigger the SSR:
 echo 100 >  /sys/kernel/debug/venus/fail_ssr/probability
 echo 1 >  /sys/kernel/debug/venus/fail_ssr/times

Co-developed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-07 09:20:15 +01:00
Randy Dunlap
81e005842d media: isl7998x: select V4L2_FWNODE to fix build error
Fix build error when VIDEO_ISL7998X=y and V4L2_FWNODE=m
by selecting V4L2_FWNODE.

microblaze-linux-ld: drivers/media/i2c/isl7998x.o: in function `isl7998x_probe':
(.text+0x8f4): undefined reference to `v4l2_fwnode_endpoint_parse'

Cc: stable@vger.kernel.org # 5.18 and above
Fixes: 51ef2be546 ("media: i2c: isl7998x: Add driver for Intersil ISL7998x")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-05 10:59:14 +01:00
Hirokazu Honda
d8e8aa866e media: mediatek: vcodec: Report supported bitrate modes
The media driver supports constant bitrate mode only.
The supported rate control mode is reported through querymenu() and
s_ctrl() fails if non constant bitrate mode (e.g. VBR) is requested.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Irui Wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:31:41 +01:00
Jiang Jian
c2cc2aa1d0 media: av7110: Remove duplicate 'with' in two places.
file: ./drivers/staging/media/av7110/av7110.c
line: 2367
         * reset with with MASK_31 to MC1
changed to
         * reset with MASK_31 to MC1

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:31:18 +01:00
Jiang Jian
4502aae07b media: saa7164: Remove duplicate 'on' in two places.
file: drivers/media/pci/saa7164/saa7164-api.c
line: 804
/* Assumption: Hauppauge eeprom is at 0xa0 on on bus 0 */
changed to
/* Assumption: Hauppauge eeprom is at 0xa0 on bus 0 */

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:30:00 +01:00
Yunfei Dong
083f54a7c9 media: mediatek: vcodec: Fix non subdev architecture open power fail
According to subdev_bitmap bit value to open hardware power, need to
set subdev_bitmap value for non subdev architecture.

Fixes: c05bada35f ("media: mtk-vcodec: Add to support multi hardware decode")
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:28:35 +01:00
Jiang Jian
65c3e8e9c7 media: usb: gspca: aligned '*' each line
Consider "*" alignment in comments

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:25:40 +01:00
Miaoqian Lin
e0b212ec9d media: tw686x: Fix memory leak in tw686x_video_init
video_device_alloc() allocates memory for vdev,
when video_register_device() fails, it doesn't release the memory and
leads to memory leak, call video_device_release() to fix this.

Fixes: 704a84ccdb ("[media] media: Support Intersil/Techwell TW686x-based video capture cards")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:24:45 +01:00
Jian Zhang
5b304046a8 media: driver/nxp/imx-jpeg: fix a unexpected return value problem
In function mxc_jpeg_probe(), when devm_clk_get() fail, the return value
will be unexpected, and it should be the devm_clk_get's error code.

Fixes: 4c2e5156d9 ("media: imx-jpeg: Add pm-runtime support for imx-jpeg")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jian Zhang <zhangjian210@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:23:34 +01:00
Yunfei Dong
a340c85c4e media: MAINTAINERS: add Yunfei Dong as mediatek vcodec driver maintainer
I have been working on mediatek driver development for a very long time,
and sent many patches to change the driver architecture. Add myself as
co-maintainer for mediatek vcodec driver.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:16:48 +01:00
Chen-Yu Tsai
e13ca460e2 media: mediatek: vcodec: Skip SOURCE_CHANGE & EOS events for stateless
The stateless decoder API does not specify the usage of SOURCE_CHANGE
and EOF events. These events are used by stateful decoders to signal
changes in the bitstream. They do not make sense for stateless decoders.

Do not handle subscription for these two types of events for stateless
decoder instances. This fixes the last v4l2-compliance error:

Control ioctls:
		fail: v4l2-test-controls.cpp(946): have_source_change || have_eos
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL

Fixes: 8cdc3794b2 ("media: mtk-vcodec: vdec: support stateless API")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:16:29 +01:00
Christophe JAILLET
978bbc392c media: tw686x: Fix an error handling path in tw686x_probe()
The commit in Fixes: is incomplete. It has moved some code in the probe but
not all error handling paths have been updated.

Now, if request_irq() fails, we must release some resources.

Fixes: c8946454ed96 ("media: tw686x: Register the irq at the end of probe")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:16:05 +01:00
Marek Vasut
e5833b56f7 media: stm32: dcmi: Drop always NULL sd_state from dcmi_pipeline_s_fmt()
The second argument is always NULL, stop passing it to the function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alain Volmat <alain.volmat@foss.st.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Cc: Hugues FRUCHET <hugues.fruchet@foss.st.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Philippe CORNU <philippe.cornu@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:15:37 +01:00
Marek Vasut
90f8cb5154 media: stm32: dcmi: Fill in remaining Bayer formats
Fill in 10, 12, 14 bit Bayer formats into the DCMI driver.
Those are useful e.g. when MT9P006 sensor is connected.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alain Volmat <alain.volmat@foss.st.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Cc: Hugues FRUCHET <hugues.fruchet@foss.st.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Philippe CORNU <philippe.cornu@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:15:07 +01:00
Yunfei Dong
faddaa735c media: mediatek: vcodec: Initialize decoder parameters after getting dec_capability
Need to get dec_capability from scp first, then initialize decoder
supported format and other parameters according to dec_capability value.

Fixes: fd00d90330 ("media: mtk-vcodec: vdec: move stateful ops into their own file")
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:14:34 +01:00
Zhang Zekun
3e52be9bc5 media: rkvdec:Remove redundant memset
As dma_alloc_coherent() will return a zeroed buffer, we
don't need to memset the returned buffer.
priv_tbl = dma_alloc_coherent() and count_tbl = dma_alloc_coherent()
should be enough.

-see commit 750afb08ca ("cross-tree: phase out dma_zalloc_coherent()")

Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:13:03 +01:00
Eugen Hristev
aa63c5eaf7 media: atmel: atmel-isc-base: allow wb ctrls to be changed when isc is not configured
When attempting to change the white balance (WB) ctrls before starting
streaming, e.g.:

 # v4l2-ctl -L

User Controls
..
            blue_component_gain 0x009819c1 (int)    : min=0 max=8191 step=1 default=512 value=512 flags=slider
..
 # v4l2-ctl --set-ctrl=blue_component_gain=500
 # v4l2-ctl -L
..
            blue_component_gain 0x009819c1 (int)    : min=0 max=8191 step=1 default=512 value=500 flags=slider
..

These will not be written to the internal data struct and will not be
written to the WB hardware module.
Thus, after starting streaming, they will be reset to default:

 # v4l2-ctl -L
..
            blue_component_gain 0x009819c1 (int)    : min=0 max=8191 step=1 default=512 value=512 flags=slider
..

It does not make much sense to not be able to configure the WB controls
at all times. Even if the sensor would not be RAW Bayer (and in this case the
WB module is unavailable), the user could configure the ISC itself, as the
ISC should not care about the sensor format.
Thus, when WB module is available (if the sensor changes format e.g.) it will
be already configured as be user's desires.
In consequence, remove the check in isc_s_awb_ctrl that will return if ISC
does not know the sensor format.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:12:40 +01:00
Arnd Bergmann
a157802359 media: sta2x11: remove VIRT_TO_BUS dependency
This driver does not use the virt_to_bus() function, though it
depends on x86 specific fixups in the swiotlb code, which was
last rewritten in commit e380a0394c ("x86/PCI: sta2x11: use
default DMA address translation").

It is possible that the driver still fails to build on some
architectures that are missing CONFIG_VIRT_TO_BUS, but it is
always set on x86 machines with the STA2X11 platform enabled.

More likely though is that it was never meant to depend on
CONFIG_VIRT_TO_BUS, and the Kconfig dependency was kept from
an out-of-tree version when the driver was originally merged.

Fixes: efeb98b4e2 ("[media] STA2X11 VIP: new V4L2 driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:12:14 +01:00
Justin Green
f5caaa47f5 media: mediatek: vcodec: return EINVAL if plane is too small
Modify vb2ops_vdec_buf_prepare to return EINVAL if the size of the plane
is less than the size of the image. Currently we just log an error and
return 0 anyway, which may cause a buffer overrun bug.

Signed-off-by: Justin Green <greenjustin@chromium.org>
Suggested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:11:12 +01:00
Ming Qian
d4de27a9b1 media: v4l2-mem2mem: prevent pollerr when last_buffer_dequeued is set
If the last buffer was dequeued from the capture queue,
signal userspace. DQBUF(CAPTURE) will return -EPIPE.

But if output queue is empty and capture queue is empty,
v4l2_m2m_poll_for_data will return EPOLLERR,
This is very easy to happen in drain.

When last_buffer_dequeued is set, we shouldn't return EPOLLERR,
but return EPOLLIN | EPOLLRDNORM.

Fixes: 1698a7f151 ("media: v4l2-mem2mem: simplify poll logic")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:10:36 +01:00
Yang Li
38c771014c media: mediatek: vcodec: remove unneeded semicolon
Eliminate the following coccicheck warning:
./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c:71:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:06:35 +01:00
Niels Dossche
359c27c6dd media: hdpvr: fix error value returns in hdpvr_read
Error return values are supposed to be negative in hdpvr_read. Most
error returns are currently handled via an unsigned integer "ret". When
setting a negative error value to "ret", the value actually becomes a
large positive value, because "ret" is unsigned. Later on, the "ret"
value is returned. But as ssize_t is a 64-bit signed number, the error
return value stays a large positive integer instead of a negative
integer. This can cause an error value to be interpreted as the read
size, which can cause a buffer overread for applications relying on the
returned size.

Fixes: 9aba42efe8 ("V4L/DVB (11096): V4L2 Driver for the Hauppauge HD PVR usb capture device")
Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:02:50 +01:00
Guo Zhengkui
63249a5cab media: mediatek: vcodec: fix minmax.cocci warning
Fix the following coccicheck warning:

drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c:
694:15-16: WARNING opportunity for min().

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:01:02 +01:00
Lukas Bulwahn
7d772a47ca media: MAINTAINERS: add include/dt-bindings/media to MEDIA INPUT INFRASTRUCTURE
Maintainers of the directory Documentation/devicetree/bindings/media
are also the maintainers of the corresponding directory
include/dt-bindings/media.

Add the file entry for include/dt-bindings/media to the appropriate
section in MAINTAINERS.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 09:00:07 +01:00
Christophe JAILLET
34c7fdb8fd media: ddbridge: Remove useless license text when SPDX-License-Identifier is already used
An SPDX-License-Identifier is already in place. There is no need to
duplicate part of the corresponding license.

While at it, a few comments at the end of some .h files have been updated
to reflect the correct include guard name (missing '_' and co.)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:57:24 +01:00
Christophe JAILLET
c1b217853f media: em28xx: Remove useless license text when SPDX-License-Identifier is already used
An SPDX-License-Identifier is already in place. There is no need to
duplicate part of the corresponding license.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:56:29 +01:00
Christophe JAILLET
6addd33f06 media: rcar_drif: Remove useless license text when SPDX-License-Identifier is already used
An SPDX-License-Identifier is already in place. There is no need to
duplicate part of the corresponding license.

This is a left-over from commit adeb697056 ("media: rcar_drif: convert to
SPDX identifiers")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:55:17 +01:00
Ajye Huang
f5d48ba2ca media: platform: cros-ec: Add kinox to the match table
The Google Kinox device uses the same approach as the Google Brask
which enables the HDMI CEC via the cros-ec-cec driver.

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:54:29 +01:00
Ming Qian
89e3f3fb3d media: amphion: output firmware error message
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: 61cbf1c1fa ("media: amphion: implement vpu core communication based on mailbox")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:53:56 +01:00
Ming Qian
22a2bc88c1 media: imx-jpeg: Disable slot interrupt when frame done
The interrupt STMBUF_HALF may be triggered after frame done.
It may led to system hang if driver try to access the register after
power off.

Disable the slot interrupt when frame done.

Fixes: 2db16c6ed7 ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Tested-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:53:14 +01:00
Yunfei Dong
fd9f8050e3 media: mediatek: vcodec: Change encoder v4l2 capability value
Change the value of v4l2 capability parameters: driver and card.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:51:44 +01:00
Yunfei Dong
b51b150300 media: mediatek: vcodec: Fix encoder v4l2 bus_info not correctly
Fix v4l2 capability bus_info value with correct chip name according to
compatible.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:51:13 +01:00
Yunfei Dong
a8a7a278c5 media: mediatek: vcodec: Change decoder v4l2 capability value
Change the value of v4l2 capability parameters: driver and card.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:49:54 +01:00
Yunfei Dong
cce4de66cc media: mediatek: vcodec: Fix decoder v4l2 bus_info not correctly
Fix v4l2 capability bus_info value with correct chip name according to
compatible.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:49:20 +01:00
Laurent Pinchart
fd83ef8f8e media: rkisp1: Drop parentheses and fix indentation in rkisp1_probe()
Fix a small indentation issue to increase code readability, and drop
unneeded parentheses.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:39:50 +01:00
Laurent Pinchart
34098a83de media: rkisp1: Align macro definitions
Make the code more readable by using the same alignment for all macros
in rkisp1-common.h.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:39:28 +01:00
Paul Elder
3d91b856ae media: rkisp1: capture: Bypass the main device for handling querycap
When handling querycap, the capture node would access the main rkisp1
device unnecessarily. Get the information from the most direct source.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:39:05 +01:00
Laurent Pinchart
a124765f87 media: rkisp1: debug: Update max register name length
Update the maximum register name length to match all the registers being
printed. This helps getting a consistent alignment of register dumps
when concatenating multiple debugfs files.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:38:36 +01:00
Laurent Pinchart
7d62f2f367 media: rkisp1: debug: Consolidate reg dumps for shadow registers
Extend the rkisp1_debug_register structure and the
rkisp1_debug_dump_regs() function to support shadow registers, and
replace the manual registers dump implementation in
rkisp1_debug_dump_rsz_regs_show() with a call to
rkisp1_debug_dump_regs().

Support for printing register values in decimal is dropped, as it was
actually confusing to print resizer register expressed as fixed-point
values in decimal.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:38:02 +01:00
Laurent Pinchart
ce380f225d media: rkisp1: debug: Move resizer register dump to debugfs
The debugfs support already includes support to dump core and ISP
registers. Move the resizer register dump there too to make the
userspace interface consistent.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-27 08:37:32 +01:00