- Aug 09, 2024
-
-
Guillaume LA ROQUE authored
Build WL1837 dtbo and add it in dtbo.img Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Guillaume LA ROQUE authored
The AM625-SK board rev[1-3] has a wl1837 on board. This overlay enables the WL1837 TI WiFi to be used with it. Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Guillaume LA ROQUE authored
New AM62B board have a M2 connector so not include by default wl1837 chip. To be generic remove wl1837 part in device tree . Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Guillaume LA ROQUE authored
Remove .wake_tx_queue function, mot supported by kernel 6.1 Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
- Aug 07, 2024
-
-
The AM625-SK board has a M.2 connector. This overlay enables the M2-CC3301 TI WiFi board to be used with it. Signed-off-by: Sabeeh Khan <sabeeh-khan@ti.com> (cherry picked from commit 28ca4101) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
The AM62p5-SK board has a M.2 connector. This overlay enables the M2-CC3301 TI WiFi board to be used with it. Signed-off-by: Sabeeh Khan <sabeeh-khan@ti.com> (cherry picked from commit ab651fce) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Guillaume LA ROQUE authored
Enable CC33XX wifi driver in modules Build dtbo and add it in dtbo.img Change-Id: Ie1504134aaef345724efef9604eb2308d947dc81 Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Align mac80211 API calls Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 0e221a13) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Integrate cc33xx into wireless/ti folder Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 800b22b6) Conflicts: drivers/net/wireless/ti/Makefile Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Allows a user-space tools to access FW APIs via CFG80211_TESTMODE infrastructure. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit ab69ae00) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
80211 power-save modes are handled automictically by HW but can be overridden here. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 2591e53b) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Various HW / FW / Driver controls unique for the CC33xx that can be set by OEMs. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit e5fc2412) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Handles the scan process. Scan starts via cc33xx_op_hw_scan (main.c) which calls cc33xx_scan. Scan channels are packed and sent to HW where scanning is managed by FW concurrently to other roles without driver intervention. Scan results are handled like normal management frames and are sent to MAC80211. HW notifies driver of scan completion via dedicated event which triggers a call to cc33xx_scan_completed. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 1f201496) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
High-level init code for new vifs Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 230e6e05) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Tx of data frames starts either with MAC80211 tx op (cc33xx_op_tx) or from the deferred IRQ context (irq_deferred_work). Both trigger cc->tx_work (cc33xx_tx_work @ tx.c) which will call cc33xx_tx_work_locked where data from MAC80211 SKBs will be packed and transferred to HW. An interrupt will then be received from HW indicating that a given frame was transmitted or expired so that its SKB can be freed (cc33xx_tx_immediate_complete). Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit dc8db367) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Code that handles parsing raw Rx data buffer from HW and, splitting it in to SKBs and handing them to MAC80211. Rx handling starts at cc33xx_rx. Full SKBs are stored at cc->deferred_rx_queue from where they are handed to MAC80211 by calling cc->netstack_work (cc33xx_netstack_work @ main.c). This allows calling ieee80211_rx_ni while new data is being read from HW. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit ea1f359c) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
General code and structures. Notably: cc33xx_irq - Handles IRQs received from the device. process_core_status - Core status is a new concept in CC33xx. it's a structure that is appended to each transfer from the device and contains its most up-to-date status report (IRQs, buffers, etc.). See struct core_status for details. process_event_and_cmd_result - Responses to driver commands and FW events both arrive asynchronously. Therefore, driver cannot know what he read from HW until inspecting the payload. This code reads and dispatches the data accordingly. cc33xx_recovery_work - Driver supports basic recovery on FW crash and other illegal conditions. This implements the recovery flow (Remove all vifs, turn device off and on, download FW, let ieee80211_restart_hw do the rest). irq_deferred_work - Does irq-related work that requires holding the cc->mutex. Thisd is mostly in response to HW's Tx/Rx IRQs. cc33xx_nvs_cb - Callback for the NVS FW request API. Similar to wlcore, this is where the init of the HW is performed. cc33xx_load_ini_bin_file - Loads a configuration file from user-space via the request FW API. The structure is described in a separate patch. cc33xx_op_X - MAC80211 operation handlers. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit def94761) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Implements FW download for CC33xx. The FW comes in 2 parts - a 2nd stage bootloader (cc33xx_2nd_loader.bin) and the actual FW (cc33xx_fw.bin). Each file is requested from user space, and transferred to device chunk by chunk. A dedicated IRQ is excepted after each stage (Device power-on -> 2nd stage loader -> FW). This logic is implemnted in cc33xx_init_fw. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 47938d08) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
Unlike in wlcore, events are queued on linked list (cc->event_list) and are handled outside the IRQ context. This will be more clear when looking at main.c Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 9247638c) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
These file contain various WLAN-oriented APIs Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 86b0c14f) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
This is the command infrastructure for the CC33xx. Similar to wlcore, all commands eventually reach __cc33xx_cmd_send which fills a generic command header and send the buffer via the IO abstraction layer. Unlike wlcore, there is no polling for command completion which is received via an interrupt which signals cc->command_complete. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 0b1b1e62) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
sdio.c implements SDIO transport functions. These are bound into struct cc33xx_if_operations and accessed via io.h in order to abstract multiple transport interfaces such as SPI in the future. The CC33xx driver supports the SDIO in-band IRQ option so the IRQ from the device received here as well. Unlike wl1xxx products, there is no longer mapping between HW and SDIO / SPI address space of any kind. There are only 3 valid addresses for control, data and status transactions each with a predefined structure. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 1b77a3c9) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
These are trace macros used throughout the driver. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit 4411b653) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
These are header files with definitions common to the entire driver. Signed-off-by: Michael Nemanov <michael.nemanov@ti.com> (cherry picked from commit d812e0c6) Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
- Jul 08, 2024
-
-
Current decoder logic is to synchronize filling ring buffer with bitstream data when last decoded image is finished processing. As a result, there has been significant drop in amount of pixels per second decoder can handle. Update driver to feed bitstream data as is becomes available for decoder to reach max performance. Signed-off-by: jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> Acked-by: Darren Etheridge <detheridge@ti.com> (cherry picked from commit 6b313dd2) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Introducing runtime pm into the Wave5 driver has caused issue with hrtimer functionality. The worker thread is executing when device is off which is leading to driver hang up. Moving start/stop to runtime pm hooks addresses this issue while also making hrtimer stop when Wave5 is not in use. Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit 0be8de03) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Wave5 encoder has not been properly setting buffer flags when the frame being processed is an IDR frame during an AVC encoder. Update driver to include correct flags when keyframe is being requested. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit 96e9c2bb) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Mattijs Korpershoek authored
Revert "TI: ANDROID: media: chips-media: wave5: Fix not to report V4L2_BUF_FLAG_KEYFRAME when codec is AVC encoder" This reverts commit 245732d7. This will be replaced by a newer patch from TI's tree: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/media/platform/chips-media/wave5?h=ti-linux-6.6.y&id=96e9c2bb13ae26671de53ce5431cc59a5671749e Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Wave5 encoder has capability to change parameters during runtime. This is particulary useful in streaming applications where network bandwidth can change at any moment. There are many parameters Wave5 can change during runtime, for now, only changing bitrate is supported. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit a2c69ac9) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Dynamic request of IDR frame is common in streaming scenarios. Add support for V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME control so user can control when Wave5 sets new IDR frame for encoded stream. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit a7e2cbde) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Constrained Baseline Profile (CBP) and Baseline Profile (BP) have been treated as the same, defaulting to CBP. Introduce the ability to differentiate between the two. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit 424d038c) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Add support for the YUV422P, NV16, NV61, YUV422M, NV16M, NV61M raw pixel-formats to the Wave5 encoder. All these formats have a chroma subsampling ratio of 4:2:2 and therefore require a new image size calculation as the driver previously only handled a ratio of 4:2:0. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit 9942e93e) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Use v4l2-common helper functions to calculate bytesperline and sizeimage, instead of calculating in a wave5 driver directly. In case of raw(YUV) v4l2_pix_format, the wave5 driver updates v4l2_pix_format_mplane struct through v4l2_fill_pixfmt_mp() function. Encoder and Decoder need same bytesperline and sizeimage values for same v4l2_pix_format. So, a wave5_update_pix_fmt is refactored to support both together. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit 06e248b5) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Add support for runtime suspend/resume in the encoder and decoder. This is achieved by saving the VPU state and powering it off while the VPU idle. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit b839c03e) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Provide a control to toggle (0 = off / 1 = on), whether the SPS and PPS are generated for every IDR. Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit a5c4806f) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Multi-stream can cause capture buffers to be allocated before the sequence header is parsed leading to device hang. Ensure that sequence header is parsed prior to setting up capture buffers by calling in start_streaming for output queue. Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit 98ed806c) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
In case of multi instance, interrupt can occurr for other instance as soon as interrupt is cleared. If driver read the instance_info after clearing the interrupt, we cannot ensure the instance_info is valid for current interrupt. Read the instance_info register for each interrupt before clear the interrupt. Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit ff5a47a1) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
[ Upstream commit ed7276ed ] Add support for starting a polling timer in case an interrupt is not available. This helps to keep the VPU functional in SoCs such as AM62A, where the hardware interrupt hookup may not be present due to an SoC errata [1]. The timer is shared across all instances of encoders and decoders and is started when the first instance of an encoder or decoder is opened and stopped when the last instance is closed, thus avoiding per instance polling and saving CPU bandwidth. As VPU driver manages this instance related tracking and synchronization, the aforementioned shared timer related polling logic is implemented within the VPU driver itself. This scheme may also be useful in general too (even if irq is present) for non-realtime multi-instance VPU use-cases (for e.g 32 instances of VPU being run together) where system is running already under high interrupt load and switching to polling may help mitigate this as the polling thread is shared across all the VPU instances. Hrtimer is chosen for polling here as it provides precise timing and scheduling and the API seems better suited for periodic polling task such as this. As a general rule of thumb, Worst case latency with hrtimer = Actual latency (achievable with irq) + Polling interval NOTE (the meaning of terms used above is as follows): - Latency: Time taken to process one frame - Actual Latency : Time taken by hardware to process one frame and signal it to OS (i.e. if latency that was possible to achieve if irq line was present) There is a trade-off between latency and CPU usage when deciding the value for polling interval. With aggressive polling intervals (i.e. going with even lesser values) the CPU usage increases although worst case latencies get better. On the contrary, with greater polling intervals worst case latencies will increase although the CPU usage will decrease. The 5ms offered a good balance between the two as we were able to reach close to actual latencies (as achievable with irq) without incurring too much of CPU as seen in below experiments and thus 5ms is chosen as default polling interval. - 1x 640x480@25 Encoding using different hrtimer polling intervals [2] - 4x 1080p30 Transcode (File->decode->encode->file) irq vs polling comparison [3] - 1x 1080p Transcode (File->decode->encode->file) irq vs polling comparison [4] - 1080p60 Streaming use-case irq vs polling comparison [5] - 1x 1080p30 sanity decode and encode tests [6] The polling interval can also be changed using vpu_poll_interval module param in case user want to change it as per their use-case requirement keeping in mind above trade-off. Parse the irq number and if not present, initialize the hrtimer and the polling worker thread before proceeding with v4l2 device registrations. Based on interrupt status, we use a worker thread to iterate over the interrupt status for each instance and send completion event as being done in irq thread function. Move the core functionality of the irq thread function to a separate function wave5_vpu_handle_irq so that it can be used by both the worker thread when using polling mode and irq thread when using interrupt mode. Protect the hrtimer access and instance list with device specific mutex locks to avoid race conditions while different instances of encoder and decoder are started together. [1] https://www.ti.com/lit/pdf/spruj16 (Ref: Section 4.2.3.3 Resets, Interrupts, and Clocks) [2] https://gist.github.com/devarsht/ee9664d3403d1212ef477a027b71896c [3] https://gist.github.com/devarsht/3a58b4f201430dfc61697c7e224e74c2 [4] https://gist.github.com/devarsht/a6480f1f2cbdf8dd694d698309d81fb0 [5] https://gist.github.com/devarsht/44aaa4322454e85e01a8d65ac47c5edb [6] https://gist.github.com/devarsht/2f956bcc6152dba728ce08cebdcebe1d Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Tested-by: Jackson Lee <jackson.lee@chipsnmedia.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Link: https://patchwork.linuxtv.org/project/linux-media/patch/20240310104827.665456-1-devarsht@ti.com/ Signed-off-by: Brandon Brnich <b-brnich@ti.com> (cherry picked from commit aee0ea86) Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
- Jul 01, 2024
-
-
Guillaume LA ROQUE authored
android14-6.1 June 2024 release 2 Artifacts: https://ci.android.com/builds/submitted/11990555/kernel_aarch64/latest * tag 'android14-6.1-2024-06_r2': (653 commits) Revert "f2fs: fix to tag gcing flag on page during block migration" FROMGIT: arm64: mte: Make mte_check_tfsr_*() conditional on KASAN instead of MTE ANDROID: gki_defconfig: Disable CONFIG_BRCMSTB_DPFE and CONFIG_BRCMSTB_MEMC FROMGIT: f2fs: fix to avoid use SSR allocate when do defragment ANDROID: 16K: Only check basename of linker context ANDROID: 16K: Avoid and document padding madvise lock warning ANDROID: arm64: vdso32: support user-supplied flags ANDROID: GKI: Add initial symbol list for bcmstb ANDROID: gki_defconfig: Enable Broadcom STB SoCs UPSTREAM: mmc: core: Do not force a retune before RPMB switch UPSTREAM: arm64/arm: arm_pmuv3: perf: Don't truncate 64-bit registers BACKPORT: net: phy: Allow drivers to always call into ->suspend() UPSTREAM: ARM: perf: Mark all accessor functions inline UPSTREAM: arm64: perf: Mark all accessor functions inline UPSTREAM: perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype UPSTREAM: ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM UPSTREAM: ARM: Make CONFIG_CPU_V7 valid for 32bit ARMv8 implementations UPSTREAM: perf: pmuv3: Change GENMASK to GENMASK_ULL UPSTREAM: perf: pmuv3: Move inclusion of kvm_host.h to the arch-specific helper UPSTREAM: perf: pmuv3: Abstract PMU version checks ... Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
-
- Jun 19, 2024
-
-
Jaegeuk Kim authored
This reverts commit 7c972c89. [ 146.693904][ T8878] WARNING: CPU: 2 PID: 8878 at fs/f2fs/segment.c:3335 f2fs_allocate_data_block+0x130/0xd08 panic in: f2fs_write_data_pages -> f2fs_write_multi_pages -> f2fs_write_single_data_page -> f2fs_do_write_data_page -> f2fs_outplace_write_data -> do_write_page -> f2fs_allocate_data_block if (from_gc) { f2fs_bug_on(sbi, GET_SEGNO(sbi, old_blkaddr) == NULL_SEGNO); se = get_seg_entry(sbi, GET_SEGNO(sbi, old_blkaddr)); sanity_check_seg_type(sbi, se->type); f2fs_bug_on(sbi, IS_NODESEG(se->type)); } Bug: 345273844 Bug: 348080443 Change-Id: I62732bbcb37a7864588886b862b590a463b4d1d9 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com> (cherry picked from commit c0618d18)
-