summaryrefslogtreecommitdiff
path: root/drivers/staging/media/ipu3/ipu3-css-fw.c
AgeCommit message (Collapse)AuthorFilesLines
2024-04-22media: staging: ipu3-imgu: Update firmware pathSakari Ailus1-1/+3
Use the current firmware path in linux-firmware repository. Check the older paths still in order to avoid causing issues to the users. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2022-04-24media: staging: media: ipu3-imgu: Request specific firmware binarySakari Ailus1-1/+3
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>
2021-09-30media: staging/intel-ipu3: css: Fix wrong size comparison imgu_css_fw_initGustavo A. R. Silva1-4/+3
There is a wrong comparison of the total size of the loaded firmware css->fw->size with the size of a pointer to struct imgu_fw_header. Turn binary_header into a flexible-array member[1][2], use the struct_size() helper and fix the wrong size comparison. Notice that the loaded firmware needs to contain at least one 'struct imgu_fw_info' item in the binary_header[] array. It's also worth mentioning that "css->fw->size < struct_size(css->fwp, binary_header, 1)" with binary_header declared as a flexible-array member is equivalent to "css->fw->size < sizeof(struct imgu_fw_header)" with binary_header declared as a one-element array (as in the original code). The replacement of the one-element array with a flexible-array member also helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Fixes: 09d290f0ba21 ("media: staging/intel-ipu3: css: Add support for firmware management") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-05-29media: staging: imgu: Remove redundant checksSakari Ailus1-4/+2
Remove redundant checks for less than zero on unsigned variables. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Rajmohan Mani <rajmohan.mani@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-02-18media: ipu3-imgu: Prefix functions with imgu_* instead of ipu3_*Yong Zhi1-9/+9
This addresses the below TODO item, no function related changes: - Prefix imgu for all public APIs, i.e. change ipu3_v4l2_register() to imgu_v4l2_register(). (Sakari) The changes were obtained by applying the following perl script to driver code under drivers/staging/media/ipu3/. perl -pi.back -e 's/ipu3_(?!uapi)/imgu_/g;' Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-17media: staging/intel-ipu3: Add dual pipe supportBingbu Cao1-5/+6
This patch adds support to run dual pipes simultaneously. A private ioctl to configure the pipe mode (video or still) is also implemented. IPU3 hardware supports a maximum of 2 streams per pipe. With the support of dual pipes, more than 2 stream outputs can be achieved. This helps to support advanced camera features like Continuous View Finder (CVF) and Snapshot During Video(SDV). Extend ipu3 IMGU driver to support dual pipes 1. Extend current IMGU device to contain 2 groups of video nodes and 2 subdevs 2. Extend current css to support 2 pipeline and make CSS APIs to support 2 pipe 3. Add a v4l2 ctrl to allow user to specify the mode of the pipe 4. Check media pipeline link status to get enabled pipes Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Tian Shu Qiu <tian.shu.qiu@intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-14media: staging/intel-ipu3: css: Add support for firmware managementYong Zhi1-0/+264
Introduce functions to load and install ImgU FW blobs. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>