- 26 May, 2023 5 commits
-
-
Yunfei Dong authored
There are so many lat buffer in core context list, some instances maybe be scheduled for a very long time. Moving the core context to each instance, it only be used to control lat buffer of each instance. And the core work queue of each instance is scheduled by system. Fixes: 2cfca6c1 ("media: mediatek: vcodec: move lat_buf to the top of core list") Signed-off-by:
Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Yunfei Dong authored
Adding the definition of decoder status to separate different decoder period for core hardware. core_work_cnt is the number of core work queued to work queue, the control is very complex, leading to some unreasonable test result. Using parameter status to indicate whether queue core work to work queue. Fixes: 2e0ef56d ("media: mediatek: vcodec: making sure queue_work successfully") Signed-off-by:
Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Yunfei Dong authored
Since the LAT decoder works faster than its CORE, getting the trans buffer may be done only after CORE finishes processing: avoid printing an error if the decode function returns -EAGAIN, as this means that the buffer from CORE is not yet available, but will be at a later time. Also change the log level for calls to vdec_msg_queue_dqbuf() in H264 and VP9 LAT decoder drivers to avoid excessive logging. Signed-off-by:
Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Hans Verkuil authored
Initialize hs_settle to 0 to avoid this compiler warning: imx8mq-mipi-csi2.c: In function 'imx8mq_mipi_csi_start_stream.part.0': imx8mq-mipi-csi2.c:91:55: warning: 'hs_settle' may be used uninitialized [-Wmaybe-uninitialized] 91 | #define GPR_CSI2_1_S_PRG_RXHS_SETTLE(x) (((x) & 0x3f) << 2) | ^~ imx8mq-mipi-csi2.c:357:13: note: 'hs_settle' was declared here 357 | u32 hs_settle; | ^~~~~~~~~ It's a false positive, but it is too complicated for the compiler to detect that. Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by:
Martin Kepplinger <martink@posteo.de> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Vaishnav Achath authored
While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev sinks, the check is_media_entity_v4l2_subdev() was not removed which prevented the function from being used with non-subdev sinks, Drop the unnecessary check. Fixes: bd5a03bc ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()") Signed-off-by:
Vaishnav Achath <vaishnav.a@ti.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>
-
- 25 May, 2023 35 commits
-
-
Alain Volmat authored
When CONFIG_OF is not set, "of_match_ptr(<match_table>)" compiles to NULL, which leaves <match_table> unused, leading to warning such as: drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c:1175:34: warning: unused variable 'c8sectpfe_match' [-Wunused-const-variable] Drop the of_match_ptr usage to avoid such warning. Reported-by:
kernel test robot <lkp@intel.com> Signed-off-by:
Alain Volmat <avolmat@me.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Dmitry Torokhov authored
This switches the driver from using legacy gpio API and to the newer gpiod API. Since ordinary gpiod APIs operate on logical and not electrical levels, handling of the reset GPIO is adjusted accordingly. Signed-off-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Niklas Söderlund authored
Add support for R-Car V4H. The V4H uses the ISP Channel Selector as its only possible video input source. Even tho V4H is a Gen3 board the VIN interface is very close to the one found on the V3U, for this reason mark it as a Gen3 model internally. Signed-off-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Niklas Söderlund authored
Add support for R-Car V4H. The ISP Channel Selector is used to route channels to the different VIN modules. The ISP CS found in the V4H is very similar to the one found on the V3U. Signed-off-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Niklas Söderlund authored
Add basic support for outputting the test patterns on a 3-lane CSI-2 C-PHY bus. As the driver only can output frames form its internal test pattern generator, enabling C-PHY output is as simple as setting the output mode to C-PHY instead of D-PHY. Signed-off-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> [Sakari Ailus: Wrap long lines.] Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Laurent Pinchart authored
Use the __imx7_csi_video_try_fmt() helper function to initialize the default format at probe time. This improves consistency by using the same code path for both default initialization and validation at runtime, and allows dropping the now unused imx7_csi_find_pixel_format() function. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Alexander Stein authored
The driver unconditionally aligns the image width to multiples of 8 pixels. The real alignment constraint is 8 bytes, as indicated by the CSI_IMAG_PARA.IMAGE_WIDTH documentation that calls for 8 pixel alignment for 8bpp formats and 4 pixel alignment for other formats. Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Alexander Stein authored
The driver doesn't currently support interlacing, but due to legacy leftovers, it accepts values for the pixel format "field" field other than V4L2_FIELD_NONE. Fix it by hardcoding V4L2_FIELD_NONE. Proper interlacing support can be implemented later if desired. Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Alexander Stein authored
There is no need to convert input pixformat to mbus_framefmt and back again. Instead apply pixformat width constrains directly. Assign compose values before adjusting pixformat height/width. Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Martin Kepplinger authored
pm_runtime_get_if_in_use() does not only return nonzero values when the device is in use, it can return a negative errno too. And especially during resuming from system suspend, when runtime pm is not yet up again, -EAGAIN is being returned, so the subsequent pm_runtime_put() call results in a refcount underflow. Fix system-resume by handling -EAGAIN of pm_runtime_get_if_in_use(). Signed-off-by:
Martin Kepplinger <martin.kepplinger@puri.sm> Fixes: e8c08826 ("media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera") Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Niklas Söderlund authored
Gen4 will support both D-PHY and C-PHY, while Gen3 only supports D-PHY. Add two flags to the device information structure to be able to record what each SoC supports. Extend the device node parsing to accept both CSI_2 D-PHY and C-PHY buses, while at the same time taking the SoC support into account. Signed-off-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> [Sakari Ailus: Line wrap.] Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Niklas Söderlund authored
Prepare the driver for supporting R-Car Gen4. The starting of the receiver and how to enter standby differs between Gen3 and Gen4, create function pointers in the device info structure to control the different behavior. Signed-off-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Bingbu Cao authored
Add v4l2 device driver for OmniVision ov01a10 image sensor, ov01a10 image sensor can deliver 1280x800 resolution BGGR10 images at 60 fps. Signed-off-by:
Yating Wang <yating.wang@intel.com> Signed-off-by:
Bingbu Cao <bingbu.cao@intel.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Geert Uytterhoeven authored
On R-Car M2-W: rcar_fdp1 fe940000.fdp1: FDP1 Unidentifiable (0x02010101) rcar_fdp1 fe944000.fdp1: FDP1 Unidentifiable (0x02010101) Although the IP Internal Data Register on R-Car Gen2 is documented to contain all zeros, the actual register contents seem to match the FDP1 version ID of R-Car H3 ES1.*, which has just been removed. Fortunately this version is not used for any other purposes yet. Fix this by re-adding the ID, now using an R-Car Gen2-specific name. Fixes: af4273b4 ("media: renesas: fdp1: remove R-Car H3 ES1.* handling") Signed-off-by:
Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by:
Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Daniel Scally authored
When setting formats on the sink pad, propagate the adjusted format over to the subdev's source pad. Use the MIPID02_SOURCE macro to fetch the pad's try format rather than relying on the pad field of the format to facilitate this - the function is specific to the source pad anyway. Signed-off-by:
Daniel Scally <dan.scally@ideasonboard.com> [Sakari Ailus: Line wrap, fix subject] Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Daniel Scally authored
Format propagation in the st-mipid02 driver is incorrect in that when setting format for V4L2_SUBDEV_FORMAT_TRY on the source pad, the _active_ rather than _try_ format from the sink pad is propagated. This causes problems with format negotiation - update the function to propagate the correct format. Fixes: 642bb5e8 ("media: st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver") Signed-off-by:
Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Alexander Stein authored
Although media_entity_pads_init has been called, a call to media_entity_cleanup in the cleanup code was missing. Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Krzysztof Kozlowski authored
Statically allocated array of pointers to hwmon_channel_info can be made const for safety. Reviewed-by:
Matt Ranostay <matt.ranostay@konsulko.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Jacopo Mondi authored
The ov5640_update_pixel_rate() function handles the parallel and MIPI CSI-2 cases separately. When running on a parallel setup the V4L2_CID_PIXEL_RATE value is calculated at the beginning of the function using the values configured with the frame_interval operations, and then the function immediately returns. The remaining of the function handles the MIPI CSI-2 configuration and should not use the 'current_fr' and 'def_fps' fields as those are only relevant for parallel mode. Drop a small section of dead code that updates vblank using frame_interval on a MIPI CSI-2 setup. Signed-off-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Jacopo Mondi authored
The 'current framerate' parameter passed to ov5640_try_fmt_internal() is unsued. Drop it. Signed-off-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Guoniu.zhou authored
When OV5640 work at DVP mode, the default initialization settings make it output 30 frames per second. But when it work at CSI-2 mode the default link frequency will make it output 60 frames per second, so correct the comments to make it more clear. Signed-off-by:
Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Niklas Söderlund authored
The MAX96712 can support both a CSI-2 C-PHY and D-PHY bus. The initial staging driver however only supported D-PHY and the bus-type property was left optional. In preparation for adding C-PHY support to the staging driver make the bus-type property mandatory as it is needed to select the correct PHY mode. Without the bus-type property present, the driver falls-back to D-PHY mode, so the change is functionally backward compatible with old DTS files lacking the property. The only in-tree DTS file (renesas/r8a779a0-falcon-csi-dsi.dtsi) that lacked the property uses D-PHY and have been updated. Signed-off-by:
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by:
Conor Dooley <conor.dooley@microchip.com> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Shravan Chippa authored
Update pixel_rate and link frequency for 1920x1080@30 while changing mode. Update vblank value while changing mode Add support to handle multiple link frequencies. Add dummy ctrl cases for pixel_rate and link frequency to avoid error while changing the modes dynamically. Update default link frequency from device tree max link frequency value. Update init_cfg() function to update the link frequency menu_skip_mask value. Suggested-by:
Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by:
Shravan Chippa <shravan.chippa@microchip.com> [Sakari Ailus: Document menu_skip_mask, remove extra blank line.] Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
The argument of the to_sensor_asd() is called the same as the field name for the container_of() macro, so it only works if the argument name is "asd". Fix it. Also switch to container_of_const(). Reviewed-by:
Bingbu Cao <bingbu.cao@intel.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
The value of the V4L2_SUBDEV_ROUTE_FL_ACTIVE is 1, not 0. Use hexadecimal numbers as is done elsewhere in the documentation. Cc: stable@vger.kernel.org # for >= v6.3 Fixes: ea73eda5 ("media: Documentation: Add GS_ROUTING documentation") Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Krzysztof Kozlowski authored
Match unit-address to first reg entry. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Acked-by:
Rob Herring <robh@kernel.org> Reviewed-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Christophe JAILLET authored
dev_err_probe() already display the error code. There is no need to duplicate it explicitly in the error message. Signed-off-by:
Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by:
Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
Use unsigned int values annoted by "U" for u32 fields. While this is a good practice, there doesn't appear to be a bug that this patch would fix. The patch has been generated using the following command: perl -i -pe 's/\([0-9]+\K <</U <</g; s/\|\s*0\K\)/U\)/' \ include/uapi/linux/media.h Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
Rename meta format files, using "metafmt" prefix instead of "pixfmt-meta". These are metadata formats, not pixel formats. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Bingbu Cao <bingbu.cao@intel.com> Cc: Dafna Hirschfeld <dafna@fastmail.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
Use the pad flag specifying the pad type instead of a boolean in preparation for internal source pads. Also make the loop variable unsigned. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
Use the endpoint fwnode to find out the remote pad, instead of using the first source pad found. Also improve error messages. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Bingbu Cao <bingbu.cao@intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
fwnode_graph_parse_endpoint() fwnode argument is now const, therefore make media_entity_get_fwnode_pad() fwnode argument const as well. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Sakari Ailus authored
Document how rotation and orientation should be taken into account in writing camera sensor drivers. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Jack Zhu authored
Update Rockchip ISP1 driver file path Signed-off-by:
Jack Zhu <jack.zhu@starfivetech.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Dan Carpenter authored
The "& IMX296_TMDOUT_MASK" means that "tmdout" can't be negative so the error checking will not work. Fixes: cb33db2b ("media: i2c: IMX296 camera sensor driver") Signed-off-by:
Dan Carpenter <error27@gmail.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-