aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2021-11-17media: atomisp: sh_css_params: remove tests for ISP2401Mauro Carvalho Chehab1-109/+8
Those tests are related to the input system, which is the same for the chosen firmware, so both ISP2400 and ISP2401 will be identical with that regards. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-17media: atomisp: sh_css_mipi: cleanup the codeMauro Carvalho Chehab2-136/+38
With the ISP2401 firmware we're using, the code differences are not that much from ISP2400. Cleanup the code in order to make it closer to Intel Aero driver. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-17media: atomisp: sh_css_metrics: drop some unused codeMauro Carvalho Chehab1-25/+0
There are two #ifdefs there which aren't defined anywhere. So, just drop the dead code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-17media: atomisp: simplify sh_css_defs.hMauro Carvalho Chehab10-80/+36
There are several unused macros. Simplify the logic there, making it closer to the Intel Aero driver and the corresponding firmware, as this is what we have widely available for this device. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-17media: atomisp: drop empty filesMauro Carvalho Chehab5-72/+0
There's nothing inside such files. Just drop them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: get rid of #ifdef ISP_VEC_NELEMSMauro Carvalho Chehab2-20/+0
This is defined as 64 for the devices/firmware that were chosen. So, evaluate the macros accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: make sh_css similar to Intel Aero driverMauro Carvalho Chehab1-131/+19
As we're using the firmware from Intel Aero, ensure that the logic inside sh_css as similar as possible to such driver. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: warn if mipi de-allocation failedMauro Carvalho Chehab3-1/+18
There's a note at the uninit function that warns about issues with mipi frames de-allocation. print a warning if the problem ever happens. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop check_pipe_resolutions() logicMauro Carvalho Chehab1-56/+0
Such function doesn't exist on Intel Aero driver. As we're using its firmware, it may mean that this is not compatible with the current file. So, drop it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: get rid of some weird warn-suppress logicMauro Carvalho Chehab1-9/+0
There are some dead code meant to suppress "C_RUN" warnings. Drop it from sh_css.c, as it doesn't make much sense. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop a dead codeMauro Carvalho Chehab1-31/+0
There's a commented dead code related to some future thing to be implemented. As this won't happen, as it would require a newer firmware, just drop the code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop ia_css_pipe_update_qos_ext_mapped_argMauro Carvalho Chehab2-105/+0
This function is not used. Drop it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: unify ia_css_stream stop logicMauro Carvalho Chehab1-212/+2
There are two versions of those functions. It turns that the choosen firmware use the old version. So, drop the unused ones and ensure that all devices will use the right functions. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: get rid of ia_css_stream_load()Mauro Carvalho Chehab2-61/+0
This function is marked as obsolete and nobody calls it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop crop code at stream create functionMauro Carvalho Chehab1-164/+0
The firmware chosen for ISP2401 doesn't support it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: solve #ifdef HAS_NO_PACKED_RAW_PIXELSMauro Carvalho Chehab3-8/+0
This was never defined, so remove the #ifdefs, keeping the code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: remove #ifdef SH_CSS_ENABLE_METADATAMauro Carvalho Chehab3-36/+1
The chosen firmware has it enabled, so, drop this symbol. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop #ifdef WITH_PC_MONITORINGMauro Carvalho Chehab1-118/+0
This is not needed for the driver to work. So, just drop it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop #ifdef SH_CSS_ENABLE_PER_FRAME_PARAMSMauro Carvalho Chehab5-28/+0
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>
2021-11-16media: atomisp: remove #ifdef HAS_OUTPUT_SYSTEMMauro Carvalho Chehab2-5/+0
None of the firmwares we use has support for it. So, drop the unused code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop an useless #ifdef ISP2401Mauro Carvalho Chehab1-2/+1
The Yocto Aero driver for ISP2401 sets my_css_save.loaded_fw. As we're using the same firmware, remove the ifdef there. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: drop two vars that are currently ignoredMauro Carvalho Chehab4-56/+10
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>
2021-11-16media: atomisp: Avoid some {} just to define new varsMauro Carvalho Chehab1-31/+20
There are a couple of places where {} are used just to define a new var. Just move the var to the top of the function and get rid of that ugly blocks. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: fix comments coding style at sh_css.cMauro Carvalho Chehab1-360/+521
Use the coding style for the comments at this file. While here, drop a do-nothing if logic. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: ia_css_stream.h: remove ifdefs from the headerMauro Carvalho Chehab1-4/+0
Now that the input system always declare rx_cfg_t, we can remove the ifdef ISP2401 from this header. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: shift some structs from input_system_localMauro Carvalho Chehab3-152/+134
There are several stucts under ISP2400 that could be moved to the global file without causing any build issues. Move those to the common header, in order to reduce the number of things that are #ifdef dependent. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: get rid of if CONFIG_ON_FRAME_ENQUEUEMauro Carvalho Chehab2-50/+0
This is not used with supported firmwares, so get rid of such code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: get rid of phys event abstractionsMauro Carvalho Chehab5-34/+3
ia_css_dequeue_event() is just an alias to ia_css_dequeue_psys_event(), and atomisp_css_dequeue_event() do nothing but calling the event dequeue logic. Get rid of both abstractions, calling the function directly. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: handle errors at sh_css_create_isp_params()Mauro Carvalho Chehab1-2/+6
The succ var tracks memory allocation erros on this function. Fix it, in order to stop this W=1 Werror in clang: drivers/staging/media/atomisp/pci/sh_css_params.c:2430:7: error: variable 'succ' set but not used [-Werror,-Wunused-but-set-variable] bool succ = true; ^ Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp: implement enum framesize/frameintervalMauro Carvalho Chehab1-0/+53
Add logic to enumerate sensor's frame size and interval. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp-ov2680: implement enum frame intervalsMauro Carvalho Chehab1-0/+21
Allow the sensor to report the per-resolution frame interval. It should be noticed that, despite the ov2680 datasheet says that, for resolutions <= 1280x720, the sensor supports 60fps, the data at ov2680.h tells otherwise, limiting it to 30fps. Not sure yet if this is a limitation of atomisp or if it is just because the tables are incorrect. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp-ov2680: adjust the maximum frame rateMauro Carvalho Chehab1-7/+7
The ov2680 supports a maximum bandwidth of 660Mbps and allows up to 60fps when the resolution is below 720p. Adjust the sensor's table to reflect that. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp-ov2680: remove some unused fieldsMauro Carvalho Chehab1-26/+0
The sensor resolution arrays have two unused fields. Drop them. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp-ov2680: uncomment other resolutionsMauro Carvalho Chehab1-6/+153
There are several resolutions defined for this sensor, but just two are currently uncommented. Change the driver to allow other resolutions to also be used. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: atomisp-gc2235: drop an unused varMauro Carvalho Chehab1-3/+5
Fix this clang Werror with W=1: drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:573:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable] int ret = -1; ^ Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-16media: ipu3: drop an unused variableMauro Carvalho Chehab1-3/+0
Fix this clang Werror with W=1: drivers/staging/media/ipu3/ipu3-css-params.c:774:8: error: variable 'pin_scale' set but not used [-Werror,-Wunused-but-set-variable] int pin_scale = 0; ^ Reviewed-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-11-15staging: r8188eu: remove the efuse_hal structureMartin Kaiser2-10/+0
struct efuse_hal is not used and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-16-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove fake efuse variablesMartin Kaiser2-16/+0
We removed the pseudo read code. This patch removes the fake efuse arrays that were used by pseudo reads. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-15-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove bt efuse definitionsMartin Kaiser2-33/+0
This driver does not use bt efuses. Remove global variables and definitions related to bt efuses. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-14-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: efuse_OneByteWrite is unusedMartin Kaiser2-46/+0
Remove the efuse_OneByteWrite function, which is no longer used. Remove resulting dead code as well. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: efuse_OneByteRead is unusedMartin Kaiser2-42/+0
Remove the efuse_OneByteRead function, which is no longer used. Remove resulting dead code as well. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove defines for efuse typeMartin Kaiser1-3/+0
We've removed all code to handle efuse types. The last step is to remove the defines for bt and wifi efuse types. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: rtl8188e_EFUSE_GetEfuseDefinition is unusedMartin Kaiser3-79/+0
Now that we use the map length directly, rtl8188e_EFUSE_GetEfuseDefinition is no longer needed and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: use efuse map length define directlyMartin Kaiser1-6/+3
The length of the efuse data section is constant. We can use the corresponding define directly, there's no need to get the length from rtl8188e_EFUSE_GetEfuseDefinition. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: merge Efuse_ReadAllMap into EFUSE_ShadowMapUpdateMartin Kaiser1-33/+9
Efuse_ReadAllMap is small, it's called only by EFUSE_ShadowMapUpdate. This patch merges the two functions. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: rtl8188e_Efuse_PgPacketRead is now unusedMartin Kaiser3-135/+0
After we removed efuse write support, rtl8188e_Efuse_PgPacketRead is no longer needed. Remove this function and its internal helpers. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: rtl8188e_EfuseGetCurrentSize is now unusedMartin Kaiser2-63/+0
After we removed efuse write support, rtl8188e_EfuseGetCurrentSize is no longer needed. Remove this function and its internal helpers. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: merge small adapter info helpersMartin Kaiser3-33/+17
ReadAdapterInfo8188EU calls Hal_InitPGData88E and readAdapterInfo_8188EU, both of which are small and have no other callers. Merge the two latter functions into ReadAdapterInfo8188EU. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove test code for efuse shadow mapMartin Kaiser4-124/+34
The EFUSE_ShadowMapUpdate function has a parameter to replace the actual read operations with test reads. The only caller of EFUSE_ShadowMapUpdate does not use this test mode. Remove the read test code from EFUSE_ShadowMapUpdate and the low-level functions that it calls. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging: r8188eu: remove efuse type from read functionsMartin Kaiser4-14/+11
Efuse_ReadAllMap, ReadEFuseByIC and ReadEFuse_Pseudo do not use their efuseType parameter. Remove the parameter from these functions and from their callers. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>