- Feb 28, 2022
-
-
Benjamin Gaignard authored
HEVC uAPI is used by 2 mainline drivers (Hantro, Cedrus) and at least 2 out-of-tree drivers (rkvdec, RPi). The uAPI has reviewed so it is time to make it 'public' by un-staging it. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
'F.7.3.6.1 General slice segment header syntax' section of HEVC specification describes that a slice header always end byte aligned, therefore we only need to provide the data offset in byte. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Fix padding where needed to remove holes and stay align on cache boundaries Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Hantro hardware needs a dedicated v4l2 control to perform HEVC decoding. Move it to a dedicated header file to prepare HEVC uAPI un-staging. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Simply print the type of the control. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Move the HEVC stateless controls types out of staging, and re-number them. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
The number of 'entry point offset' could be very variable. Rather than use a large static array define a v4l2 dynamic array of U32 (V4L2_CTRL_TYPE_U32). The number of entry point offsets is reported by the elems field and in struct v4l2_ctrl_hevc_slice_params.num_entry_point_offsets field. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Move HEVC pixel format since we are ready to stabilize the uAPI Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Make explicit that V4L2_CID_STATELESS_HEVC_SLICE_PARAMS control is a dynamic array control type. Some drivers may be able to receive multiple slices in one control to improve decoding performance. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Add kernel-doc documentation for all the HEVC structures. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Change HEVC stateless controls names to V4L2_CID_STATELESS_HEVC instead of V4L2_CID_MPEG_VIDEO_HEVC be coherent with v4l2 naming convention. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Complete the HEVC controls with missing fields from H.265 specifications. Even if these fields aren't used by the current mainlined drivers they will be need for (at least) rkvdec driver. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
- Feb 25, 2022
-
-
Add a dynamic array test control to help test support for this feature. Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Implement support for dynamically allocated arrays. Most of the changes concern keeping track of the number of elements of the array and the number of elements allocated for the array and reallocating memory if needed. Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Add a new flag that indicates that this control is a dynamically sized array. Also document this flag. Currently dynamically sized arrays are limited to one dimensional arrays, but that might change in the future if there is a need for it. The initial use-case of dynamic arrays are stateless codecs. A frame can be divided in many slices, so you want to provide an array containing slice information for each slice. Typically the number of slices is small, but the standard allow for hundreds or thousands of slices. Dynamic arrays are a good solution since sizing the array for the worst case would waste substantial amounts of memory. Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
There are two decoders on the i.MX8M Mini controlled by the vpu-blk-ctrl. The G1 supports H264 and VP8 while the G2 support HEVC and VP9. Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by:
Lucas Stach <l.stach@pengutronix.de>
-
The i.MX8MM has a Hantro G1 video decoder similar to the imx8mq but lacks the post-processor present in the imx8mq. Add support in the driver for it with the post-processing removed. Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
The i.MX8M mini appears to have a similar G1 decoder but the post-processing isn't present, so different compatible flag is required. Since all the other parameters are the same with imx8mq, just add the new compatible flag to nxp,imx8mq-vpu.yaml. Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
The vpumix power domain has a reset assigned to it, however when used, it causes a system hang. Testing has shown that it does not appear to be needed anywhere. Fixes: d39d4bb1 ("arm64: dts: imx8mm: add GPC node") Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Lucas Stach <l.stach@pengutronix.de>
-
With the Hantro G1 and G2 now setup to run independently, update the device tree to allow both to operate. This requires the vpu-blk-ctrl node to be configured. Since vpu-blk-ctrl needs certain clock enabled to handle the gating of the G1 and G2 fuses, the clock-parents and clock-rates for the various VPU's to be moved into the pgc_vpu because they cannot get re-parented once enabled, and the pgc_vpu is the highest in the chain. Signed-off-by:
Adam Ford <aford173@gmail.com> Reported-by:
kernel test robot <lkp@intel.com> Reviewed-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by:
Lucas Stach <l.stach@pengutronix.de>
-
The VPU in the i.MX8MQ is really the combination of Hantro G1 and Hantro G2. With the updated vpu-blk-ctrl, the power domains system can enable and disable them separately as well as pull them out of reset. This simplifies the code and lets them run independently while still retaining backwards compatibility with older device trees for those using G1. Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
The G1 and G2 are independent and separate decoder blocks that are enabled by the vpu-blk-ctrl power-domain controller, which now has a proper driver. Because these blocks only share the power-domain, and can be independently fused out, update the bindings to support separate nodes for the G1 and G2 decoders with vpu-blk-ctrl power-domain support. The new DT + old kernel isn't a supported configuration. Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Rob Herring <robh@kernel.org> Reviewed-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
This adds the necessary bits to drive the VPU blk-ctrl on the i.MX8MQ, to avoid putting more of this functionality into the decoder driver. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Signed-off-by:
Adam Ford <aford173@gmail.com>
-
This adds the DT binding for the i.MX8MQ VPU blk-ctrl. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Rob Herring <robh@kernel.org>
-
This adds the defines for the power domains provided by the VPU blk-ctrl on the i.MX8MQ. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Acked-by:
Rob Herring <robh@kernel.org>
-
The vpu is enabled by default, so there is no need to manually enable it. Signed-off-by:
Adam Ford <aford173@gmail.com> Reviewed-by:
Lucas Stach <l.stach@pengutronix.de> Reviewed-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by:
Alexander Stein <alexander.stein@ew.tq-group.com>
-
- Feb 17, 2022
-
-
Laurent Pinchart authored
Replace the driver-specific definitions of MIPI CSI-2 data types with macros from mipi-csi2.h. Signed-off-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Laurent Pinchart authored
Replace the hardcoded MIPI CSI-2 data types with macros from mipi-csi2.h. Signed-off-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Laurent Pinchart authored
Replace the hardcoded MIPI CSI-2 data types with macros from mipi-csi2.h. Signed-off-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Laurent Pinchart authored
There are many CSI-2-related drivers in the media subsystem that come with their own macros to handle the CSI-2 data types (or just hardcode the numerical values). Provide a shared header with definitions for those data types that driver can use. Signed-off-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by:
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Nikita Yushchenko authored
VSP hardware could be used (e.g. by the bootloader) before driver load, and some interrupts could be left in enabled and pending state. In this case, setting up VSP interrupt handler without masking interrupts before causes interrupt handler to be immediately called (and crash due to null vsp->info dereference). Fix that by explicitly masking all interrupts before setting the interrupt handler. To do so, have to set the interrupt handler later, after hw revision is already detected and number of interrupts to mask gets known. Based on patch by Koji Matsuoka <koji.matsuoka.xm@renesas.com> included in the Renesas BSP kernel. Signed-off-by:
Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by:
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Paul Pawlowski authored
Adds the requisite device id to support detection of the Apple FaceTime HD webcam exposed over the T2 BCE VHCI interface. Tested-by:
Aun-Ali Zaidi <admin@kodeit.net> Signed-off-by:
Paul Pawlowski <paul@mrarm.io> Signed-off-by:
Aun-Ali Zaidi <admin@kodeit.net> Signed-off-by:
Aditya Garg <gargaditya08@live.com> Reviewed-by:
Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Alexander Stein authored
Without this the default (SMPTE 170M) from init_cfg stays unchanged. Even after configuring 'srgb' colorspace (or 'raw') $ media-ctl -V "'csis-32e30000.mipi-csi':0 [colorspace:srgb]" the colorspace does not change at all: $ media-ctl --get-v4l2 "'csis-32e30000.mipi-csi':0" [fmt:SRGGB10_1X10/1920x1080 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range] Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Zhou Qingyang authored
In cal_ctx_v4l2_init_formats(), devm_kzalloc() is assigned to ctx->active_fmt and there is a dereference of it after that, which could lead to NULL pointer dereference on failure of devm_kzalloc(). Fix this bug by adding a NULL check of ctx->active_fmt. This bug was found by a static analyzer. Builds with 'make allyesconfig' show no new warnings, and our static analyzer no longer warns about this code. Fixes: 71681550 ("media: ti-vpe: cal: Move format handling to cal.c and expose helpers") Signed-off-by:
Zhou Qingyang <zhou1615@umn.edu> Reviewed-by:
Pratyush Yadav <p.yadav@ti.com> Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Dan Carpenter authored
This error path needs to drop the mutex to avoid a deadlock. Fixes: 7be91e02 ("media: i2c: Add ov08d10 camera sensor driver") Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Bingbu Cao authored
MWB gain register are used to set gain for each mwb channel mannually. However, it will involve some artifacts at low light environment as gain cannot be applied to each channel synchronously. Update the driver to use group write for digital gain to make the sure RGB digital gain be applied together at frame boundary. Signed-off-by:
Bingbu Cao <bingbu.cao@intel.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Martin Kepplinger authored
link-frequencies is required but only mentioned in the example. Add it to the description. Fixes: f3ce7200 ("media: dt-bindings: media: document SK Hynix Hi-846 MIPI CSI-2 8M pixel sensor") Signed-off-by:
Martin Kepplinger <martin.kepplinger@puri.sm> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Martin Kepplinger authored
This fixes "make dt_binding_check": Documentation/devicetree/bindings/media/i2c/hynix,hi846.example.dt.yaml: camera@20: port:endpoint: Unevaluated properties are not allowed ('link-frequencies', 'data-lanes' were unexpected) From schema: Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml [Sakari Ailus: Reword commit message] Fixes: f3ce7200 ("media: dt-bindings: media: document SK Hynix Hi-846 MIPI CSI-2 8M pixel sensor") Reported-by:
Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Martin Kepplinger <martin.kepplinger@puri.sm> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Kees Cook authored
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Wrap the target region in struct_group(). This additionally fixes a theoretical misalignment of the copy (since the size of "buf" changes between 64-bit and 32-bit, but this is likely never built for 64-bit). FWIW, I think this code is totally broken on 64-bit (which appears to not be a "real" build configuration): it would either always fail (with an uninitialized data->buf_size) or would cause corruption in userspace due to the copy_to_user() in the call path against an uninitialized data->buf value: omap3isp_stat_request_statistics_time32(...) struct omap3isp_stat_data data64; ... omap3isp_stat_request_statistics(stat, &data64); int omap3isp_stat_request_statistics(struct ispstat *stat, struct omap3isp_stat_data *data) ... buf = isp_stat_buf_get(stat, data); static struct ispstat_buffer *isp_stat_buf_get(struct ispstat *stat, struct omap3isp_stat_data *data) ... if (buf->buf_size > data->buf_size) { ... return ERR_PTR(-EINVAL); } ... rval = copy_to_user(data->buf, buf->virt_addr, buf->buf_size); Regardless, additionally initialize data64 to be zero-filled to avoid undefined behavior. Link: https://lore.kernel.org/lkml/20211215220505.GB21862@embeddedor Cc: Arnd Bergmann <arnd@arndb.de> Fixes: 378e3f81 ("media: omap3isp: support 64-bit version of omap3isp_stat_data") Cc: stable@vger.kernel.org Reviewed-by:
Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by:
Kees Cook <keescook@chromium.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>
-
Laurent Pinchart authored
MIPI CSI-2 continuous and non-continuous clock modes are mutually exclusive. Drop the V4L2_MBUS_CSI2_CONTINUOUS_CLOCK flag and use V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK only. 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>
-