summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2020-12-03media: Revert "media: camss: Make use of V4L2_CAP_IO_MC"Andrey Konovalov
This reverts commit c90f1178dcac30dee5ddd29ec0513e7589aa866e. The assumption of "Each entry in formats[] table has unique mbus_code" is valid for the RDI entities, but not for the PIX ones. Reverting this patch and creating a new one which handles the PIX entities correctly results in smaller and more straightforward patch than doing the changes on top of the current version. Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org> Reviewed-by: Robert Foss <robert.foss@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: rockchip: rkisp1: Fix typos in comments and macro definitionsPeilin Ye
Fix 4 typos under drivers/media/platform/rockchip/rkisp1/ found by checkpatch, including the RKISP1_CIF_MI_{M,S}P_PINGPONG_ENABLE macro definitions. Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com> Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: rcar-vin: Remove unused macroJacopo Mondi
The VNCSI_IFMD_CSI_CHSEL_MASK is not used: remove it. Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: fsl-viu: Use the ioread/write32be() accessorsFabio Estevam
Since commit 29d750686331 ("media: fsl-viu: allow building it with COMPILE_TEST") there were several attempts to fix build failures on PPC, MICROBLAZE and M68K. However, such errors are still present as reported by kbuild robot. Fix the problem by using the ioread/write32be() accessors, which build fine on all platforms. Reported-by: kernel test robot <lkp@intel.com> Suggested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: platform: exynos4-is: remove all references to physical addressesMarek Szyprowski
This driver always operates on the DMA/IOVA addresses, so calling them physical addresses is misleading, although when no IOMMU is used they equal each other. Fix this by renaming all such entries to 'addr' and adjusting comments. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: adv748x: Configure device when resuming from sleepNiklas Söderlund
If the device is powered off (for example during system suspend to ram) the devices loses its configuration, especially the slave i2c mappings and other configuration set at probe time. This renders the device unusable and the only way to recover is to unbind and rebind the device to the driver to run the probe setup again. Add an early resume callback that reinitializes the device and setup the slave i2c address mappings and other probe time configuration. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: adv748x: csi2: Set virtual channel when device is resetNiklas Söderlund
It's not enough to set the CSI-2 virtual channel for TXA and TXB during probe: it also needs to be set when the device is reset. Move the virtual channel selection to adv748x_reset() that is called during probe and when the device needs to be reset. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: adv748x: afe: Select input port when device is resetNiklas Söderlund
It's not enough to select the AFE input port during probe: it also needs to be set when the device is reset. Move the port selection to adv748x_reset() that is called during probe and when the device needs to be reset. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: adv748x: Only set i2c addresses once during probeNiklas Söderlund
During probe the i2c slave addresses are set two times in a row, once in adv748x_initialise_clients() and once directly after in adv748x_reset(). Remove the call to adv748x_set_slave_addresses() in adv748x_initialise_clients() as it's only called during probe while adv748x_reset() is called during probe and normal operation. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: saa7146: fix array overflow in vidioc_s_audio()Dan Carpenter
The "a->index" value comes from the user via the ioctl. The problem is that the shift can wrap resulting in setting "mxb->cur_audinput" to an invalid value, which later results in an array overflow. Fixes: 6680427791c9 ("[media] mxb: fix audio handling") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: meson: vdec: add G12/SM1 to module descriptionChristian Hewitt
The meson vdec driver also supports Amlogic G12/SM1 hardware. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: s5p-jpeg: handle error condition in s5p_jpeg_probeBaskov Evgeniy
If an error happens in jpeg_get_drv_data(), i.e. match fails, jpeg->variant field is NULL, so we cannot access it. Consider device probe failed if jpeg->variant is NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Baskov Evgeniy <baskov@ispras.ru> Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: cedrus: Add support for VP8 decodingJernej Skrabec
VP8 in Cedrus shares same engine as H264. Note that it seems necessary to call bitstream parsing functions, to parse frame header, otherwise decoded image is garbage. This is contrary to what is driver supposed to do. However, values are not really used, so this might be acceptable. It's possible that bitstream parsing functions set some internal VPU state, which is later necessary for proper decoding. Biggest suspect is "VP8 probs update" trigger. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: hantro: Use VP8 lengths defined in uapiEmmanuel Gil Peyrot
Use the new defines instead of hardcoding the VP8 lengths. [hverkuil: add commit log] Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: mtk-vpu: dump VPU status when IPI times outIrui Wang
when IPI time out, dump VPU status to get more debug information Signed-off-by: Irui Wang <irui.wang@mediatek.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: mtk-vpu: VPU should be in idle state before system is suspendedIrui Wang
VPU should be in idle state before system is suspended or it will work abnormally like VPU program counter not in a correct address or VPU reset Signed-off-by: Irui Wang <irui.wang@mediatek.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: coda: Convert the driver to DT-onlyFabio Estevam
Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: tvp5150: Fix wrong return value of tvp5150_parse_dt()Zhang Xiaoxu
If of_graph_get_endpoint_by_regs() return NULL, it will return 0 rather than an errno, because we doesn't initialize the return value. Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: cx88: use ARRAY_SIZEXu Wang
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: cedrus: Add support for V3sMartin Cerveny
V3s video engine runs at lower speed and support video decoder for H.264 and JPEG/MJPEG only. Signed-off-by: Martin Cerveny <m.cerveny@computer.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: cedrus: Register all codecs as capabilityMartin Cerveny
All codecs should have capabilities. For example "Allwinner V3s" does not support "MPEG2". Signed-off-by: Martin Cerveny <m.cerveny@computer.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: cx23885: add more quirks for reset DMA on some AMD IOMMUDaniel Lee Kruse
On AMD Family 15h (Models 30h-3fh), I/O Memory Management Unit RiSC engine sometimes stalls, requiring a reset. As result, MythTV and w-scan won't scan channels on the AMD Kaveri APU with the Hauppauge QuadHD TV tuner card. For the solution I added the Input/Output Memory Management Unit's PCI Identity of 0x1423 to the broken_dev_id[] array, which is used by a quirks logic meant to fix similar problems with other AMD chipsets. Signed-off-by: Daniel Lee Kruse <daniel.lee.kruse@protonmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-03media: rockchip: rkisp1: Constify static structsRikard Falkeborn
These 'ops' structs are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: i2c: imx219: Selection compliance fixesHans Verkuil
To comply with the intended usage of the V4L2 selection target when used to retrieve a sensor image properties, adjust the rectangles returned by the imx219 driver. The top/left crop coordinates of the TGT_CROP rectangle were set to (0, 0) instead of (8, 8) which is the offset from the larger physical pixel array rectangle. This was also a mismatch with the default values crop rectangle value, so this is corrected. Found with v4l2-compliance. While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and CROP_BOUNDS have the same size as the non-active pixels are not readable using the selection API. Found with v4l2-compliance. [reword commit message, use macros for pixel offsets] Fixes: e6d4ef7d58aa7 ("media: i2c: imx219: Implement get_selection") Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: rdacm20: Enable GPIO1 explicitlyJacopo Mondi
The MAX9271 GPIO1 line that controls the sensor reset is by default enabled after a serializer chip reset. As rdacm20 does not go through an explicit serializer reset, make sure GPIO1 is enabled to make the camera module driver more robust. Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: max9271: Fix GPIO enable/disableJacopo Mondi
Fix GPIO enable/disable operations which wrongly read the 0x0f register to obtain the current mask of the enabled lines instead of using the correct 0x0e register. Also fix access to bit 0 of the register which is marked as reserved. Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()Niklas Söderlund
There are no users left of this helper and as it implements an undesirable and too simple behaviour that should instead be implemented directly by drivers remove it to prevent future uses of it. Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: rcar-vin: Rework CSI-2 firmware parsingNiklas Söderlund
Rework the CSI-2 firmware parsing code to not use the soon to be removed v4l2_async_notifier_parse_fwnode_endpoints_by_port() helper. The change only aims to prepare for the removing of the old helper and there are no functional change. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: rcar-vin: Use v4l2_async_subdev instead of fwnode_handle to match ↵Niklas Söderlund
subdevices In preparation of removing the usage of the old helper v4l2_async_notifier_parse_fwnode_endpoints_by_port() use the v4l2_async_subdev instead of fwnode_handle to match subdevices. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: rcar-vin: Rework parallel firmware parsingNiklas Söderlund
Rework the parallel firmware parsing code to not use the soon to be removed v4l2_async_notifier_parse_fwnode_endpoints_by_port() helper. The change only aims to prepare for the removing of the old helper and there are no functional change. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: rcar-vin: Only dynamically allocate v4l2_async_subdevNiklas Söderlund
In preparation of removing the usage of the old helper v4l2_async_notifier_parse_fwnode_endpoints_by_port() do not dynamically allocate the whole structure containing the parameters for the parallel interface, instead only allocate the v4l2_async_subdev structure. There is no functional change. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: ov2740: fix dereference before null check on pointer nvmColin Ian King
Currently pointer nvm is being dereferenced before it is being null checked. Fix this by moving the assignments of pointers client and ov2740 so that are after the null check hence avoiding any potential null pointer dereferences on pointer nvm. Fixes: 5e6fd339b68d ("media: ov2740: allow OTP data access during streaming") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: i2c: add OV02A10 image sensor driverDongchun Zhu
Add a V4L2 sub-device driver for OmniVision OV02A10 image sensor. Signed-off-by: Dongchun Zhu <dongchun.zhu@mediatek.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: ov9734: hold lock to check streaming stateBingbu Cao
The lock in ov9734 is used to protect the streaming state and serialize the stream on and off callbacks, it should be hold before checking the streaming state in ov9734_set_stream(). Reported-by: Tomasz Figa <tfiga@chromium.org> Reported-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: v4l: subdev: Set sd->devnode before registering the subdevSakari Ailus
The subdev's video device node was only assigned after registering the device node in the system. While it is unlikely that a driver needed to use this field in handling system calls to its file handle, there remains a slim chance the devnode field remains NULL while the driver expects to find a video node there. Assign the devnode field before registering the device, and assign it back to NULL if the registration failed. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: omap3isp: Remove misleading commentThomas Gleixner
in_interrupt() covers hard and soft interrupt servicing and bottom half disabled contexts, which is semantically undefined and useless. The comment for __ccdc_lsc_configure() "Context: in_interrupt()" is therefore as useful as "Context: unknown'. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> 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+huawei@kernel.org>
2020-12-02media: ccs: Request for "reset" GPIOSakari Ailus
The DT bindings documented "reset-gpios" property but the driver never made use of it. Instead it used a GPIO called "xshutdown", with apprently wrong polarity. Fix this by requesting "reset" GPIO with the right polarity first, and if that fails, then request "xshutdown" GPIO with the old polarity. This way it works for new users as expected while if someone, somewhere, depended on "xshutdown" GPIO, that continues to work as well. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: ccs: Give all subdevs a functionSakari Ailus
This removes a warning at driver probe time telling that one or two entities have no function set. The function used for both the binner and scaler is the scaler. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: ccs: Remove profile conceptSakari Ailus
The driver doesn't do anything tangible with profiles. Remove the notion, and use the capabilities directly. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Rename as "ccs"Sakari Ailus
Rename the "smiapp" driver as "ccs". MIPI CCS is the contemporary standard for raw Bayer camera sensors. The driver retains support for the SMIA++ and SMIA compliant camera sensors. A module alias is added for old user space using "smiapp" module name. Add Intel copyright while at it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Differentiate CCS sensors from SMIA in subdev namingSakari Ailus
Call CCS compliant sensors as "ccs" instead of "smiapp" in absence of a device specific name. This is done based on the value of the manufacturer ID register that is only present in CCS. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Internal rename to CCSSakari Ailus
Rename internal names to reflect the driver's new reference. The module name remains the same. Also fix trivial coding style issues on the way related to e.g. alignment changes due to the rename. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Rename register access functionsSakari Ailus
Rename register access functions by changing smiapp to ccs. The functions operating on register addresses have "addr" appended to the name. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Remove quirk function for writing a single 8-bit registerSakari Ailus
This function is no longer needed as the smiapp_write() function can be used to write 8-bit registers with plain register addresses. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Use CCS registersSakari Ailus
Switch to CCS standard registers where they exist. The still relevant SMIA registers are left as-is and the redundant ones are removed. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Use CCS limits in reading binning capabilitiesSakari Ailus
Use CCS limits for obtaining binning capabilities and subtypes. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Use CCS limits in reading data format descriptorsSakari Ailus
The CCS limits have the information so use it instead. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Obtain frame descriptor from CCS limitsSakari Ailus
Obtain the frame descriptor from the CCS limits, instead of reading them directly from the frame descriptor registers. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Switch to CCS limitsSakari Ailus
Use the CCS limit definitions instead of the SMIA ones. This allows accessing CCS capabilities where needed as well as dropping the old SMIA limits. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-02media: smiapp: Read CCS limit valuesSakari Ailus
Read limit and capability values into a driver allocated buffer. This will later replace (most of) the existing SMIA limits. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>