- Apr 03, 2020
-
-
Lokesh Vutla authored
Update the INTA and INTR dt nodes to the latest DT bindings. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
Lokesh Vutla authored
Driver assumes that Interrupt parent to Interrupt Aggregator is always Interrupt router. This is not true always and GIC can be a parent to Interrupt Aggregator. Update the driver to detect the parent and request the parent irqs accordingly. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
Lokesh Vutla authored
Drop the firmware related interrupt ranges and use the hardware specified interrupt numbers within Interrupt Aggregator. This ensures interrupt aggregator DT node need not assume any interrupt parent type. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
Lokesh Vutla authored
Driver assumes that Interrupt parent to Interrupt router is always GIC. This is not true always and an Interrupt Router can be a parent to Interrupt Router. Update the driver to detect the parent and request the parent irqs accordingly. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
Lokesh Vutla authored
Drop the firmware related dt-bindings and use the hardware specified interrupt numbers within Interrupt Router. This ensures interrupt router DT node need not assume any interrupt parent type. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
Lokesh Vutla authored
With SYSFW ABI 3.0 changes, interrupts coming out of an interrupt controller is identified by a type and it is consistent across SoCs. Similarly global events for Interrupt aggregator. So add an API to get resource range using a resource type. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
Lokesh Vutla authored
struct ti_sci_rm_type_map is no longer used. Drop its definition and its declarations. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
Lokesh Vutla authored
With ABI 3.0, sysfw deprecated special resource types used for AM65x SoC. Instead started using device id as resource type similar to the convention used in J721E SOC. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
- Mar 30, 2020
-
-
Dan Murphy authored
Merge tag 'v5.4.28' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-5.4.y This is the 5.4.28 stable release * tag 'v5.4.28' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (154 commits) Linux 5.4.28 staging: greybus: loopback_test: fix potential path truncations staging: greybus: loopback_test: fix potential path truncation drm/bridge: dw-hdmi: fix AVI frame colorimetry nvmet-tcp: set MSG_MORE only if we actually have more to send arm64: smp: fix crash_smp_send_stop() behaviour arm64: smp: fix smp_send_stop() behaviour ALSA: hda/realtek: Fix pop noise on ALC225 futex: Unbreak futex hashing futex: Fix inode life-time issue x86/mm: split vmalloc_sync_all() page-flags: fix a crash at SetPageError(THP_SWAP) mm, slub: prevent kmalloc_node crashes and memory leaks mm: slub: be more careful about the double cmpxchg of freelist epoll: fix possible lost wakeup on epoll_ctl() path mm: do not allow MADV_PAGEOUT for CoW pages ...
-
- Mar 27, 2020
-
-
LCPD Auto Merger authored
TI-Feature: audio-display TI-Branch: audio-display-ti-linux-5.4.y * 'audio-display-ti-linux-5.4.y' of ssh://bitbucket.itg.ti.com/lcpdpublicdom/audio-display : (25 commits) arm64: dts: ti: k3-am65: mark dss as dma-coherent ti_config_fragments/audio_display.cfg: disable V4L2 features omapfb: Remove unused writeback code media: ov5640: fix use of destroyed mutex media: ti-vpe: cal: fix stop state timeout media: ti-vpe: cal: improve wait for stop-state media: ti-vpe: cal: improve wait for CIO resetdone media: ti-vpe: cal: move code to separate functions media: ti-vpe: cal: set DMA max seg size media: ti-vpe: cal: program number of lines properly media: ti-vpe: cal: fix dummy read to phy media: ti-vpe: cal: cleanup CIO power enable/disable media: ti-vpe: cal: use reg_write_field media: ti-vpe: cal: remove useless IRQ defines media: ti-vpe: cal: remove useless CAL_GEN_* macros media: ti-vpe: cal: simplify irq handling media: ti-vpe: cal: print errors on timeouts media: ti-vpe: cal: catch error irqs and print errors media: ti-vpe: cal: drop cal_runtime_get/put media: ti-vpe: cal: use runtime_resume for errata handling ... Signed-off-by:
LCPD Auto Merger <lcpd_integration@list.ti.com>
-
Tomi Valkeinen authored
DSS is IO coherent on AM65, so we can mark it as such with 'dma-coherent' property in the DT file. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com>
-
Tomi Valkeinen authored
Disable all V4L2 analog and digital TV tuners and remote controllers from the kernel config. There are a large amount of them, built currently as modules, and as far as I know, we are not using any of them. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com>
-
Tomi Valkeinen authored
Remove unused writeback code. This code will never be used, as omapfb is being deprecated. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com>
-
Tomi Valkeinen authored
v4l2_ctrl_handler_free() uses hdl->lock, which in ov5640 driver is set to sensor's own sensor->lock. In ov5640_remove(), the driver destroys the sensor->lock first, and then calls v4l2_ctrl_handler_free(), resulting in the use of the destroyed mutex. Fix this by calling moving the mutex_destroy() to the end of the cleanup sequence, as there's no need to destroy the mutex as early as possible. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@vger.kernel.org # v4.14+ Reviewed-by:
Benoit Parrot <bparrot@ti.com>
-
Tomi Valkeinen authored
The stop-state timeout needs to be over 100us as per CSI spec. With the CAL fclk of 266 MHZ on DRA76, with the current value the driver uses, the timeout is 24us. Too small timeout will cause failure to enable the streaming. Also, the fclk can be different on other SoCs, as is the case with AM65x where the fclk is 250 MHz. This patch fixes the timeout by calculating it correctly based on the fclk rate. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
Sometimes there is a timeout when waiting for the Stop-State. Testing shows that sometimes we need to wait more than what the current code does. It is not clear how long this wait can be, but it is based on how quickly the sensor provides a valid clock, and how quickly CAL syncs to it. Change the code to make it more obvious how long we'll wait, and set a wider range for usleep_range. Increase the timeout to 750ms. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
Sometimes there is a timeout when waiting for the 'ComplexIO Reset Done'. Testing shows that sometimes we need to wait more than what the current code does. It is not clear how long this wait can be, but it is based on how quickly the sensor provides a valid clock, and how quickly CAL syncs to it. Change the code to make it more obvious how long we'll wait, and set a wider range for usleep_range. Increase the timeout to 750ms. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
To make csi2_wait_for_phy() more readable, move code to separate functions. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: delete empty line before } ]
-
Tomi Valkeinen authored
Set DMA max seg size correctly to get rid of warnings on 64 bit platforms: DMA-API: cal 6f03000.cal: mapping sg segment longer than device claims to support [len=720896] [max=65536] Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
CAL_CSI2_CTX register has LINES field, which, according to the documentation, should be programmed to the number of lines transmitted by the camera. If the number of lines is unknown, it can be set to 0. The driver sets the field to 0 for some reason, even if we know the number of lines. This patch sets the number of lines properly, which will allow the HW to discard extra lines (if the sensor would send such for some reason), and, according to documentation: "This leads to regular video timings and avoids potential artifacts". Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
After ComplexIO reset, a dummy read to PHY is needed as per CAL spec to finish the reset. Currently the driver reads a ComplexIO register, not PHY register. Fix this. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
Move the code to enable and disable ComplexIO power to its own function. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
Simplify the code by using reg_write_field() where trivially possible. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
Remove a bunch of IRQ defines, of which only CAL_HL_IRQ_ENABLE and CAL_HL_IRQ_CLEAR are used, and these defines only end up obfuscating code. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
These macros only obfuscate the code, so drop them. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
Instead of having identical code block to handle irqs for the two CAL ports, we can have a for loop and a single code block. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
The driver does not print any errors on ComplexIO reset timeout or when waiting for stop-state, making it difficult to debug and notice problems. Add error prints for these cases. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
CAL reports various errors via IRQs, which are not handled at all by the current driver. Add code to enable and catch those IRQs and print errors. This will make it much easier to notice and debug issues with sensors. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: fix: spaces preferred around that '-']
-
Tomi Valkeinen authored
Now that cal_runtime_get and cal_runtime_put are only direct wrappers to pm_runtime_get/put, we can drop cal_runtime_get and cal_runtime_put. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
We need to do errata handling every time CAL is being enabled. The code is currently in cal_runtime_get(), which is not the correct place for it. Move the code to cal_runtime_resume, which is called every time CAL is enabled. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
i913_errata() sets a bit to 1 in PHY_REG10, but for some reason uses CAL_CSI2_PHY_REG0_HSCLOCKCONFIG_DISABLE for the bit value. The value of that macro is 1, so it works, but is still wrong. Fix this to 1. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
IRQENABLE_SET registers are (usually) not meant to be read, only written to. The current driver needlessly uses read-modify-write cycle to enable IRQ bits. The read-modify-write has no bad side effects here, but it's still better to clean this up by only using write. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Tomi Valkeinen authored
When the CAL driver stops streaming, it will shut everything down without waiting for the current frame to finish. This leaves the CAL DMA in a slightly undefined state, and when CAL DMA is enabled when the stream is started the next time, the old DMA transfer will continue. It is not clear if the old DMA transfer continues with the exact settings of the original transfer, or is it a mix of old and new settings, but in any case the end result is memory corruption as the destination memory address is no longer valid. I could not find any way to ensure that any old DMA transfer would be discarded, except perhaps full CAL reset. But we cannot do a full reset when one port is getting enabled, as that would reset both ports. This patch tries to make sure that the DMA transfer is finished properly when the stream is being stopped. I say "tries", as, as mentioned above, I don't see a way to force the DMA transfer to finish. I believe this fixes the corruptions for normal cases, but if for some reason the DMA of the final frame would stall a lot, resulting in timeout in the code waiting for the DMA to finish, we'll again end up with unfinished DMA transfer. However, I don't know what could cause such a timeout. Signed-off-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Benoit Parrot authored
After the switch to use v4l2_async_notifier_add_subdev() and v4l2_async_notifier_cleanup(), unloading the ti_cal module would cause a kernel oops. This was root cause to the fact that v4l2_async_notifier_cleanup() tries to kfree the asd pointer passed into v4l2_async_notifier_add_subdev(). In our case the asd reference was from a statically allocated struct. So in effect v4l2_async_notifier_cleanup() was trying to free a pointer that was not kalloc. So here we switch to using a kzalloc struct instead of a static one. To achieve this we re-order some of the calls to prevent asd allocation from leaking. Fixes: d079f94c ("media: platform: Switch to v4l2_async_notifier_add_subdev") Cc: stable@vger.kernel.org Signed-off-by:
Benoit Parrot <bparrot@ti.com> Reviewed-by:
Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Benoit Parrot authored
disable_irqs() was mistakenly disabling all interrupts when called. This cause all port stream to stop even if only stopping one of them. Cc: stable <stable@vger.kernel.org> Signed-off-by:
Benoit Parrot <bparrot@ti.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
- Mar 25, 2020
-
-
Greg Kroah-Hartman authored
-
Johan Hovold authored
commit ae62cf5e upstream. Newer GCC warns about possible truncations of two generated path names as we're concatenating the configurable sysfs and debugfs path prefixes with a filename and placing the results in buffers of the same size as the maximum length of the prefixes. snprintf(d->name, MAX_STR_LEN, "gb_loopback%u", dev_id); snprintf(d->sysfs_entry, MAX_SYSFS_PATH, "%s%s/", t->sysfs_prefix, d->name); snprintf(d->debugfs_entry, MAX_SYSFS_PATH, "%sraw_latency_%s", t->debugfs_prefix, d->name); Fix this by separating the maximum path length from the maximum prefix length and reducing the latter enough to fit the generated strings. Note that we also need to reduce the device-name buffer size as GCC isn't smart enough to figure out that we ever only used MAX_STR_LEN bytes of it. Fixes: 6b0658f6 ("greybus: tools: Add tools directory to greybus repo and add loopback") Signed-off-by:
Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20200312110151.22028-4-johan@kernel.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Johan Hovold authored
commit f1602383 upstream. Newer GCC warns about a possible truncation of a generated sysfs path name as we're concatenating a directory path with a file name and placing the result in a buffer that is half the size of the maximum length of the directory path (which is user controlled). loopback_test.c: In function 'open_poll_files': loopback_test.c:651:31: warning: '%s' directive output may be truncated writing up to 511 bytes into a region of size 255 [-Wformat-truncation=] 651 | snprintf(buf, sizeof(buf), "%s%s", dev->sysfs_entry, "iteration_count"); | ^~ loopback_test.c:651:3: note: 'snprintf' output between 16 and 527 bytes into a destination of size 255 651 | snprintf(buf, sizeof(buf), "%s%s", dev->sysfs_entry, "iteration_count"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by making sure the buffer is large enough the concatenated strings. Fixes: 6b0658f6 ("greybus: tools: Add tools directory to greybus repo and add loopback") Fixes: 9250c0ee ("greybus: Loopback_test: use poll instead of inotify") Signed-off-by:
Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20200312110151.22028-3-johan@kernel.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jernej Skrabec authored
commit e8dca30f upstream. CTA-861-F explicitly states that for RGB colorspace colorimetry should be set to "none". Fix that. Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Fixes: def23aa7 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by:
Jernej Skrabec <jernej.skrabec@siol.net> Link: https://patchwork.freedesktop.org/patch/msgid/20200304232512.51616-2-jernej.skrabec@siol.net Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sagi Grimberg authored
commit 98fd5c72 upstream. When we send PDU data, we want to optimize the tcp stack operation if we have more data to send. So when we set MSG_MORE when: - We have more fragments coming in the batch, or - We have a more data to send in this PDU - We don't have a data digest trailer - We optimize with the SUCCESS flag and omit the NVMe completion (used if sq_head pointer update is disabled) This addresses a regression in QD=1 with SUCCESS flag optimization as we unconditionally set MSG_MORE when we didn't actually have more data to send. Fixes: 70583295 ("nvmet-tcp: implement C2HData SUCCESS optimization") Reported-by:
Mark Wunderlich <mark.wunderlich@intel.com> Tested-by:
Mark Wunderlich <mark.wunderlich@intel.com> Signed-off-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Keith Busch <kbusch@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-