platform/kernel/linux-starfive.git
2 years agomedia: coda: jpeg: start streaming without valid header
Philipp Zabel [Wed, 6 Apr 2022 08:53:53 +0000 (09:53 +0100)]
media: coda: jpeg: start streaming without valid header

Stop bailing out on JPEG header parsing errors during streamon.
This allows userspace to provide valid output buffers later and
fixes a v4l2-compliance streaming test failure:

fail: v4l2-test-buffers.cpp(1429): node->streamon(q.g_type())
test MMAP (no poll): FAIL

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: coda: jpeg: improve header parse error message
Philipp Zabel [Wed, 6 Apr 2022 08:53:52 +0000 (09:53 +0100)]
media: coda: jpeg: improve header parse error message

If JPEG header parsing fails, output a single message instead of two
messages that say the same thing.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: coda: jpeg: set buffer error flag when header parsing fails
Philipp Zabel [Wed, 6 Apr 2022 08:53:51 +0000 (09:53 +0100)]
media: coda: jpeg: set buffer error flag when header parsing fails

If decoding fails because  the output buffer does not contain a
valid header, set the error flag on the returned capture buffer.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: coda: add JPEG downscale support
Philipp Zabel [Wed, 6 Apr 2022 08:51:45 +0000 (09:51 +0100)]
media: coda: add JPEG downscale support

The JPEG decoder in the CODA960 VPU can downscale images while decoding,
with a factor of 1/2, 1/4, or 1/8.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: platform: samsung: remove redundant assignment to variable m
Colin Ian King [Tue, 5 Apr 2022 17:59:59 +0000 (18:59 +0100)]
media: platform: samsung: remove redundant assignment to variable m

The variable m is being assigned a value that is never read, it
is being re-assigned in both paths of the following if-statement.
The assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: coda: consolidate job_finish calls on decoder prepare_run failure
Philipp Zabel [Tue, 5 Apr 2022 13:55:17 +0000 (14:55 +0100)]
media: coda: consolidate job_finish calls on decoder prepare_run failure

If the decoder prepare_run callback returns an error, the hardware
is never started and v4l2_m2m_job_finish() is called immediately,
currently in every error path.

Remove the duplicated job_finish calls from the error paths and reuse
the v4l2_m2m_job_finish() at the end of coda_pic_run_work instead.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: coda: assert bitstream mutex is locked in coda_fill_bitstream
Philipp Zabel [Tue, 5 Apr 2022 13:50:35 +0000 (14:50 +0100)]
media: coda: assert bitstream mutex is locked in coda_fill_bitstream

coda_fill_bitstream() must be called under the bitstream mutex.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: coda: disable stateful encoder ioctls for jpeg encoder
Philipp Zabel [Mon, 4 Apr 2022 16:35:30 +0000 (17:35 +0100)]
media: coda: disable stateful encoder ioctls for jpeg encoder

Use v4l2_disable_ioctl() to disable the stateful encoder ioctls
VIDIOC_ENUM_FRAMEINTERVALS, VIDIOC_G_PARM, and VIDIOC_S_PARM for
the jpeg encoder device, to fix this v4l2-compliance test failure:

fail: v4l2-test-formats.cpp(68): node->is_m2m && !(node->codec_mask & STATEFUL_ENCODER)
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
fail: v4l2-test-formats.cpp(1363): node->is_m2m && !is_stateful_enc
test VIDIOC_G/S_PARM: FAIL

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
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>
2 years agomedia: coda: disable encoder ioctls for decoder devices
Philipp Zabel [Mon, 4 Apr 2022 16:35:29 +0000 (17:35 +0100)]
media: coda: disable encoder ioctls for decoder devices

Use v4l2_disable_ioctl() to disable the encoder ioctls
VIDIOC_ENUM_FRAMESIZES, VIDIOC_ENUM_FRAMEINTERVALS, VIDIOC_G_PARM, and
VIDIOC_S_PARM, to fix this v4l2-compliance test failure:

fail: v4l2-test-formats.cpp(1363): node->is_m2m && !is_stateful_enc
test VIDIOC_G/S_PARM: FAIL

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
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>
2 years agomedia: coda: disable encoder cmd ioctl on decoder and vice versa
Philipp Zabel [Mon, 4 Apr 2022 16:35:28 +0000 (17:35 +0100)]
media: coda: disable encoder cmd ioctl on decoder and vice versa

Use v4l2_disable_ioctl() to disable the VIDIOC_TRY_ENCODER_CMD and
VIDIOC_ENCODER_CMD ioctls on decoder video devices and the
VIDIOC_TRY_DECODER_CMD and VIDIOC_DECODER_CMD ioctls on encoder
video devices.

This allows to drop the coda_try_encoder/decoder_cmd() functions
and to use v4l2_m2m_ioctl_try_encoder/decoder_cmd() directly.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
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>
2 years agomedia: venus: venc: Add support for intra-refresh type
Dikshita Agarwal [Tue, 19 Apr 2022 05:06:43 +0000 (06:06 +0100)]
media: venus: venc: Add support for intra-refresh type

Add support for intra-refresh type v4l2 control.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: v4l2-ctrls: Add intra-refresh type control
Dikshita Agarwal [Tue, 19 Apr 2022 05:06:42 +0000 (06:06 +0100)]
media: v4l2-ctrls: Add intra-refresh type control

Add a control to set intra-refresh type.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: vdec: Use output resolution on reconfigure
Stanimir Varbanov [Thu, 3 Mar 2022 15:06:36 +0000 (15:06 +0000)]
media: venus: vdec: Use output resolution on reconfigure

When recalculate output buffer size we have to take into account
the output resolution from the firmware received during event change
notification.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: Add a handling of QC10C compressed format
Stanimir Varbanov [Thu, 3 Mar 2022 15:06:35 +0000 (15:06 +0000)]
media: venus: Add a handling of QC10C compressed format

This adds QC10C compressed pixel format in the Venus driver, and
make it possible to discover from v4l2 clients.

Note: The QC10C format will be enumerable via VIDIOC_ENUM_FMT when
the bitstream is 10-bits and the headers are parsed.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: hfi_platform: Correct supported compressed format
Stanimir Varbanov [Thu, 3 Mar 2022 15:06:34 +0000 (15:06 +0000)]
media: venus: hfi_platform: Correct supported compressed format

In multistream mode HFI supports TP10_UBWC on output2. Correct this
in supported formats capabilities list.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: Add a handling of QC08C compressed format
Stanimir Varbanov [Thu, 3 Mar 2022 15:06:33 +0000 (15:06 +0000)]
media: venus: Add a handling of QC08C compressed format

This adds QC08C compressed pixel format in the Venus driver, and
make it possible to discover from v4l2 clients.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: helpers: Add helper to check supported pixel formats
Stanimir Varbanov [Thu, 3 Mar 2022 15:06:32 +0000 (15:06 +0000)]
media: venus: helpers: Add helper to check supported pixel formats

Add a helper to check supported pixel format per codec and session
type.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: v4l: Add Qualcomm custom compressed pixel formats
Stanimir Varbanov [Thu, 3 Mar 2022 15:06:31 +0000 (15:06 +0000)]
media: v4l: Add Qualcomm custom compressed pixel formats

Add custom Qualcomm raw compressed pixel formats. They are
used in Qualcomm SoCs to optimize the interconnect bandwidth.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: vdec: ensure venus is powered on during stream off
Vikash Garodia [Tue, 12 Apr 2022 13:15:11 +0000 (14:15 +0100)]
media: venus: vdec: ensure venus is powered on during stream off

Video decoder driver auto-suspends the hardware if there is no
exchange of command or response for certain amount of time.
In auto suspended state, it becomes mandatory to power on the
hardware before requesting it to process a command. The fix
ensures the hardware is powered on during stop streaming.

Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: do not queue internal buffers from previous sequence
Vikash Garodia [Tue, 12 Apr 2022 13:15:10 +0000 (14:15 +0100)]
media: venus: do not queue internal buffers from previous sequence

During reconfig (DRC) event from firmware, it is not guaranteed that
all the DPB(internal) buffers would be released by the firmware. Some
buffers might be released gradually while processing frames from the
new sequence. These buffers now stay idle in the dpblist.
In subsequent call to queue the DPBs to firmware, these idle buffers
should not be queued. The fix identifies those buffers and free them.

Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: hfi: avoid null dereference in deinit
Luca Weiss [Fri, 14 Jan 2022 11:02:26 +0000 (11:02 +0000)]
media: venus: hfi: avoid null dereference in deinit

If venus_probe fails at pm_runtime_put_sync the error handling first
calls hfi_destroy and afterwards hfi_core_deinit. As hfi_destroy sets
core->ops to NULL, hfi_core_deinit cannot call the core_deinit function
anymore.

Avoid this null pointer derefence by skipping the call when necessary.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: venus: hfi: Add error message for timeout error
Luca Weiss [Fri, 14 Jan 2022 11:02:25 +0000 (11:02 +0000)]
media: venus: hfi: Add error message for timeout error

This error can appear with wrong configuration and is difficult to find
as it just returns -ETIMEDOUT with no further message.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: video-mux: Use dev_err_probe()
Philipp Zabel [Tue, 12 Apr 2022 07:29:05 +0000 (08:29 +0100)]
media: video-mux: Use dev_err_probe()

Simplify the mux error path a bit by using dev_err_probe().

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used
Kate Hsuan [Fri, 8 Apr 2022 10:42:22 +0000 (11:42 +0100)]
media: staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used

An not calibrated x_start setting would result in an incorrect AWB grid
configuration on a sensor when only the rightmost stripe is used.

If the AWB grid coordinate is set to the rightmost stripe, for example,
x_start is greater than 640, the AWB grid will be at the rightmost edge of
the sensor. The AWB statistic will be fetched from the wrong place of the
sensor and results in an incorrect AWB estimation result. Therefore,
stripe offset should subtract from x_start to have a correct grid
configuration for the rightmost stripe.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: media-entity.h: Fix documentation for media_create_intf_link
Ian Jamison [Fri, 8 Apr 2022 17:53:45 +0000 (18:53 +0100)]
media: media-entity.h: Fix documentation for media_create_intf_link

The documentation comment was inserted between the return type
and the function name. Reunite the lines.

Signed-off-by: Ian Jamison <ian.dev@arkver.com>
Fixes: db7ee32aa185 ("[media] media-device.h: Improve documentation and update it")
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: media.h: remove unneeded <stdint.h> inclusion
Masahiro Yamada [Mon, 28 Mar 2022 16:01:53 +0000 (17:01 +0100)]
media: media.h: remove unneeded <stdint.h> inclusion

Commit b3b7a9f138b7 ("[media] media-device: Use u64 ints for pointers")
added this #include <stdint.h>, presumably in order to use uintptr_t.

Now that it is gone, we can compile this for userspace without <stdint.h>.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: i2c: dw9714: Return zero in remove callback
Uwe Kleine-König [Thu, 31 Mar 2022 13:31:32 +0000 (14:31 +0100)]
media: i2c: dw9714: Return zero in remove callback

The only effect of returning an error code in an i2c remove callback is
that the i2c core emits a generic warning and still removes the device.

So even if disabling the regulator fails it's sensible to further cleanup
and then return zero to only emit a single error message.

This patch is a preparation for making i2c remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: i2c: dw9714: Disable the regulator when the driver fails to probe
Zheyu Ma [Thu, 14 Apr 2022 02:34:35 +0000 (03:34 +0100)]
media: i2c: dw9714: Disable the regulator when the driver fails to probe

When the driver fails to probe, we will get the following splat:

[   59.305988] ------------[ cut here ]------------
[   59.306417] WARNING: CPU: 2 PID: 395 at drivers/regulator/core.c:2257 _regulator_put+0x3ec/0x4e0
[   59.310345] RIP: 0010:_regulator_put+0x3ec/0x4e0
[   59.318362] Call Trace:
[   59.318582]  <TASK>
[   59.318765]  regulator_put+0x1f/0x30
[   59.319058]  devres_release_group+0x319/0x3d0
[   59.319420]  i2c_device_probe+0x766/0x940

Fix this by disabling the regulator in error handling.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: i2c: cleanup comments
Tom Rix [Sun, 13 Mar 2022 16:04:57 +0000 (16:04 +0000)]
media: i2c: cleanup comments

For spdx, remove leading space

Replacements
parametrize to parameterize

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: i2c: ov5695: fix typos in comments
Julia Lawall [Mon, 14 Mar 2022 11:53:33 +0000 (11:53 +0000)]
media: i2c: ov5695: fix typos in comments

Various spelling mistakes in comments.
Detected with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: ov7640: Use ARRAY_SIZE instead of manual checking
Moses Christopher Bollavarapu [Thu, 17 Mar 2022 14:47:14 +0000 (14:47 +0000)]
media: ov7640: Use ARRAY_SIZE instead of manual checking

Currently, the driver ends the reg-val list with a 0xFF as a check to stop
the loop. Instead an array of reg-vals can be used to avoid this check,
by using the ARRAY_SIZE(arr) macro to obtain the length of the array and
iterate over it.

Signed-off-by: Moses Christopher Bollavarapu <mosescb.dev@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: Revert "media: dw9768: activate runtime PM and turn off device"
Sakari Ailus [Wed, 13 Apr 2022 12:15:58 +0000 (13:15 +0100)]
media: Revert "media: dw9768: activate runtime PM and turn off device"

This reverts commit c09d776eaa060534a1663e3b89d842db3e1d9076.

Revert the commit as it breaks runtime PM support on OF based systems.
More fixes to the driver are needed.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: Documentation: add documentation about subdev state
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:49 +0000 (10:42 +0100)]
media: Documentation: add documentation about subdev state

Add documentation about centrally managed subdev state.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: subdev: add v4l2_subdev_get_fmt() helper function
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:48 +0000 (10:42 +0100)]
media: subdev: add v4l2_subdev_get_fmt() helper function

Add v4l2_subdev_get_fmt() helper function which implements
v4l2_subdev_pad_ops.get_fmt using active state. Subdev drivers that
support active state and do not need to do anything special in their
get_fmt op can use this helper directly for v4l2_subdev_pad_ops.get_fmt.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: subdev: add locking wrappers to subdev op wrappers
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:47 +0000 (10:42 +0100)]
media: subdev: add locking wrappers to subdev op wrappers

It is common that media drivers call subdev ops in source subdevs, and
pass NULL as the state. This was the way to indicate that the callee
should use the callee's private active state.

E.g.:

v4l2_subdev_call(priv->source_sd, pad, get_fmt, NULL, &sd_fmt);

Now that we have a real subdev active state in the v4l2_subdev struct,
we want the caller to pass a proper state (when available). And
furthermore, the state should be locked.

This would mean changing all the callers, which is the long term goal.

To fix this issue in the short term, let's add an extra wrapper layer to
all v4l2_subdev_call_pad_wrappers which deal with states. These wrappers
handle the state == NULL case by using the locked active state instead
(when available).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: subdev: add subdev state locking
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:46 +0000 (10:42 +0100)]
media: subdev: add subdev state locking

The V4L2 subdevs have managed without centralized locking for the state
(previously pad_config), as the try-state is supposedly safe (although I
believe two TRY ioctls for the same fd would race), and the
active-state, and its locking, is managed by the drivers internally.

We now have active-state in a centralized position, and need locking.
Strictly speaking the locking is only needed for new drivers that use
the new state, as the current drivers continue behaving as they used to.

However, active-state locking is complicated by the fact that currently
the real active-state of a subdev is split into multiple parts: the new
v4l2_subdev_state, subdev control state, and subdev's internal state.

In the future all these three states should be combined into one state
(the v4l2_subdev_state), and then a single lock for the state should be
sufficient.

But to solve the current split-state situation we need to share locks
between the three states. This is accomplished by using the same lock
management as the control handler does: we use a pointer to a mutex,
allowing the driver to override the default mutex. Thus the driver can
do e.g.:

sd->state_lock = sd->ctrl_handler->lock;

before calling v4l2_subdev_init_finalize(), resulting in sharing the
same lock between the states and the controls.

The locking model for active-state is such that any subdev op that gets
the state as a parameter expects the state to be already locked by the
caller, and expects the caller to release the lock.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: subdev: pass also the active state to subdevs from ioctls
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:45 +0000 (10:42 +0100)]
media: subdev: pass also the active state to subdevs from ioctls

At the moment when a subdev op is called, the TRY subdev state
(subdev_fh->state) is passed as a parameter even for the ACTIVE case, or
alternatively a NULL can be passed for ACTIVE case. This used to make
sense, as the ACTIVE state was handled internally by the subdev drivers.

We now have a state for the ACTIVE case in a standard place, and can
pass that also to the drivers. This patch changes the subdev ioctls to
either pass the TRY or ACTIVE state to the subdev.

Unfortunately many drivers call ops from other subdevs, and implicitly
pass NULL as the state, so this is just a partial solution. A coccinelle
spatch could perhaps be created which fixes the drivers' subdev calls.

For all current upstream drivers this doesn't matter, as they do not
expect to get a valid state for ACTIVE case. But future drivers which
support multiplexed streaming and routing will depend on getting a state
for both active and try cases.

For new drivers we can mandate that the pipelines where the drivers are
used need to pass the state properly, or preferably, not call such
subdev ops at all.

However, if an existing subdev driver is changed to support multiplexed
streams, the driver has to consider cases where its ops will be called
with NULL state. The problem can easily be solved by using the
v4l2_subdev_lock_and_get_active_state() helper, introduced in a follow
up patch.

Another follow up patch adds wrappers for pad ops dealing with subdev
state, which automate the use of
v4l2_subdev_lock_and_get_active_state() for cases where the state is
NULL.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: subdev: rename v4l2_subdev_get_pad_* helpers
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:44 +0000 (10:42 +0100)]
media: subdev: rename v4l2_subdev_get_pad_* helpers

The subdev state is now used for both try and active cases. Rename
rename v4l2_subdev_get_try_* helpers to v4l2_subdev_get_pad_*.

Temporary wapper helper macros are added to keep the drivers using
v4l2_subdev_get_try_* compiling. The next step is to change the uses
in th drivers, and then drop the helpers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: subdev: add active state to struct v4l2_subdev
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:43 +0000 (10:42 +0100)]
media: subdev: add active state to struct v4l2_subdev

Add a new 'active_state' field to struct v4l2_subdev to which we can
store the active state of a subdev. This will place the subdev
configuration into a known place, allowing us to use the state directly
from the v4l2 framework, thus simplifying the drivers.

Also add functions v4l2_subdev_init_finalize() and
v4l2_subdev_cleanup(), which will allocate and free the active state.
The functions are named in a generic way so that they can be also used
for other subdev initialization work.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: subdev: rename subdev-state alloc & free
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:42 +0000 (10:42 +0100)]
media: subdev: rename subdev-state alloc & free

v4l2_subdev_alloc_state() and v4l2_subdev_free_state() are not supposed
to be used by the drivers. However, we do have a few drivers that use
those at the moment, so we need to expose these functions for the time
being.

Prefix the functions with __ to mark the functions as internal.

At the same time, rename them to v4l2_subdev_state_alloc and
v4l2_subdev_state_free to match the style used for other functions like
video_device_alloc() and media_request_alloc().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: v4l2-subdev: drop extra #ifdef
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:41 +0000 (10:42 +0100)]
media: v4l2-subdev: drop extra #ifdef

subdev_open() is inside #ifdef CONFIG_VIDEO_V4L2_SUBDEV_API, which
depends on CONFIG_MEDIA_CONTROLLER, so there's no need for an extra

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: v4l2-subdev: fix #endif comments
Tomi Valkeinen [Tue, 12 Apr 2022 09:42:40 +0000 (10:42 +0100)]
media: v4l2-subdev: fix #endif comments

Add comments after #endifs to clarify their scope.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: i2c: ov5645: Fix media bus format
Jacopo Mondi [Mon, 28 Mar 2022 16:32:20 +0000 (17:32 +0100)]
media: i2c: ov5645: Fix media bus format

The ov5645 driver reports as its unique supported format
MEDIA_BUS_FMT_UYVY8_2X8, which is not correct as the sensor
uses the MIPI CSI-2 serial bus.

Fix that by using MEDIA_BUS_FMT_UYVY8_1X16 instead.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: mc: delete redundant code in __media_device_unregister_entity
Hangyu Hua [Thu, 24 Mar 2022 10:27:52 +0000 (10:27 +0000)]
media: mc: delete redundant code in __media_device_unregister_entity

media_gobj_destroy has already set graph_obj.mdev to NULL. There is no
need to set it again.

[Sakari Ailus: Remove extra newline, rewrap commit msg]

Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: staging/intel-ipu3: Cleanup dummy buffers via helper
Umang Jain [Fri, 18 Mar 2022 12:18:26 +0000 (12:18 +0000)]
media: staging/intel-ipu3: Cleanup dummy buffers via helper

Use an existing helper imgu_video_nodes_exit() on imgu-video-node
initialization failure path to cleanup dummy buffers.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: staging/intel-ipu3: Reset imgu_video_device sequence
Umang Jain [Fri, 18 Mar 2022 12:18:25 +0000 (12:18 +0000)]
media: staging/intel-ipu3: Reset imgu_video_device sequence

Reset the sequence number of imgu_video_device on stream start.
Failing to do so results in sequence number getting incremented
for consecutive stream on/off cycles.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: v4l2-async: Use endpoints in __v4l2_async_nf_add_fwnode_remote()
Laurent Pinchart [Mon, 21 Mar 2022 14:51:34 +0000 (14:51 +0000)]
media: v4l2-async: Use endpoints in __v4l2_async_nf_add_fwnode_remote()

Matching on device fwnode handles is deprecated in favour of endpoint
fwnode handles. Switch the __v4l2_async_nf_add_fwnode_remote() function
to use the latter. The match code handles backward compatibility by
falling by to the device fwnode handle, so this shouldn't introduce any
regression.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: staging: media: ipu3-imgu: Request specific firmware binary
Sakari Ailus [Fri, 18 Mar 2022 16:08:12 +0000 (16:08 +0000)]
media: staging: media: ipu3-imgu: Request specific firmware binary

Primarily request a specific revision of the IPU3 firmware that the driver
is known to work with,
irci_irci_ecr-master_20161208_0213_20170112_1500.bin. Some distros only
ship this while others provide a symlink called ipu3-fw.bin, which the
driver only requested previously.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: staging: media: ipu3: Fix AF x_start position when rightmost stripe is used
Kate Hsuan [Thu, 17 Mar 2022 07:57:13 +0000 (07:57 +0000)]
media: staging: media: ipu3: Fix AF x_start position when rightmost stripe is used

For the AF configuration, if the rightmost stripe is used, the AF scene
will be at the incorrect location of the sensor.

The AF coordinate may be set to the right part of the sensor. This
configuration would lead to x_start being greater than the
down_scaled_stripes offset and the leftmost stripe would be disabled
and only the rightmost stripe is used to control the AF coordinate. If
the x_start doesn't perform any adjustments, the AF coordinate will be
at the wrong place of the sensor since down_scaled_stripes offset
would be the new zero of the coordinate system.

In this patch, if only the rightmost stripe is used, x_start should
minus down_scaled_stripes offset to maintain its correctness of AF
scene coordinate.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: i2c: max9286: fix kernel oops when removing module
Laurentiu Palcu [Mon, 7 Mar 2022 16:46:07 +0000 (16:46 +0000)]
media: i2c: max9286: fix kernel oops when removing module

When removing the max9286 module we get a kernel oops:

Unable to handle kernel paging request at virtual address 000000aa00000094
Mem abort info:
  ESR = 0x96000004
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000004
  CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=0000000880d85000
[000000aa00000094] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 96000004 [#1] PREEMPT SMP
Modules linked in: fsl_jr_uio caam_jr rng_core libdes caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine max9271 authenc crct10dif_ce mxc_jpeg_encdec
CPU: 2 PID: 713 Comm: rmmod Tainted: G         C        5.15.5-00057-gaebcd29c8ed7-dirty #5
Hardware name: Freescale i.MX8QXP MEK (DT)
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : i2c_mux_del_adapters+0x24/0xf0
lr : max9286_remove+0x28/0xd0 [max9286]
sp : ffff800013a9bbf0
x29: ffff800013a9bbf0 x28: ffff00080b6da940 x27: 0000000000000000
x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
x23: ffff000801a5b970 x22: ffff0008048b0890 x21: ffff800009297000
x20: ffff0008048b0f70 x19: 000000aa00000064 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000014 x13: 0000000000000000 x12: ffff000802da49e8
x11: ffff000802051918 x10: ffff000802da4920 x9 : ffff000800030098
x8 : 0101010101010101 x7 : 7f7f7f7f7f7f7f7f x6 : fefefeff6364626d
x5 : 8080808000000000 x4 : 0000000000000000 x3 : 0000000000000000
x2 : ffffffffffffffff x1 : ffff00080b6da940 x0 : 0000000000000000
Call trace:
 i2c_mux_del_adapters+0x24/0xf0
 max9286_remove+0x28/0xd0 [max9286]
 i2c_device_remove+0x40/0x110
 __device_release_driver+0x188/0x234
 driver_detach+0xc4/0x150
 bus_remove_driver+0x60/0xe0
 driver_unregister+0x34/0x64
 i2c_del_driver+0x58/0xa0
 max9286_i2c_driver_exit+0x1c/0x490 [max9286]
 __arm64_sys_delete_module+0x194/0x260
 invoke_syscall+0x48/0x114
 el0_svc_common.constprop.0+0xd4/0xfc
 do_el0_svc+0x2c/0x94
 el0_svc+0x28/0x80
 el0t_64_sync_handler+0xa8/0x130
 el0t_64_sync+0x1a0/0x1a4

The Oops happens because the I2C client data does not point to
max9286_priv anymore but to v4l2_subdev. The change happened in
max9286_init() which calls v4l2_i2c_subdev_init() later on...

Besides fixing the max9286_remove() function, remove the call to
i2c_set_clientdata() in max9286_probe(), to avoid confusion, and make
the necessary changes to max9286_init() so that it doesn't have to use
i2c_get_clientdata() in order to fetch the pointer to priv.

Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver")
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: v4l: ioctl: Set bus_info in v4l_querycap()
Sakari Ailus [Sat, 22 Jan 2022 13:23:18 +0000 (13:23 +0000)]
media: v4l: ioctl: Set bus_info in v4l_querycap()

The bus_info field is set by most drivers based on the type of the device
bus as well as the name of the device. Do this in v4l_querycap() so
drivers don't need to. This keeps compatibility with non-default and silly
bus_info.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: mc: Set bus_info in media_device_init()
Sakari Ailus [Sat, 22 Jan 2022 11:31:37 +0000 (11:31 +0000)]
media: mc: Set bus_info in media_device_init()

Set bus_info field based on struct device in media_device_init() and
remove corresponding code from drivers.

Also update media_device_init() documentation: the dev field must be now
initialised before calling it.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: mc: Provide a helper for setting bus_info field
Sakari Ailus [Sat, 22 Jan 2022 11:25:57 +0000 (11:25 +0000)]
media: mc: Provide a helper for setting bus_info field

The bus_info or a similar field exists in a lot of structs, yet drivers
tend to set the value of that field by themselves in a determinable way.
Thus provide a helper for doing this. To be used in subsequent patches.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: mc: media_device_init() initialises a media_device, not media_entity
Sakari Ailus [Wed, 9 Mar 2022 09:12:01 +0000 (09:12 +0000)]
media: mc: media_device_init() initialises a media_device, not media_entity

The documentation for media_device_init() had several references to
(struct) media_entity where it should have referred to struct media_device
instead. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: mc: Remove redundant documentation
Sakari Ailus [Thu, 27 Jan 2022 09:25:48 +0000 (09:25 +0000)]
media: mc: Remove redundant documentation

Remove redundant kerneldoc documentation in mc-device.c. The functions are
already documented in media-device.h, where non-redundant documentation is
also moved.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: ccs: Use unsigned int as index to an array
Sakari Ailus [Wed, 16 Mar 2022 07:53:56 +0000 (07:53 +0000)]
media: ccs: Use unsigned int as index to an array

Use an unsigned int to index an array instead of a signed one.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: ccs: Use %u for printing unsigned values, remove extra debug print
Sakari Ailus [Wed, 16 Mar 2022 07:51:26 +0000 (07:51 +0000)]
media: ccs: Use %u for printing unsigned values, remove extra debug print

Use %u for printing unsigned integer or u32 values. In a lot of cases %d
was being used instead.

Also remove an extra debug print --- the number of lanes is already
printed by V4L2 when parsing fwnode endpoints when dynamic debug is
enabled.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: v4l2-async: Create links during v4l2_async_match_notify()
Daniel Scally [Wed, 2 Mar 2022 22:03:04 +0000 (22:03 +0000)]
media: v4l2-async: Create links during v4l2_async_match_notify()

Upon an async fwnode match, there's some typical behaviour that the
notifier and matching subdev will want to do. For example, a notifier
representing a sensor matching to an async subdev representing its
VCM will want to create an ancillary link to expose that relationship
to userspace.

To avoid lots of code in individual drivers, try to build these links
within v4l2 core.

Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: entity: Add support for ancillary links
Daniel Scally [Wed, 2 Mar 2022 22:03:03 +0000 (22:03 +0000)]
media: entity: Add support for ancillary links

Add functions to create ancillary links, so that they don't need to
be manually created by users.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: entity: Add link_type_name() helper
Daniel Scally [Wed, 2 Mar 2022 22:03:02 +0000 (22:03 +0000)]
media: entity: Add link_type_name() helper

Now we have three types of media link, printing the right name during
debug output is slightly more complicated. Add a helper function to
make it easier.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: media.h: Add new media link type
Daniel Scally [Wed, 2 Mar 2022 22:03:01 +0000 (22:03 +0000)]
media: media.h: Add new media link type

To describe in the kernel the connection between devices and their
supporting peripherals (for example, a camera sensor and the vcm
driving the focusing lens for it), add a new type of media link
to introduce the concept of these ancillary links.

Add some elements to the uAPI documentation to explain the new link
type, their purpose and some aspects of their current implementation.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: entity: Skip non-data links in graph iteration
Daniel Scally [Wed, 2 Mar 2022 22:03:00 +0000 (22:03 +0000)]
media: entity: Skip non-data links in graph iteration

When iterating over the media graph, don't follow links that are not
data links.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: entity: skip non-data link when removing reverse links
Yunke Cao [Tue, 12 Apr 2022 06:23:13 +0000 (07:23 +0100)]
media: entity: skip non-data link when removing reverse links

The original implementation removes reverse links for any input link and
assumes the presense of sink/source.
It fails when the link is a not a data link.
media_entity_remove_links when there's an ancillary link can also fail.

We only need to remove reverse links for a data link.

Signed-off-by: Yunke Cao <yunkec@google.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: imx: imx-mipi-csis: Add support for JPEG_1X8
Jacopo Mondi [Wed, 9 Mar 2022 10:04:48 +0000 (10:04 +0000)]
media: imx: imx-mipi-csis: Add support for JPEG_1X8

Add support for MEDIA_BUS_FMT_JPEG_1X8 media bus code to the
CSIS driver.

The MEDIA_BUS_FMT_JPEG_1X8 code is mapped to the RAW8 CSI-2 Data Type,
while the CSI-2 specification suggests to use User Defined Data Type 1.

As reported in the comment, the CSIS interface captures arbitrary Data
Types by using a pixel sampling mode not supported by the IP core
connected to it on i.MX SoCs.

As some sensors, such as OV5640, support sending JPEG data on the RAW8
Data Type and capture operations work correcty with such configuration,
map MEDIA_BUS_FMT_JPEG_1X8 to Data Type 0x2a.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cec: add optional adap_configured callback
Hans Verkuil [Thu, 3 Feb 2022 12:11:15 +0000 (12:11 +0000)]
media: cec: add optional adap_configured callback

This new optional callback is called when the adapter is fully configured
or fully unconfigured. Some drivers may have to take action when this
happens.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cec: add xfer_timeout_ms field
Hans Verkuil [Sat, 13 Nov 2021 11:05:24 +0000 (11:05 +0000)]
media: cec: add xfer_timeout_ms field

Allow drivers to change the transmit timeout value, i.e. after how
long should a transmit be considered 'lost', i.e. the corresponding
cec_transmit_done_ts was never called.

Some CEC devices have their own timeout, and so this timeout value must be
longer than that hardware timeout value. If it is shorter then the
framework would consider the transmit lost, even though it is effectively
still in progress at the hardware level.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cec: use call_op and check for !unregistered
Hans Verkuil [Thu, 17 Mar 2022 08:51:20 +0000 (08:51 +0000)]
media: cec: use call_op and check for !unregistered

Use call_(void_)op consistently in the CEC core framework. Ditto
for the cec pin ops. And check if !adap->devnode.unregistered before
calling each op. This avoids calls to ops when the device has been
unregistered and the underlying hardware may be gone.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cec.h: add cec_msg_recv_is_rx/tx_result helpers
Hans Verkuil [Wed, 9 Mar 2022 10:55:43 +0000 (10:55 +0000)]
media: cec.h: add cec_msg_recv_is_rx/tx_result helpers

These two helper functions return true if the received message
contains the result of a previous non-blocking transmit. Either
the tx_status result (cec_msg_recv_is_tx_result) of the transmit,
or the rx_status result (cec_msg_recv_is_rx_result) of the reply
to the original transmit.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cec: correctly pass on reply results
Hans Verkuil [Sat, 13 Nov 2021 11:02:36 +0000 (11:02 +0000)]
media: cec: correctly pass on reply results

The results of non-blocking transmits were not correctly communicated
to userspace.

Specifically:

1) if a non-blocking transmit was canceled, then rx_status wasn't set to 0
   as it should.
2) if the non-blocking transmit succeeded, but the corresponding reply
   never arrived (aborted or timed out), then tx_status wasn't set to 0
   as it should, and rx_status was hardcoded to ABORTED instead of the
   actual reason, such as TIMEOUT. In addition, adap->ops->received() was
   never called, so drivers that want to do message processing themselves
   would not be informed of the failed reply.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cec: abort if the current transmit was canceled
Hans Verkuil [Thu, 3 Mar 2022 14:01:44 +0000 (14:01 +0000)]
media: cec: abort if the current transmit was canceled

If a transmit-in-progress was canceled, then, once the transmit
is done, mark it as aborted and refrain from retrying the transmit.

To signal this situation the new transmit_in_progress_aborted field is
set to true.

The old implementation would just set adap->transmitting to NULL and
set adap->transmit_in_progress to false, but on the hardware level
the transmit was still ongoing. However, the framework would think
the transmit was aborted, and if a new transmit was issued, then
it could overwrite the HW buffer containing the old transmit with the
new transmit, leading to garbled data on the CEC bus.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cec: call enable_adap on s_log_addrs
Hans Verkuil [Thu, 3 Mar 2022 13:55:08 +0000 (13:55 +0000)]
media: cec: call enable_adap on s_log_addrs

Don't enable/disable the adapter if the first fh is opened or the
last fh is closed, instead do this when the adapter is configured
or unconfigured, and also when we enter Monitor All or Monitor Pin
mode for the first time or we exit the Monitor All/Pin mode for the
last time.

However, if needs_hpd is true, then do this when the physical
address is set or cleared: in that case the adapter typically is
powered by the HPD, so it really is disabled when the HPD is low.
This case (needs_hpd is true) was already handled in this way, so
this wasn't changed.

The problem with the old behavior was that if the HPD goes low when
no fh is open, and a transmit was in progress, then the adapter would
be disabled, typically stopping the transmit immediately which
leaves a partial message on the bus, which isn't nice and can confuse
some adapters.

It makes much more sense to disable it only when the adapter is
unconfigured and we're not monitoring the bus, since then you really
won't be using it anymore.

To keep track of this store a CEC activation count and call adap_enable
only when it goes from 0 to 1 or back to 0.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: meson-ir-tx: remove superfluous dev_err()
Yihao Han [Thu, 10 Mar 2022 07:40:59 +0000 (07:40 +0000)]
media: meson-ir-tx: remove superfluous dev_err()

Remove dev_err() messages after platform_get_irq*() failures.
platform_get_irq() already prints an error.

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

Signed-off-by: Yihao Han <hanyihao@vivo.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: dib0700_devices: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:38 +0000 (22:41 +0200)]
media: dvb-usb: dib0700_devices: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/028699ec71158dbc49d710a4259eb8cdb7f673cb.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: dibusb-mc: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:37 +0000 (22:41 +0200)]
media: dvb-usb: dibusb-mc: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/f1d4fa4960b709152ae693800c830e19a4bc1f48.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: dibusb-mb: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:36 +0000 (22:41 +0200)]
media: dvb-usb: dibusb-mb: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/a300c26ad4e9bb913e86eeaf0ec7d72b9e7d5d3e.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: vp7045: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:35 +0000 (22:41 +0200)]
media: dvb-usb: vp7045: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/0241bf842bf592dfa01b0ef4916afda396194f98.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: vp702x: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:34 +0000 (22:41 +0200)]
media: dvb-usb: vp702x: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/13bf6aab3909fae5da4c9a24c114b15e76abd146.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: umt-010: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:33 +0000 (22:41 +0200)]
media: dvb-usb: umt-010: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/5fd3c469faa115856f48037019e607edcb41d458.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: ttusb2: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:32 +0000 (22:41 +0200)]
media: dvb-usb: ttusb2: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/b447d9fd3832da5eff6267e8fe742c431f1133f2.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: technisat-usb2: use the newer dvb-usb macros for USB device
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:31 +0000 (22:41 +0200)]
media: technisat-usb2: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro.

Link: https://lore.kernel.org/linux-media/c125c28aeb3d4344b632e1f99d81c433917f2a4c.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: pctv452e: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:30 +0000 (22:41 +0200)]
media: dvb-usb: pctv452e: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/283a8c6bdf9778f832b4f6acc104c06688281668.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: opera1: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:29 +0000 (22:41 +0200)]
media: dvb-usb: opera1: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/08861d80b6706ac1ed04a68959ebb78f27cb028d.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: nova-t-usb2: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:28 +0000 (22:41 +0200)]
media: dvb-usb: nova-t-usb2: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/58f1a356b7b75bbefef3aa07cd99896c446df32f.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: m920x: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:27 +0000 (22:41 +0200)]
media: dvb-usb: m920x: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/c6f6bab97c39561add54f69a75980f4d453f7c17.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: gp8psk: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:26 +0000 (22:41 +0200)]
media: dvb-usb: gp8psk: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/0d32148747df677f0c930605389c12b190c09bdf.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dw2102: use the newer dvb-usb macros for USB device
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:25 +0000 (22:41 +0200)]
media: dw2102: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro, and rename some PIDs.

Link: https://lore.kernel.org/linux-media/828998ef3f0843bab4e84780e42f8f0802f57be7.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dtv5100: use the newer dvb-usb macros for USB device
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:24 +0000 (22:41 +0200)]
media: dtv5100: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro.

Link: https://lore.kernel.org/linux-media/6e7183735aacf33fff86bc709a38aafb6b858dff.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: dtt200u: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:23 +0000 (22:41 +0200)]
media: dvb-usb: dtt200u: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/9fa3d1add4c58e1320dcc18578fda2d0106becda.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: digitv: use the newer dvb-usb macros for USB device
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:22 +0000 (22:41 +0200)]
media: digitv: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro.

Link: https://lore.kernel.org/linux-media/68de8820a361e61c25bf7402acac71b3770ff906.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cxusb: use the newer dvb-usb macros for USB device
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:21 +0000 (22:41 +0200)]
media: cxusb: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro.

Link: https://lore.kernel.org/linux-media/bd1e61664e234252de3dfac16aab8bfc35b7bcd7.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: cinergyT2-core: use the newer dvb-usb macros for USB device
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:20 +0000 (22:41 +0200)]
media: cinergyT2-core: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro and an enum with the USB model supported by
this driver.

Link: https://lore.kernel.org/linux-media/4b8212adab277a2bf84ab04480eb6fd37edda74f.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: az6027: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:19 +0000 (22:41 +0200)]
media: dvb-usb: az6027: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/65b9775c39dcd21e5cb75a86e1e7b99b7d6eefcd.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: af9005: use the newer dvb-usb macros for USB device
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:18 +0000 (22:41 +0200)]
media: af9005: use the newer dvb-usb macros for USB device

In order to make the drivers under dvb-usb more homogeneous,
use the new macro.

Link: https://lore.kernel.org/linux-media/9b1749763465815af92f0a4d8f210fe170c549d5.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: a800: use an enum for the device number
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:17 +0000 (22:41 +0200)]
media: dvb-usb: a800: use an enum for the device number

The device number is currently a value that needs to be the same
on two separate tables, but the code doesn't actually enforce it,
leading to errors as boards get added or removed.

Fix it by using an enum.

Link: https://lore.kernel.org/linux-media/dc8f9ec6cc8f2e16967a61752a292c46622c01dc.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: Add helper macros for using USB VID/PID
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:16 +0000 (22:41 +0200)]
media: dvb-usb: Add helper macros for using USB VID/PID

In order to use designated initializers and to avoid avoid big lines
at the USB ID tables, define some helper macros.

Link: https://lore.kernel.org/linux-media/f82e376dea2e9b922f51a03d1e7730b03e49cc7d.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: vp702x: reference to usb ID table
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:15 +0000 (22:41 +0200)]
media: dvb-usb: vp702x: reference to usb ID table

There are two commented entries that are pointing to the wrong
places. Fix them.

Link: https://lore.kernel.org/linux-media/fe9ee24510431e6baad5244d8a27e56ce167fc36.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb: move USB IDs to dvb-usb-ids.h
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:14 +0000 (22:41 +0200)]
media: dvb-usb: move USB IDs to dvb-usb-ids.h

Almost all drivers based on dvb-usb place their USB IDs
at dvb-usb-ids.h. In order to make it more standard, place
the remaining ones also there.

Link: https://lore.kernel.org/linux-media/7b32d5383169d23082758a7b69edef2f099202f3.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agomedia: dvb-usb-ids.h: sort entries
Mauro Carvalho Chehab [Mon, 28 Mar 2022 20:41:13 +0000 (22:41 +0200)]
media: dvb-usb-ids.h: sort entries

The entries there are alphabetically sorted, but some are at the
wrong place. Re-sort them.

While here, replace spaces by tabs where needed.

Link: https://lore.kernel.org/linux-media/0208dbba189b754b999759f06c2584242c879f4d.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2 years agoLinux 5.18-rc3
Linus Torvalds [Sun, 17 Apr 2022 20:57:31 +0000 (13:57 -0700)]
Linux 5.18-rc3

2 years agoMerge tag 'for-linus-5.18-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 17 Apr 2022 17:29:10 +0000 (10:29 -0700)]
Merge tag 'for-linus-5.18-rc3-tag' of git://git./linux/kernel/git/xen/tip

Pull xen fixlet from Juergen Gross:
 "A single cleanup patch for the Xen balloon driver"

* tag 'for-linus-5.18-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/balloon: don't use PV mode extra memory for zone device allocations