summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-20media: atomisp: ia_css_binary_get_shading_info(): don't test versionMauro Carvalho Chehab
It doesn't make any sense to change the number of parameters for this function depending on the ISP version. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: css_trace.h: use the newest tracing codeMauro Carvalho Chehab
The css_trace header for ISP2401 also builds on older versions, and seems to be compatible with all versions. So, remove all ifdefs in favor of the CSP2401 version. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: add support for possible new namesMauro Carvalho Chehab
This patch addresses what it sounds to be a change at the name of some ACPI registers on newer ACPI tables. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: print css_version in runtimeMauro Carvalho Chehab
The CSS version returned by ISP2400 is different than the one returned by ISP2401. While we could return just one version for both, as this sounds like just an informative string, for now, let's keep returning different versions, as we don't know if this would affect userspace. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: sh_css_param_dvs.h remove ISP version macrosMauro Carvalho Chehab
As namespaces aren't duplicated here, just remove the ifdefs. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: unify sh_css_params_shading_id_table_generate()Mauro Carvalho Chehab
Instead of packing parameters differently on ISP2400 and ISP2401, use just one way of passing them for both. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: remove table duplication from dfs tablesMauro Carvalho Chehab
The way atomisp_dfs_tables.h is defined, it ends by duplicating all data structs there on both atomisp_v4l2.c and atomisp_cmd.c. Change the logic in order to place the definitions only on a single place. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: remove ISP version macros from sh_css_legacy.hMauro Carvalho Chehab
This header is really version-independent. So, just get rid of the macros from it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: make sh_css_sp_init_pipeline() ISP version independentMauro Carvalho Chehab
This function call has two parameters that are used only with ISP2401, enclosed on some ugly ifdefs. Make the function independent, passing NULL values for ISP2400. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: make sh_css_struct.h independent of ISP versionMauro Carvalho Chehab
Use the same struct for both ISP2400 and ISP2401. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: sh_css_defs.h: get rid of build time dependenciesMauro Carvalho Chehab
There are several #ifdefs checking for ISP version there. Some of them are just two different ways to represent the same contants, while 3 parameters are actually different, depending on the ISP version. Change the header in a way that it will be compatible with both versions, and change dependent code to keep running, removing ifdefs there only when possible. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_compat_ioctl32.c: be independent of ISP versionMauro Carvalho Chehab
There are two ioctls that are only available with ISP2401. Yet, at the compat level, we don't really need to take care, as the native ioctl handler will already return an error code if the ioctl doesn't exist. So, let's just remove the ifdefs here. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_compat_css20.c: detect ISP at runtimeMauro Carvalho Chehab
Remove ifdefs that check ISP version from the code, switching to specific ISP-dependent code at runtime. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_csi2.c: remove useless ifdefsMauro Carvalho Chehab
The ifdefs there are meaningless. Just remove them for good. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_subdev.c check ISP version on runtimeMauro Carvalho Chehab
Remove ISP-version-dependent ifdefs. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_v4l2.c: set wdt timers according with ISP versionMauro Carvalho Chehab
Add a runtime check to use the proper wdt timer init at runtime, depending on the chipset revision. For now, we can't get rid of the remaining version checks, as the rest of the code is not prepared yet to detect the ISP version on runtime. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_ioctl.c: get rid of a ISP2400/ISP2401 dependencyMauro Carvalho Chehab
Replace #ifdef occurrences there with runtime checks. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: pci/atomisp2/*.h remove #ifdef ISP2401Mauro Carvalho Chehab
Those ifs can easily be removed without breaking the code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_dfs_tables.h: don't depend on ISP versionMauro Carvalho Chehab
There's a dependency on this header for the ISP model. While this sounds really weird (as just one resolution needs it), as we don't know what's the right value, let's just keep it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: atomisp_cmd.c test ISP version in runtimeMauro Carvalho Chehab
The logic there has lots of ifdef dependencies if the hardware is either ISP2400 or ISP2041. Replace them by runtime checks. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: add a way for the driver to know the chipset versionMauro Carvalho Chehab
The atomisp supports two different chipsets: ISP2400 and ISP2401. Right now, this is controlled by ugly #defines inside the driver. Add a global bolean to identify the type of hardware. While this is hacky, it would be a quick way to start removing the ugly ifdefs. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: simplify math_support.hMauro Carvalho Chehab
There are some uneeded defines there. Simplify it, and make it independent of defines. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: remove some dead codeMauro Carvalho Chehab
There are several parts of atomisp that are meant to be built on different environments, tested using ifdefs. Remove some of them, as this code should build only on Linux. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: do lots of other coding style cleanupsMauro Carvalho Chehab
Use some auto-reformat tools to make the atomisp style a little better. There are still lots of weird things there, but this will hopefully reduce the number of pure coding style patches submitted upstream. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: fix several coding style issuesMauro Carvalho Chehab
Use checkpatch.pl --fix-inplace --strict to solve several coding style issues, manually reviewing the produced code and fixing some troubles caused by checkpatch. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: fix several typosMauro Carvalho Chehab
Running checkpatch.pl codespell logic found several typos at atomisp driver. Fix them using --fix-inline. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: select IOSF_MBI dependencyMauro Carvalho Chehab
This driver needs IOSF_MBI in order to talk with some PM registers. Select it at compile time. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: allow building the driver againMauro Carvalho Chehab
The atomisp driver builds again. So, remove depends on BROKEN. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: fix a broken compat32 codeMauro Carvalho Chehab
There's a typo at the compat32 code, with forgot to get the pointer address, causing the driver to not build. Not sure why this didn't produce an error back when the driver got removed. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: use new ida APIMauro Carvalho Chehab
The old ida API got replaced by a new one, with avoids locking issues. As the old API was removed, start using the new one, as defined by changeset b03f8e43c926 ("ida: Remove old API"). Fixes: b03f8e43c926 ("ida: Remove old API") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: use cpu_latency_qos_*() instead of pm_qos_update*()Mauro Carvalho Chehab
Those functions got renamed. Update them on atomisp driver. Fixes: 67b06ba01857 ("PM: QoS: Drop PM_QOS_CPU_DMA_LATENCY and rename related functions") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: Fix support for time 64 APIMauro Carvalho Chehab
The time 64 API patchset changed the ts stamp to u64. Update this driver accordingly. Fixes: 15a40b27beb0 ("media: videobuf: use u64 for the timestamp internally") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: replace VFL_TYPE_GRABBER by VFL_TYPE_VIDEOMauro Carvalho Chehab
This type was renamed in the past by a more meaningul name. Change it on atomisp too. Fixes: 238e4a5baa36 ("media: rename VFL_TYPE_GRABBER to _VIDEO") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: totalram_pages is now a functionMauro Carvalho Chehab
Fix the usage of totalram_pages, as this is now a function. Fixes: ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages variables to atomic") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: fix usage of access_ok() kAPIMauro Carvalho Chehab
This macro had its first parameter lost. Remove it. While on it, fix the alignments where this macro is used. Fixes: 96d4f267e40f ("Remove 'type' argument from access_ok() function") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20MAINTAINERS: adjust atomisp maintainershipMauro Carvalho Chehab
From now on, I'll be maintaining the atomisp driver, and Sakari will be reviewing it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20Revert "media: staging: atomisp: Remove driver"Mauro Carvalho Chehab
There are some interest on having this driver back, and I can probably dedicate some time to address its issue. So, let's ressurect it. For now, the driver causes a recursive error and doesn't build, so, make it depend on BROKEN. This reverts commit 51b8dc5163d2ff2bf04019f8bf7e3bd0e75bb654. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: i2c: imx219: Parse and register propertiesJacopo Mondi
Parse device properties and register controls for them using the newly introduced helpers. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: i2c: ov13858: Parse and register propertiesJacopo Mondi
Parse device properties and register controls for them using the newly introduced helpers. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: i2c: ov5670: Parse and register propertiesJacopo Mondi
Parse device properties and register controls for them using the newly introduced helpers. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: v4l2-ctrls: Add helper to register propertiesJacopo Mondi
Add an helper function to v4l2-ctrls to register controls associated with a device property. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: v4l2-ctrls: Sort includes alphabeticallyJacopo Mondi
Before adding a new include directive, sort the existing ones in alphabetical order. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: include: v4l2-ctrl: Sort forward declarationsJacopo Mondi
Before adding a new forward declaration to the v4l2-ctrls.h header file, sort the existing ones alphabetically. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: v4l2-fwnode: Add helper to parse device propertiesJacopo Mondi
Add an helper function to parse common device properties in the same way as v4l2_fwnode_endpoint_parse() parses common endpoint properties. Parse the 'rotation' and 'orientation' properties from the firmware interface. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: v4l2-ctrls: Add camera orientation and rotationJacopo Mondi
Add support for the newly defined V4L2_CID_CAMERA_ORIENTATION and V4L2_CID_CAMERA_SENSOR_ROTATION read-only controls used to report the camera device mounting position and orientation respectively. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_ROTATIONJacopo Mondi
Add documentation for the V4L2_CID_CAMERA_SENSOR_ROTATION camera control. The newly added read-only control reports the rotation correction to be applied to images before displaying them to the user. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: v4l2-ctrl: Document V4L2_CID_CAMERA_ORIENTATIONJacopo Mondi
Add documentation for the V4L2_CID_CAMERA_ORIENTATION camera control. The newly added read-only control reports the camera device orientation relative to the usage orientation of the system the camera is installed on. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: dt-bindings: video-interface: Replace 'rotation' descriptionJacopo Mondi
Replace the 'rotation' property description by providing a definition relative to the camera sensor pixel array coordinate system and the captured scene. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: dt-bindings: video-interfaces: Document 'orientation' propertyJacopo Mondi
Add the 'orientation' device property, used to specify the device mounting position. The property is particularly meaningful for mobile devices with a well defined usage orientation. Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-18media: imx: TODO: Remove media link creation todosSteve Longerbeam
Remove the TODO items regarding media link creation, these issues are resolved by moving media link creation to individual entity bound callbacks and the implementation of the get_fwnode_pad operation. Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>