#
d1f3bed6 |
|
02-Aug-2023 |
Kate Hsuan <hpa@redhat.com> |
media: atomisp: sh_css_sp: Remove #ifdef ISP2401 to make driver generic Removed #ifdef ISP2401 to make the driver generic. The uncessary codes were removed and the types of the ISP is determines in runtime. Link: https://lore.kernel.org/r/20230802095606.1298152-8-hpa@redhat.com Signed-off-by: Kate Hsuan <hpa@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
#
f6675353 |
|
12-Jul-2023 |
Kate Hsuan <hpa@redhat.com> |
media: atomisp: ifmtr: Removed #if defined(ISP2401) to make driver generic Removed #if defined(ISP2401) to make driver generic. Link: https://lore.kernel.org/r/20230713100231.308923-9-hpa@redhat.com Signed-off-by: Kate Hsuan <hpa@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
#
9e2a90d7 |
|
30-Jul-2023 |
Hans de Goede <hdegoede@redhat.com> |
media: atomisp: Fix me->stages error checking in sh_css_sp_init_pipeline() The current error-checking of me->stages in sh_css_sp_init_pipeline() has some issues / weirdness: 1. It is checked at the top of the function, but only using the atomisp custom assert() macro which e.g. smatch does not recognize 2. It is first dereferenced in "first_binary = me->stages->binary", but outside of the assert it is checked much later, triggering the following smatch warning: drivers/staging/media/atomisp/pci/sh_css_sp.c:1255 sh_css_sp_init_pipeline() warn: variable dereferenced before check 'me->stages' (see line 1224) Drop the custom assert() calls (note 'me' is never NULL) and instead add a regular check for me->stages not being set. Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Closes: https://lore.kernel.org/linux-media/7c8fc5b4-280e-844e-cdf5-b6ec2a1616aa@xs4all.nl/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
#
72c1c485 |
|
08-May-2023 |
Kate Hsuan <hpa@redhat.com> |
media: atomisp: sh_css_sp: Remove #ifdef ISP2401 The actions of ISP2401 and 2400 will be determined at the runtime. Link: https://lore.kernel.org/r/20230508062632.34537-3-hpa@redhat.com Signed-off-by: Kate Hsuan <hpa@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
#
afbfe82c |
|
22-Oct-2022 |
Hans de Goede <hdegoede@redhat.com> |
media: atomisp: Remove unused QOS defines / structure member With the accel code gone this is unused, remove it. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
#
9a29f5fc |
|
14-Oct-2022 |
Hans de Goede <hdegoede@redhat.com> |
media: atomisp: Add ia_css_frame_get_info() helper Several places rely on the [frame_]info member being the first member of struct ia_css_frame, so that &frame->info will yield NULL when frame is NULL (some places already explicitly check for a NULL frame pointer but not nearly all). For videobuf2 support the vb2_v4l2_buffer struct needs to be embedded in the frame struct and it needs to be the first member. Breaking the assumption that &frame->info will yield NULL when frame is NULL. Add a ia_css_frame_get_info() helper to return either the ia_css_frame_info struct embedded in the frame, or NULL when the frame pointer is NULL and use this in places where a ia_css_frame_info ptr or NULL is expected. To make sure that we catch all uses of the info field this patch also renames the info field to frame_info. This is a preparation patch for converting the driver to videobuf2. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
#
072927d1 |
|
17-Nov-2021 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: sh_css_sp: better support the current firmware As we're using Intel Aero firmware, make the code closer to the driver for such device. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
9e22032e |
|
15-Nov-2021 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: remove #ifdef SH_CSS_ENABLE_METADATA The chosen firmware has it enabled, so, drop this symbol. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
16d0c92e |
|
14-Nov-2021 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: drop #ifdef SH_CSS_ENABLE_PER_FRAME_PARAMS This is enabled for the firmware we're using. So, just drop the if's. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
47f6b6d4 |
|
15-Nov-2021 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: drop two vars that are currently ignored Those two vars are meaningful only with some ISP2401 firmwares. The one we chose to support doesn't use, so simply drop the extra code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
874da1fd |
|
05-Nov-2021 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: add return codes for pipeline config functions Those functions can internally break, but, as they don't return errors, internally there are some assert() calls, which is bad, as it hangs the driver. So, add return codes there, in preparation for removing such assert() calls. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
f8852049 |
|
05-Nov-2021 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: sh_css_sp: better handle pipeline config errors If something gets wrong while setup a pipeline, return an error code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
b37bca2e |
|
17-Oct-2021 |
Tsuchiya Yuto <kitakar@gmail.com> |
media: atomisp: make fw ver irci_stable_candrpv_0415_20150521_0458 work This patch removes the unnamed struct `shading` from `struct sh_css_sp_pipeline` as well as its usage [1]. [1] added on updating css version to irci_master_20150701_0213 https://raw.githubusercontent.com/intel/ProductionKernelQuilts/cht-m1stable-2016_ww31/uefi/cht-m1stable/patches/cam-0439-atomisp2-css2401-and-2401_legacy-irci_master_2015070.patch ("atomisp2: css2401 and 2401_legacy-irci_master_20150701_0213") This patch, together with the 4 patches applied before it revert incompatible changes in the current css version for ISP2401 (irci_ecr-master_20150911_0724) back to irci_stable_candrpv_0415_20150521_0458. Some `struct`s are `sizeof()`ed in sh_css_firmware.c file. So, I guess issues will happen if these sizes are changed. Therefore, keep them the same as css version irci_stable_candrpv_0415_20150521_0458 to make atomisp work for firmware made for such css version since we don't have firmware made for the current css version. Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
66262818 |
|
17-Oct-2021 |
Tsuchiya Yuto <kitakar@gmail.com> |
media: atomisp: remove struct ia_css_isp_parameter This patch removes `struct ia_css_isp_parameter sc` from `struct ia_css_config_memory_offsets` as well as its usage [1]. [1] added on updating css version to irci_master_20150701_0213 https://raw.githubusercontent.com/intel/ProductionKernelQuilts/cht-m1stable-2016_ww31/uefi/cht-m1stable/patches/cam-0439-atomisp2-css2401-and-2401_legacy-irci_master_2015070.patch ("atomisp2: css2401 and 2401_legacy-irci_master_20150701_0213") Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
c3cdc019 |
|
30-Apr-2021 |
Deepak R Varma <drv@mailo.com> |
media: atomisp: pci: reposition braces as per coding style Misplaced braces makes it difficult to follow the code easily. This also goes against the code style guidelines. This resolved following checkpatch complaints: ERROR: open brace '{' following function definitions go on the next line ERROR: that open brace { should be on the previous line Link: https://lore.kernel.org/linux-media/YIwk3KbVGRPJwKa4@dU2104 [mchehab: dropped a hunk with a merge conflict] Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, drv@mailo.com # X-LSpam-Score: -7.3 (-------) Signed-off-by: Deepak R Varma <drv@mailo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
c27479d7 |
|
30-Apr-2021 |
Deepak R Varma <drv@mailo.com> |
media: atomisp: pci: reposition braces as per coding style Misplaced braces makes it difficult to follow the code easily. This also goes against the code style guidelines. This resolved following checkpatch complaints: ERROR: open brace '{' following function definitions go on the next line ERROR: that open brace { should be on the previous line Link: https://lore.kernel.org/linux-media/YIwk3KbVGRPJwKa4@dU2104 [mchehab: dropped a hunk with a merge conflict] Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, drv@mailo.com # X-LSpam-Score: -7.3 (-------) Signed-off-by: Deepak R Varma <drv@mailo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
641c2292 |
|
20-Jul-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: get rid of version-dependent globals Replace all occurrences along the atomisp tree for the conditional compilation macros found at system_global.h, replacing them by tests wheather ISP2401 is defined or not. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
929e2a61 |
|
20-Jul-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: get rid of some unused code Now that the defines which are common for both ISP2400 and ISP2401 are at system_global.h, we can get rid of the code not used by those versions. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
69a03e36 |
|
01-Jun-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: get rid of an iomem abstraction layer The hive_isp_css_custom_host_hrt.h code, together with atomisp_helper.h, provides an abstraction layer for some functions inside atomisp_compat_css20.c and atomisp_cmd.c. There's no good reason for that. In a matter of fact, after removing the abstraction, the code looked a lot cleaner and easier to understand. So, get rid of them. While here, get rid also of the udelay(1) abstraction code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
48b532b9 |
|
03-Jun-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: use strscpy() instead of less secure variants Replace usages of strcpy(), strlcpy() and strncpy() in favor of strscpy(). Suggested-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
469a7306 |
|
01-Jun-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: change the detection of ISP2401 at runtime Instead of having a static var to detect it, let's use the already-existing arch-specific bytes, as this is how other parts of the code also checks when it needs to do something different, depending on an specific chipset version. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
5b552b19 |
|
30-May-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: re-enable warnings again For most warnings, the current code is OK. There are still some issues with implicit-fallthough warnings. Solve those and re-enable all warnings for this driver. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
f5fbb83f |
|
29-May-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: add SPDX headers This driver is licensed under GPL 2.0, as stated inside their headers. Add the proper tag there. We should probably latter cleanup the reduntant licensing text, but this could be done later, after we get rid of other abstraction layers. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
41022d35 |
|
28-May-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: get rid of non-Linux error codes The atomisp driver has its own error codes under the ia_css_err.h file. On several places, those got already replaced by standard error codes, but there are still a lot more to be fixed. Let's get rid of all of those, mapping them into the already-existing set of Linux error codes. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
ebf89d12 |
|
27-May-2020 |
Nathan Chancellor <nathan@kernel.org> |
media: atomisp: Clean up if block in sh_css_sp_init_stage Clang warns: ../drivers/staging/media/atomisp/pci/sh_css_sp.c:1039:23: warning: address of 'binary->in_frame_info' will always evaluate to 'true' [-Wpointer-bool-conversion] } else if (&binary->in_frame_info) { ~~ ~~~~~~~~^~~~~~~~~~~~~ in_frame_info is not a pointer so if binary is not NULL, in_frame_info's address cannot be NULL. Change this to an else since it will always be evaluated as one. While we are here, clean up this if block. The contents of both if blocks are the same but a check against "stage == 0" is added when ISP2401 is defined. USE_INPUT_SYSTEM_VERSION_2401 is only defined when isp2401_system_global.h is included, which only happens when ISP2401. In other words, USE_INPUT_SYSTEM_VERSION_2401 always requires ISP2401 to be defined so the '#ifndef ISP2401' makes no sense. Remove that part of the block to simplify everything. Link: https://github.com/ClangBuiltLinux/linux/issues/1036 Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
bbed5b89 |
|
27-May-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: avoid OOPS due to non-existing ref_frames stage->args->delay_frames array could point to NULL frames. What's weird is that we didn't notice this behavior with the Intel Aero Yocto code. Handle it, while adding a notice at the code, as this could be due to some broken pipeline setup. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
08fef4fa |
|
26-May-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: get rid of memory_access.c Now that we have everything in place, we can get rid of the memory_access abstraction layer. Now, everything related to heterogeneous memory management (hmm) is under hmm.c & related pools. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
100e8989 |
|
26-May-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: change the type returned by mmgr alloc The mmgr alloc code returns a different type than hmm, due to some abstraction layer. Change the driver to use just one type to represent the hmm memory. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
f6117977 |
|
24-May-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: drop a cast for a const argument Some arguments for tnf and ref settings are meant to be const, but they're defined without such annotation. Due to that, there's an ugly cast at sh_css_sp.c. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
8d4af310 |
|
29-Apr-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: get rid of some broken code Probably due to some version conflicts while the atomisp code were generated, some things don't build for ISP2401. So, use the ISP2400 variant when available, or get rid of the code that doesn't build. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
#
9d4fa1a1 |
|
30-Apr-2020 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
media: atomisp: cleanup directory hierarchy This driver has very long directories without a good reason (IMHO). Let's drop two directories from such hierarchy, in order to simplify things a little bit and make the dir output a bit more readable. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|