| 035371c9 | 17-Dec-2024 |
Jackson.lee <[email protected]> |
media: chips-media: wave5: Fix timeout while testing 10bit hevc fluster
The Wave5 521C variant does not support 10 bit decoding. When 10 bit decoding support was added for the 515 variant, a section
media: chips-media: wave5: Fix timeout while testing 10bit hevc fluster
The Wave5 521C variant does not support 10 bit decoding. When 10 bit decoding support was added for the 515 variant, a section of the code was removed which returned an error. This removal causes a timeout for the 521 variant, which was discovered during HEVC 10-bit decoding tests.
Fixes: 143e7ab4d9a0 ("media: chips-media: wave5: support decoding HEVC Main10 profile") Cc: [email protected] Signed-off-by: Jackson.lee <[email protected]> Signed-off-by: Nas Chung <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| a2c75e96 | 17-Dec-2024 |
Jackson.lee <[email protected]> |
media: chips-media: wave5: Fix a hang after seeking
While seeking, the driver calls the flush command. Before the flush command is sent to the VPU, the driver should handle the display buffer flags
media: chips-media: wave5: Fix a hang after seeking
While seeking, the driver calls the flush command. Before the flush command is sent to the VPU, the driver should handle the display buffer flags and should get all decoded information from the VPU if the VCORE is running.
Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer") Cc: [email protected] Signed-off-by: Jackson.lee <[email protected]> Signed-off-by: Nas Chung <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| ac35f768 | 17-Dec-2024 |
Jackson.lee <[email protected]> |
media: chips-media: wave5: Avoid race condition in the interrupt handler
In case of multiple active instances, new interrupts can occur as soon as the current interrupt is cleared. If the driver rea
media: chips-media: wave5: Avoid race condition in the interrupt handler
In case of multiple active instances, new interrupts can occur as soon as the current interrupt is cleared. If the driver reads the instance_info after clearing the interrupt, then there is no guarantee, that the instance_info is still valid for the current interrupt.
Read the instance_info register for each interrupt before clearing the interrupt.
Fixes: ed7276ed2fd0 ("media: chips-media: wave5: Add hrtimer based polling support") Cc: [email protected] Signed-off-by: Jackson.lee <[email protected]> Signed-off-by: Nas Chung <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| 1b4420bd | 12-Aug-2024 |
Jackson.lee <[email protected]> |
media: chips-media: wave5: Support YUV422 raw pixel-formats on the encoder.
Add support for the YUV422P, NV16, NV61, YUV422M, NV16M, NV61M raw pixel-formats to the Wave5 encoder.
All these formats
media: chips-media: wave5: Support YUV422 raw pixel-formats on the encoder.
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 <[email protected]> Signed-off-by: Nas Chung <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Nicolas Dufresne <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| 88ff31fd | 12-Aug-2024 |
Jackson.lee <[email protected]> |
media: chips-media: wave5: Use helpers to calculate bytesperline and sizeimage.
Use v4l2-common helper functions to calculate bytesperline and sizeimage, instead of calculating in a wave5 driver dir
media: chips-media: wave5: Use helpers to calculate bytesperline and sizeimage.
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 the same bytesperline and sizeimage values for the same v4l2_pix_format. So, wave5_update_pix_fmt function is refactored to support both together.
Signed-off-by: Jackson.lee <[email protected]> Signed-off-by: Nas Chung <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Nicolas Dufresne <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| 6aa08291 | 15-Apr-2024 |
Ivan Bornyakov <[email protected]> |
media: chips-media: wave5: support Wave515 decoder
Add initial support for the Wave515 multi-decoder IP. For now it is only able to decode HEVC Main/Main10 profile videos into YUV420.
This was test
media: chips-media: wave5: support Wave515 decoder
Add initial support for the Wave515 multi-decoder IP. For now it is only able to decode HEVC Main/Main10 profile videos into YUV420.
This was tested on FPGA prototype, so wave5_dt_ids[] was not expanded. Users of the real hardware with Wave515 IP will have to * provide firmware specific to their SoC * add struct wave5_match_data like this:
static const struct wave5_match_data platform_name_wave515_data = { .flags = WAVE5_IS_DEC, .fw_name = "cnm/wave515_platform_name_fw.bin", .sram_size = (71 * 1024), };
* add item to wave5_dt_ids[] like this:
{ .compatible = "vendor,soc-wave515", .data = &platform_name_wave515_data, },
* describe new compatible in Documentation/devicetree/bindings/media/cnm,wave521c.yaml
Signed-off-by: Ivan Bornyakov <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| a83d4a68 | 15-Apr-2024 |
Ivan Bornyakov <[email protected]> |
media: chips-media: wave5: drop "sram-size" DT property
Move the excessive "sram-size" device-tree property to the device match data. Also change the SRAM memory allocation strategy, instead of allo
media: chips-media: wave5: drop "sram-size" DT property
Move the excessive "sram-size" device-tree property to the device match data. Also change the SRAM memory allocation strategy, instead of allocating exactly sram_size bytes, allocate all available SRAM memory up to sram_size. Add the placeholders wave5_vpu_dec_validate_sec_axi() and wave5_vpu_enc_validate_sec_axi() to validate that the allocated SRAM memory is sufficient to decode/encode bitstream with a given resolution.
Signed-off-by: Ivan Bornyakov <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| 749476d4 | 15-Apr-2024 |
Ivan Bornyakov <[email protected]> |
media: chips-media: wave5: separate irq setup routine
Implement a separate setup routine for interrupts to reduce code duplication. Also enable interrupts based on vpu_attr->support_encoders and vpu
media: chips-media: wave5: separate irq setup routine
Implement a separate setup routine for interrupts to reduce code duplication. Also enable interrupts based on vpu_attr->support_encoders and vpu_attr->support_decoders fields to facilitate support for other Wave5xx IPs, because not all of them are both encoders and decoders.
Signed-off-by: Ivan Bornyakov <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| 2b918842 | 15-Apr-2024 |
Ivan Bornyakov <[email protected]> |
media: chips-media: wave5: support reset lines
Add initial support for optional reset lines. For now, simply deassert resets while probing the driver and assert them back when removing the driver.
media: chips-media: wave5: support reset lines
Add initial support for optional reset lines. For now, simply deassert resets while probing the driver and assert them back when removing the driver.
Signed-off-by: Ivan Bornyakov <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| ad9be163 | 23-Feb-2024 |
Uwe Kleine-König <[email protected]> |
media: chips-media: wave5: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible
media: chips-media: wave5: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| 1ddeeac2 | 06-Dec-2023 |
Randy Dunlap <[email protected]> |
media: chips-media: wave5: Requires GENERIC_ALLOCATOR
This driver uses the API that is provided by GENERIC_ALLOCATOR API, so select it to prevent build errors:
riscv32-linux-ld: drivers/media/platf
media: chips-media: wave5: Requires GENERIC_ALLOCATOR
This driver uses the API that is provided by GENERIC_ALLOCATOR API, so select it to prevent build errors:
riscv32-linux-ld: drivers/media/platform/chips-media/wave5/wave5-vpu.o: in function `.L37': wave5-vpu.c:(.text+0x468): undefined reference to `of_gen_pool_get' riscv32-linux-ld: drivers/media/platform/chips-media/wave5/wave5-vdi.o: in function `.L116': wave5-vdi.c:(.text+0xaac): undefined reference to `gen_pool_dma_alloc' riscv32-linux-ld: drivers/media/platform/chips-media/wave5/wave5-vdi.o: in function `wave5_vdi_free_sram': wave5-vdi.c:(.text+0xb60): undefined reference to `gen_pool_free_owner'
Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer") Signed-off-by: Randy Dunlap <[email protected]> Cc: Nas Chung <[email protected]> Cc: Jackson Lee <[email protected]> Cc: Hans Verkuil <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|
| 4e4103d6 | 29-Nov-2023 |
Mattijs Korpershoek <[email protected]> |
media: chips-media: wave5: Fix panic on decoding DECODED_IDX_FLAG_SKIP
The display frame region information received from the vpu also contains the frame display index: info->index_frame_display.
T
media: chips-media: wave5: Fix panic on decoding DECODED_IDX_FLAG_SKIP
The display frame region information received from the vpu also contains the frame display index: info->index_frame_display.
This index, being a s32, can be negative when a skip option is passed. In that case, its value is DECODED_IDX_FLAG_SKIP (-2).
When disp_idx == -2, the following exception occurs:
[ 1530.782246][ T1900] Hardware name: Texas Instruments AM62P5 SK (DT) [ 1530.788501][ T1900] pstate: a0400005 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1530.796144][ T1900] pc : wave5_vpu_dec_get_output_info+0x300/0x308 [wave5] [ 1530.803060][ T1900] lr : wave5_vpu_dec_get_output_info+0x80/0x308 [wave5] [ 1530.809873][ T1900] sp : ffffffc00b85bc00 [ 1530.813872][ T1900] x29: ffffffc00b85bc00 x28: 0000000000000000 x27: 0000000000000001 [ 1530.821695][ T1900] x26: 00000000fffffffd x25: 00000000ffffffff x24: ffffff8812820000 [ 1530.829516][ T1900] x23: ffffff88199f7840 x22: ffffff8873f5e000 x21: ffffffc00b85bc58 [ 1530.837336][ T1900] x20: 0000000000000000 x19: ffffff88199f7920 x18: ffffffc00a899030 [ 1530.845156][ T1900] x17: 00000000529c6ef0 x16: 00000000529c6ef0 x15: 0000000000198487 [ 1530.852975][ T1900] x14: ffffffc009f2b650 x13: 0000000000058016 x12: 0000000005000000 [ 1530.860795][ T1900] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 [ 1530.868615][ T1900] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000004086 [ 1530.876434][ T1900] x5 : 0000000000000001 x4 : ffffffc001454b94 x3 : ffffffc001454d94 [ 1530.884256][ T1900] x2 : ffffffc00b8201d0 x1 : 0000000000000020 x0 : 0000000000000000 [ 1530.892087][ T1900] Call trace: [ 1530.895225][ T1900] wave5_vpu_dec_get_output_info+0x300/0x308 [wave5] [ 1530.901788][ T1900] wave5_vpu_dec_finish_decode+0x6c/0x3dc [wave5] [ 1530.908081][ T1900] wave5_vpu_irq_thread+0x140/0x168 [wave5] [ 1530.913856][ T1900] irq_thread_fn+0x44/0xa4 [ 1530.918154][ T1900] irq_thread+0x15c/0x288 [ 1530.922330][ T1900] kthread+0x104/0x1d4 [ 1530.926247][ T1900] ret_from_fork+0x10/0x20 [ 1530.930520][ T1900] Code: 2a1f03ea 2a1f03eb 35ffef2c 17ffff74 (d42aa240) [ 1530.937296][ T1900] ---[ end trace 0000000000000000 ]--- [ 1530.942596][ T1900] Kernel panic - not syncing: BRK handler: Fatal exception [ 1530.949629][ T1900] SMP: stopping secondary CPUs [ 1530.954244][ T1900] Kernel Offset: disabled [ 1530.958415][ T1900] CPU features: 0x00,00000000,00800184,0000421b [ 1530.964496][ T1900] Memory Limit: none
Move the disp_info assignment after testing that the index is positive to avoid the exception.
Fixes: 45d1a2b93277 ("media: chips-media: wave5: Add vpuapi layer") Signed-off-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Nicolas Dufresne <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
show more ...
|