11 Mar, 2022
1 commit
-
This is the 5.15.27 stable release
* tag 'v5.15.27': (3069 commits)
Linux 5.15.27
hamradio: fix macro redefine warning
KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
...Signed-off-by: Jason Liu
Conflicts:
arch/arm/boot/dts/imx7ulp.dtsi
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
arch/arm64/boot/dts/freescale/imx8mq.dtsi
drivers/dma-buf/heaps/cma_heap.c
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
drivers/gpu/drm/mxsfb/mxsfb_kms.c
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/rpmsg/rpmsg_char.c
drivers/soc/imx/gpcv2.c
drivers/thermal/imx_thermal.c
27 Jan, 2022
1 commit
-
commit a9e6107616bb8108aa4fc22584a05e69761a91f7 upstream.
The cec_devnode struct has a lock meant to serialize access
to the fields of this struct. This lock is taken during
device node (un)registration and when opening or releasing a
filehandle to the device node. When the last open filehandle
is closed the cec adapter might be disabled by calling the
adap_enable driver callback with the devnode.lock held.However, if during that callback a message or event arrives
then the driver will call one of the cec_queue_event()
variants in cec-adap.c, and those will take the same devnode.lock
to walk the open filehandle list.This obviously causes a deadlock.
This is quite easy to reproduce with the cec-gpio driver since that
uses the cec-pin framework which generated lots of events and uses
a kernel thread for the processing, so when adap_enable is called
the thread is still running and can generate events.But I suspect that it might also happen with other drivers if an
interrupt arrives signaling e.g. a received message before adap_enable
had a chance to disable the interrupts.This patch adds a new mutex to serialize access to the fhs list.
When adap_enable() is called the devnode.lock mutex is held, but
not devnode.lock_fhs. The event functions in cec-adap.c will now
use devnode.lock_fhs instead of devnode.lock, ensuring that it is
safe to call those functions from the adap_enable callback.This specific issue only happens if the last open filehandle is closed
and the physical address is invalid. This is not something that
happens during normal operation, but it does happen when monitoring
CEC traffic (e.g. cec-ctl --monitor) with an unconfigured CEC adapter.Signed-off-by: Hans Verkuil
Cc: # for v5.13 and up
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman
01 Dec, 2021
1 commit
-
This is the 5.15.5 stable release
* tag 'v5.15.5': (1261 commits)
Linux 5.15.5
ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign()
ALSA: hda: hdac_ext_stream: fix potential locking issues
...Conflicts:
arch/powerpc/platforms/85xx/Makefile
drivers/crypto/caam/caampkc.c
drivers/gpu/drm/bridge/nwl-dsi.c
drivers/gpu/drm/imx/imx-drm-core.c
drivers/remoteproc/imx_rproc.c
drivers/soc/imx/gpcv2.c
include/linux/rpmsg.h
19 Nov, 2021
1 commit
-
[ Upstream commit a4b83deb3e76fb9385ca58e2c072a145b3a320d6 ]
With the new DMA API we need an extension of the videobuf2 API.
Previously, videobuf2 core would set the non-coherent DMA bit
in the vb2_queue dma_attr field (if user-space would pass a
corresponding memory hint); the vb2 core then would pass the
vb2_queue dma_attrs to the vb2 allocators. The vb2 allocator
would use the queue's dma_attr and the DMA API would allocate
either coherent or non-coherent memory.But we cannot do this anymore, since there is no corresponding DMA
attr flag and, hence, there is no way for the allocator to become
aware of what type of allocation user-space has requested. So we
need to pass more context from videobuf2 core to the allocators.Fix this by changing the call_ptr_memop() macro to pass the
vb2 pointer to the corresponding op callbacks.Signed-off-by: Sergey Senozhatsky
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin
02 Nov, 2021
3 commits
-
This reverts commit 7e7618579dcde5b2e533a6f53ae7e26d3ddcc679.
On M865 there's only one Dewarp but two ISPs, current implementation from vendor
created a virtual Dewarp to do 1-1 mapping for ISP and Dewarp, now may not be
able to use *fwnode* API (V4L2_ASYNC_MATCH_FWNODE) for Dewarp but use
v4l2_async_notifier_add_devname_subdev (V4L2_ASYNC_MATCH_DEVNAME) instead.
Revisit this later.Signed-off-by: Robby Cai
Reviewed-by: G.n. Zhou -
This reverts commit 8180b4f4f589ee34d698d30ae6ad7042bf7ff1a0.
-
This reverts commit b71c99801e18eb172ae34851daf25044a3bf644a.
Signed-off-by: Oliver Brown
(cherry picked from commit 5c74966c0e7deb0ac84b3fa8a84c6c942e7d434f)
Signed-off-by: Dong AishengConflicts:
drivers/media/v4l2-core/v4l2-ioctl.c
04 Aug, 2021
3 commits
-
Add pre_streamon and post_streamoff callbacks that can be used to set a
CSI-2 transmitter to LP-11 or LP-111 mode. This can be used by receiver
drivers to reliably initialise the receiver when its initialisation
requires software involvement.Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
Fix kerneldoc syntax in v4l2-async. The references were not produced
correctly.Signed-off-by: Sakari Ailus
Reviewed-by: Jacopo Mondi
Signed-off-by: Mauro Carvalho Chehab -
Fix the name of the function that registers the subdev_notifier member
of the v4l2_subdev structure.[Sakari Ailus: Drop _sensor from the function name.]
Signed-off-by: Paul Kocialkowski
Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
22 Jul, 2021
2 commits
-
The s_learning_mode() function is called in response to the ioctl
LIRC_SET_WIDEBAND_RECEIVER, so rename it to s_wideband_receiver().Learning mode is when both the wideband receiver is turned on and
carrier reports are enabled.Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab -
Any timeout larger than LIRC_VALUE_MASK cannot work for the lirc uapi.
LIRC_VALUE_MASK is about 16 seconds which is more than enough.Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab
12 Jul, 2021
2 commits
-
If HEVC frame consists of multiple slices, segment address has to be
known in order to properly decode it.Add segment address field to slice parameters.
Signed-off-by: Jernej Skrabec
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add Geniatech MyGica T230C2_LITE and T230A as many people
are asking support for these devices on forums.Link: https://lore.kernel.org/linux-media/YMuptIYFLdwSmw//@kali
Signed-off-by: Ján Čáni
Signed-off-by: Mauro Carvalho Chehab
24 Jun, 2021
1 commit
-
Smatch static checker warns that "mdev" can be null:
sound/usb/media.c:287 snd_media_device_create()
warn: 'mdev' can also be NULLIf CONFIG_MEDIA_CONTROLLER is disabled, this file should not be included
in the build.The below conditions in the sound/usb/Makefile are in place to ensure that
media.c isn't included in the build.sound/usb/Makefile:
snd-usb-audio-$(CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER) += media.oselect SND_USB_AUDIO_USE_MEDIA_CONTROLLER if MEDIA_CONTROLLER &&
(MEDIA_SUPPORT=y || MEDIA_SUPPORT=SND_USB_AUDIO)The following config check in include/media/media-dev-allocator.h is
in place to enable the API only when CONFIG_MEDIA_CONTROLLER and
CONFIG_USB are enabled.#if defined(CONFIG_MEDIA_CONTROLLER) && defined(CONFIG_USB)
This check doesn't work as intended when CONFIG_USB=m. When CONFIG_USB=m,
CONFIG_USB_MODULE is defined and CONFIG_USB is not. The above config check
doesn't catch that CONFIG_USB is defined as a module and disables the API.
This results in sound/usb enabling Media Controller specific ALSA driver
code, while Media disables the Media Controller API.Fix the problem requires two changes:
1. Change the check to use IS_ENABLED to detect when CONFIG_USB is enabled
as a module or static. Since CONFIG_MEDIA_CONTROLLER is a bool, leave
the check unchanged to be consistent with drivers/media/Makefile.2. Change the drivers/media/mc/Makefile to include mc-dev-allocator.o
in mc-objs when CONFIG_USB is enabled.Link: https://lore.kernel.org/alsa-devel/YLeAvT+R22FQ%2FEyw@mwanda/
Reported-by: Dan Carpenter
Signed-off-by: Shuah Khan
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
17 Jun, 2021
2 commits
-
The saa6588_ioctl() function expects to get called from other kernel
functions with a 'saa6588_command' pointer, but I found nothing stops it
from getting called from user space instead, which seems rather dangerous.The same thing happens in the davinci vpbe driver with its VENC_GET_FLD
command.As a quick fix, add a separate .command() callback pointer for this
driver and change the two callers over to that. This change can easily
get backported to stable kernels if necessary, but since there are only
two drivers, we may want to eventually replace this with a set of more
specialized callbacks in the long run.Fixes: c3fda7f835b0 ("V4L/DVB (10537): saa6588: convert to v4l2_subdev.")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann
Reviewed-by: Laurent Pinchart
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
We have 'struct v4l2_subdev_pad_config' which contains configuration for
a single pad used for the TRY functionality, and an array of those
structs is passed to various v4l2_subdev_pad_ops.I was working on subdev internal routing between pads, and realized that
there's no way to add TRY functionality for routes, which is not pad
specific configuration. Adding a separate struct for try-route config
wouldn't work either, as e.g. set-fmt needs to know the try-route
configuration to propagate the settings.This patch adds a new struct, 'struct v4l2_subdev_state' (which at the
moment only contains the v4l2_subdev_pad_config array) and the new
struct is used in most of the places where v4l2_subdev_pad_config was
used. All v4l2_subdev_pad_ops functions taking v4l2_subdev_pad_config
are changed to instead take v4l2_subdev_state.The changes to drivers/media/v4l2-core/v4l2-subdev.c and
include/media/v4l2-subdev.h were written by hand, and all the driver
changes were done with the semantic patch below. The spatch needs to be
applied to a select list of directories. I used the following shell
commands to apply the spatch:dirs="drivers/media/i2c drivers/media/platform drivers/media/usb drivers/media/test-drivers/vimc drivers/media/pci drivers/staging/media"
for dir in $dirs; do spatch -j8 --dir --include-headers --no-show-diff --in-place --sp-file v4l2-subdev-state.cocci $dir; doneNote that Coccinelle chokes on a few drivers (gcc extensions?). With
minor changes we can make Coccinelle run fine, and these changes can be
reverted after spatch. The diff for these changes is:For drivers/media/i2c/s5k5baf.c:
@@ -1481,7 +1481,7 @@ static int s5k5baf_set_selection(struct v4l2_subdev *sd,
&s5k5baf_cis_rect,
v4l2_subdev_get_try_crop(sd, cfg, PAD_CIS),
v4l2_subdev_get_try_compose(sd, cfg, PAD_CIS),
- v4l2_subdev_get_try_crop(sd, cfg, PAD_OUT)
+ v4l2_subdev_get_try_crop(sd, cfg, PAD_OUT),
};
s5k5baf_set_rect_and_adjust(rects, rtype, &sel->r);
return 0;For drivers/media/platform/s3c-camif/camif-capture.c:
@@ -1230,7 +1230,7 @@ static int s3c_camif_subdev_get_fmt(struct v4l2_subdev *sd,
*mf = camif->mbus_fmt;
break;- case CAMIF_SD_PAD_SOURCE_C...CAMIF_SD_PAD_SOURCE_P:
+ case CAMIF_SD_PAD_SOURCE_C:
/* crop rectangle at camera interface input */
mf->width = camif->camif_crop.width;
mf->height = camif->camif_crop.height;
@@ -1332,7 +1332,7 @@ static int s3c_camif_subdev_set_fmt(struct v4l2_subdev *sd,
}
break;- case CAMIF_SD_PAD_SOURCE_C...CAMIF_SD_PAD_SOURCE_P:
+ case CAMIF_SD_PAD_SOURCE_C:
/* Pixel format can be only changed on the sink pad. */
mf->code = camif->mbus_fmt.code;
mf->width = crop->width;The semantic patch is:
//
// Change function parameter
@@
identifier func;
identifier cfg;
@@func(...,
- struct v4l2_subdev_pad_config *cfg
+ struct v4l2_subdev_state *sd_state
, ...)
{
}// Change function declaration parameter
@@
identifier func;
identifier cfg;
type T;
@@
T func(...,
- struct v4l2_subdev_pad_config *cfg
+ struct v4l2_subdev_state *sd_state
, ...);// Change function return value
@@
identifier func;
@@
- struct v4l2_subdev_pad_config
+ struct v4l2_subdev_state
*func(...)
{
...
}// Change function declaration return value
@@
identifier func;
@@
- struct v4l2_subdev_pad_config
+ struct v4l2_subdev_state
*func(...);// Some drivers pass a local pad_cfg for a single pad to a called function. Wrap it
// inside a pad_state.@@
identifier func;
identifier pad_cfg;
@@
func(...)
{
...
struct v4l2_subdev_pad_config pad_cfg;
+ struct v4l2_subdev_state pad_state = { .pads = &pad_cfg };
}// If the function uses fields from pad_config, access via state->pads
@@
identifier func;
identifier state;
@@
func(...,
struct v4l2_subdev_state *state
, ...)
{
try_fmt
+ state->pads->try_fmt
|
- state->try_crop
+ state->pads->try_crop
|
- state->try_compose
+ state->pads->try_compose
)
...>
}// If the function accesses the filehandle, use fh->state instead
@@
struct v4l2_subdev_fh *fh;
@@
- fh->pad
+ fh->state@@
struct v4l2_subdev_fh fh;
@@
- fh.pad
+ fh.state// Start of vsp1 specific
@@
@@
struct vsp1_entity {
...
- struct v4l2_subdev_pad_config *config;
+ struct v4l2_subdev_state *config;
...
};@@
symbol entity;
@@
vsp1_entity_init(...)
{
...
entity->config =
- v4l2_subdev_alloc_pad_config
+ v4l2_subdev_alloc_state
(&entity->subdev);
...
}@@
symbol entity;
@@
vsp1_entity_destroy(...)
{
...
- v4l2_subdev_free_pad_config
+ v4l2_subdev_free_state
(entity->config);
...
}@exists@
identifier func =~ "(^vsp1.*)|(hsit_set_format)|(sru_enum_frame_size)|(sru_set_format)|(uif_get_selection)|(uif_set_selection)|(uds_enum_frame_size)|(uds_set_format)|(brx_set_format)|(brx_get_selection)|(histo_get_selection)|(histo_set_selection)|(brx_set_selection)";
symbol config;
@@
func(...) {
...
- struct v4l2_subdev_pad_config *config;
+ struct v4l2_subdev_state *config;
...
}// End of vsp1 specific
// Start of rcar specific
@@
identifier sd;
identifier pad_cfg;
@@
rvin_try_format(...)
{
...
- struct v4l2_subdev_pad_config *pad_cfg;
+ struct v4l2_subdev_state *sd_state;
...
- pad_cfg = v4l2_subdev_alloc_pad_config(sd);
+ sd_state = v4l2_subdev_alloc_state(sd);
- v4l2_subdev_free_pad_config(pad_cfg);
+ v4l2_subdev_free_state(sd_state);
...
}// End of rcar specific
// Start of rockchip specific
@@
identifier func =~ "(rkisp1_rsz_get_pad_fmt)|(rkisp1_rsz_get_pad_crop)|(rkisp1_rsz_register)";
symbol rsz;
symbol pad_cfg;
@@func(...)
{
+ struct v4l2_subdev_state state = { .pads = rsz->pad_cfg };
...
- rsz->pad_cfg
+ &state
...
}@@
identifier func =~ "(rkisp1_isp_get_pad_fmt)|(rkisp1_isp_get_pad_crop)";
symbol isp;
symbol pad_cfg;
@@func(...)
{
+ struct v4l2_subdev_state state = { .pads = isp->pad_cfg };
...
- isp->pad_cfg
+ &state
...
}@@
symbol rkisp1;
symbol isp;
symbol pad_cfg;
@@rkisp1_isp_register(...)
{
+ struct v4l2_subdev_state state = { .pads = rkisp1->isp.pad_cfg };
...
- rkisp1->isp.pad_cfg
+ &state
...
}// End of rockchip specific
// Start of tegra-video specific
@@
identifier sd;
identifier pad_cfg;
@@
__tegra_channel_try_format(...)
{
...
- struct v4l2_subdev_pad_config *pad_cfg;
+ struct v4l2_subdev_state *sd_state;
...
- pad_cfg = v4l2_subdev_alloc_pad_config(sd);
+ sd_state = v4l2_subdev_alloc_state(sd);
- v4l2_subdev_free_pad_config(pad_cfg);
+ v4l2_subdev_free_state(sd_state);
...
}@@
identifier sd_state;
@@
__tegra_channel_try_format(...)
{
...
struct v4l2_subdev_state *sd_state;
try_crop
+ sd_state->pads->try_crop
...>
}// End of tegra-video specific
//
Signed-off-by: Tomi Valkeinen
Acked-by: Laurent Pinchart
Acked-by: Sakari Ailus
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
08 Jun, 2021
6 commits
-
The HEVC HANTRO driver needs to know the number of bits to skip at
the beginning of the slice header.
That is a hardware specific requirement so create a dedicated control
for this purpose.Signed-off-by: Benjamin Gaignard
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add decode params control and the associated structure to group
all the information that are needed to decode a reference frame as
is described in ITU-T Rec. H.265 section "8.3.2 Decoding process
for reference picture set".Adapt Cedrus driver to these changes.
Signed-off-by: Benjamin Gaignard
Reviewed-by: Ezequiel Garcia
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add fields and flags as they are defined in
7.4.3.3.1 "General picture parameter set RBSP semantics of the
H.265 ITU specification.Signed-off-by: Benjamin Gaignard
Reviewed-by: Ezequiel Garcia
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
This is an NEC remote control device shipped with some Toshiba TVs.
Signed-off-by: Alexander Voronov
Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab -
sps_max_sub_layers_minus1 is needed if the driver wishes to determine
whether or not a frame might be used for reference.Signed-off-by: John Cox
Reviewed-by: Benjamin Gaignard
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
On some platforms a video device can capture either video data or
metadata. The driver can implement vidioc functions for both video and
metadata, and use a single vb2_queue for the buffers. However, vb2_queue
requires choosing a single buffer type, which conflicts with the idea of
capturing either video or metadata.The buffer type of vb2_queue can be changed, but it's not obvious how
this should be done in the drivers. To help this, add a new helper
function vb2_queue_change_type() which ensures the correct checks and
documents how it can be used.Signed-off-by: Tomi Valkeinen
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
24 May, 2021
8 commits
-
Until now, the MPEG-2 V4L2 API was not exported as a public API,
and only defined in a private media header (media/mpeg2-ctrls.h).After reviewing the MPEG-2 specification in detail, and reworking
the controls so they match the MPEG-2 semantics properly,
we can consider it ready.Signed-off-by: Ezequiel Garcia
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Move the MPEG-2 stateless control types out of staging,
and re-number it to avoid any confusion.Signed-off-by: Ezequiel Garcia
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The Hantro and Cedrus drivers work in frame-mode,
meaning they expect all the slices in a picture (either frame
or field structure) to be passed in each OUTPUT buffer.These two are the only V4L2 MPEG-2 stateless decoders currently
supported. Given the VA-API drivers also work per-frame,
coalescing all the MPEG-2 slices in a buffer before the decoding
operation, it makes sense to not expect slice-mode drivers and
therefore remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS.This is done to avoid carrying an unused interface. If needed,
this control can be added without breaking backwards compatibility.
Note that this would mean introducing a enumerator control to
specify the decoding mode (see V4L2_CID_STATELESS_H264_DECODE_MODE).Signed-off-by: Ezequiel Garcia
Co-developed-by: Nicolas Dufresne
Signed-off-by: Nicolas Dufresne
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The forward and backwards references are specified per-picture
and not per-slice. Move it to V4L2_CID_MPEG_VIDEO_MPEG2_PICTURE.Signed-off-by: Ezequiel Garcia
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Typically, bitstreams are composed of a sequence header,
followed by a number of picture header and picture coding extension
headers. Each picture can be composed of a number of slices.Let's split the MPEG-2 uAPI to follow these semantics more closely,
allowing more usage flexibility. Having these controls split up
allows applications to set a sequence control at the beginning
of a sequence, and then set a picture control for each frame.While here add padding fields where needed, and document
the uAPI header thoroughly.Note that the V4L2_CTRL_TYPE_{} defines had to be moved because
it clashes with existing ones. This is not really an issue
since they will be re-defined when the controls are moved
out of staging.Signed-off-by: Ezequiel Garcia
Tested-by: Jonas Karlman
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Our current MPEG-2 uAPI uses 1-byte fields for MPEG-2
boolean syntax elements. Clean these by adding a 'flags'
field and flag macro for each boolean syntax element.A follow-up change will refactor this uAPI so we don't need
to add padding fields just yet.Signed-off-by: Ezequiel Garcia
Tested-by: Jonas Karlman
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
As stated in the MPEG-2 specification, section 6.3.7 "Quant matrix
extension":Each quantisation matrix has a default set of values. When a
sequence_header_code is decoded all matrices shall be reset to
their default values. User defined matrices may be downloaded
and this can occur in a sequence_header() or in a
quant_matrix_extension().The load_intra_quantiser_matrix syntax elements are transmitted
in the bitstream headers, signalling that a quantisation matrix
needs to be loaded and used for pictures transmitted afterwards
(until the matrices are reset).This "load" semantics are implemented in the V4L2 interface
without the need of any "load" flags: passing the control
is effectively a load.Therefore, rework the V4L2_CID_MPEG_VIDEO_MPEG2_QUANTISATION
semantics to match the MPEG-2 semantics. Quantisation matrices
values are now initialized by the V4L2 control core to their
reset default value, and applications are expected to reset
their values as specified.The quantisation control is therefore optional, and used to
load bitstream-defined values in the quantisation matrices.Signed-off-by: Ezequiel Garcia
Co-developed-by: Nicolas Dufresne
Signed-off-by: Nicolas Dufresne
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The MPEG-2 specification refers to the quantisation matrices
using the word "quantisation". Make the V4L2 interface more
ergonomic by matching the MPEG-2 spec.Signed-off-by: Ezequiel Garcia
Tested-by: Jernej Skrabec
Reviewed-by: Jernej Skrabec
Tested-by: Daniel Almeida
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
21 May, 2021
1 commit
-
The tango platform was removed, so the driver is no longer needed.
Cc: Marc Gonzalez
Acked-by: Rob Herring
Acked-by: Mans Rullgard
Signed-off-by: Arnd Bergmann
Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab
19 May, 2021
1 commit
-
Dependent slice segment flag for PPS control is misnamed. It should have
"enabled" at the end. It only tells if this flag is present in slice
header or not and not the actual value.Fix this by renaming the PPS flag and introduce another flag for slice
control which tells actual value.Signed-off-by: Jernej Skrabec
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
29 Apr, 2021
1 commit
-
Pull media updates from Mauro Carvalho Chehab:
- addition of a maintainer's profile for the media subsystem
- addition of i.MX8 IP support
- qcom/camss gained support for hardware version Titan 170
- new RC keymaps
- Lots of other improvements, cleanups and bug fixes
* tag 'media/v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (488 commits)
media: coda: fix macroblocks count control usage
media: rkisp1: params: fix wrong bits settings
media: cedrus: Fix H265 status definitions
media: meson-ge2d: fix rotation parameters
media: v4l2-ctrls: fix reference to freed memory
media: venus : hfi: add venus image info into smem
media: venus: Fix internal buffer size calculations for v6.
media: venus: helpers: keep max bandwidth when mbps exceeds the supported range
media: venus: fix hw overload error log condition
media: venus: core: correct firmware name for sm8250
media: venus: core,pm: fix potential infinite loop
media: venus: core: Fix kerneldoc warnings
media: gscpa/stv06xx: fix memory leak
media: cx25821: remove unused including
media: staging: media/meson: remove redundant dev_err call
media: adv7842: support 1 block EDIDs, fix clearing EDID
media: adv7842: configure all pads
media: allegro: change kernel-doc comment blocks to normal comments
media: camss: ispif: Remove redundant dev_err call in msm_ispif_subdev_init()
media: i2c: rdamc21: Fix warning on u8 cast
...
15 Apr, 2021
1 commit
-
When controls are used together with the Request API, then for
each request a v4l2_ctrl_handler struct is allocated. This contains
the controls that can be set in a request. If a control is *not* set in
the request, then the value used in the most recent previous request
must be used, or the current value if it is not found in any outstanding
requests.The framework tried to find such a previous request and it would set
the 'req' pointer in struct v4l2_ctrl_ref to the v4l2_ctrl_ref of the
control in such a previous request. So far, so good. However, when that
previous request was applied to the hardware, returned to userspace, and
then userspace would re-init or free that request, any 'ref' pointer in
still-queued requests would suddenly point to freed memory.This was not noticed before since the drivers that use this expected
that each request would always have the controls set, so there was
never any need to find a control in older requests. This requirement
was relaxed, and now this bug surfaced.It was also made worse by changeset
2fae4d6aabc8 ("media: v4l2-ctrls: v4l2_ctrl_request_complete() should always set ref->req")
which increased the chance of this happening.The use of the 'req' pointer in v4l2_ctrl_ref was very fragile, so
drop this entirely. Instead add a valid_p_req bool to indicate that
p_req contains a valid value for this control. And if it is false,
then just use the current value of the control.Note that VIDIOC_G_EXT_CTRLS will always return -EACCES when attempting
to get a control from a request until the request is completed. And in
that case, all controls in the request will have the control value set
(i.e. valid_p_req is true). This means that the whole 'find the most
recent previous request containing a control' idea is pointless, and
the code can be simplified considerably.The v4l2_g_ext_ctrls_common() function was refactored a bit to make
it more understandable. It also avoids updating volatile controls
in a completed request since that was already done when the request
was completed.Signed-off-by: Hans Verkuil
Fixes: 2fae4d6aabc8 ("media: v4l2-ctrls: v4l2_ctrl_request_complete() should always set ref->req")
Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support")
Cc: # for v5.9 and up
Tested-by: Alexandre Courbot
Signed-off-by: Mauro Carvalho Chehab
09 Apr, 2021
1 commit
-
Add keymaps and bindings for the simple IR (NEC) remotes used with
the MeCool KII-Pro and MeCool KIII-Pro Android STB devices.Tested-by: Drazen Spio
Signed-off-by: Christian Hewitt
Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab
06 Apr, 2021
4 commits
-
Introduce Content light level and Mastering display colour
volume Colorimetry compound controls with relevant payload
structures and validation.Signed-off-by: Stanimir Varbanov
Reviewed-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Rename v4l2_async_register_subdev_sensor_common as
v4l2_async_register_subdev_sensor. This is a part of the effort to make
the long names present in V4L2 fwnode and async frameworks shorter.Signed-off-by: Sakari Ailus
Reviewed-by: Ezequiel Garcia
Signed-off-by: Mauro Carvalho Chehab -
Rename v4l2_async_notifier_parse_fwnode_sensor_common() as
v4l2_async_notifier_parse_fwnode_sensor() and make the function static, as
it's not used by a driver and maybe never will.Signed-off-by: Sakari Ailus
Reviewed-by: Ezequiel Garcia
Signed-off-by: Mauro Carvalho Chehab -
It was always assumed that walking the media graph would require holding
the media_device graph_mutex but this was not documented nor checked for.Add a lockdep check to graph walk init and iter, and document the need for
acquiring the graph_mutex.Signed-off-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab