encoder: Expand Ctrl API
Expand Ctrl API for finer control over encoding parameters.
Updated firmware for compatibility with programming the
INTRA_PRED_MODES register.
Signed-off-by: David Huang <d-huang@ti.com>
Expand Ctrl API for finer control over encoding parameters.
Updated firmware for compatibility with programming the
INTRA_PRED_MODES register.
Signed-off-by: David Huang <d-huang@ti.com>
timmlib: decoder: increase max channels to 8
Signed-off-by: David Huang <d-huang@ti.com>
Signed-off-by: David Huang <d-huang@ti.com>
encoder: Fix hang on Page Fault
Remove prints fron ISR context, and change Event call to use 0 timeout
since this exists within ISR context.
Signed-off-by: David Huang <d-huang@ti.com>
Remove prints fron ISR context, and change Event call to use 0 timeout
since this exists within ISR context.
Signed-off-by: David Huang <d-huang@ti.com>
encoder/decoder: Fix Klocwork issues
Fix static analysis revealed issues. This included removing the concept
of use_secure_fw_upload since this is currently an unsupported feature
with incomplete code
Signed-off-by: David Huang <d-huang@ti.com>
Fix static analysis revealed issues. This included removing the concept
of use_secure_fw_upload since this is currently an unsupported feature
with incomplete code
Signed-off-by: David Huang <d-huang@ti.com>
[TIOVX-1003] Adding mutex to fix a customer reported issue
timmlib: encoder: Update ENUM name
Update name within enum to be consistent
Signed-off-by: David Huang <d-huang@ti.com>
Update name within enum to be consistent
Signed-off-by: David Huang <d-huang@ti.com>
encoder: initialize stack variable to avoid undefined variable issues
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
encoder: added support for 2 slice encoding as configurable
mode
This patch adds 2 slice encoding mode and is configurable.
In order to enable 2 slice encoding, application has to
set nslices = 2 and provide a valid address for 2nd coded package during
process call.
For default 1 slice encoding, application has to set
nslices = 1, and provide NULL for 2nd coded package
during the process call.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
mode
This patch adds 2 slice encoding mode and is configurable.
In order to enable 2 slice encoding, application has to
set nslices = 2 and provide a valid address for 2nd coded package during
process call.
For default 1 slice encoding, application has to set
nslices = 1, and provide NULL for 2nd coded package
during the process call.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
encoder: fix mmu leak for encoder input and output buffers
This patch fixes mmu leak for input and output buffers by
calling mmau unmap call for all the registered buffers.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes mmu leak for input and output buffers by
calling mmau unmap call for all the registered buffers.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
encoder: added support for ocm ram allocation for above mb params
This patch adds support for allocating above mb params from
either ocm ram or from DDR. OCM RAM is used if application
provides it during encoder init (one time initialization).
Vision apps/application framework is expected to provide the
ram pool base address and size (either 0, 32KB or 64KB).
Encoder driver will split the ram into two chunks and enable
max of two instancesbe to use it for above mb params, rest of
the channels have to use the default ddr allocation for
above mb params.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch adds support for allocating above mb params from
either ocm ram or from DDR. OCM RAM is used if application
provides it during encoder init (one time initialization).
Vision apps/application framework is expected to provide the
ram pool base address and size (either 0, 32KB or 64KB).
Encoder driver will split the ram into two chunks and enable
max of two instancesbe to use it for above mb params, rest of
the channels have to use the default ddr allocation for
above mb params.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
timmlib: encoder/decoder: Add Ctrl API
Add Ctrl API to enable user configuration of additional parameters
at Create time.
Signed-off-by: David Huang <d-huang@ti.com>
Add Ctrl API to enable user configuration of additional parameters
at Create time.
Signed-off-by: David Huang <d-huang@ti.com>
encoder: Improve Encoded Output
Improved default encoded output, based on settings for 1920x1080 stream.
Main Changes include:
1. Change default RC mode to VBR
2. Automatically calculate QP values
3. Default to I&P frame encoding
4. Correctly calculate initial_level
sVBR RC mode is also useable with these changes.
Signed-off-by: David Huang <d-huang@ti.com>
Improved default encoded output, based on settings for 1920x1080 stream.
Main Changes include:
1. Change default RC mode to VBR
2. Automatically calculate QP values
3. Default to I&P frame encoding
4. Correctly calculate initial_level
sVBR RC mode is also useable with these changes.
Signed-off-by: David Huang <d-huang@ti.com>
osal: tirtos: Check before deleting task
Check if tasks are automatically deleted before
manually deleting them
Signed-off-by: David Huang <d-huang@ti.com>
Check if tasks are automatically deleted before
manually deleting them
Signed-off-by: David Huang <d-huang@ti.com>
Update Interupt ID for MCU2_0
To migrate the tirtos drivers from MCU2_1 to MCU2_0,
update the IRQ IDs for encoder and decoder driver.
Signed-off-by: David Huang <d-huang@ti.com>
To migrate the tirtos drivers from MCU2_1 to MCU2_0,
update the IRQ IDs for encoder and decoder driver.
Signed-off-by: David Huang <d-huang@ti.com>
driver: encoder: Free resources in topaz_process_message
Free the current_el and current_el->data memory at the end of
topaz_process_message to fix memory leak.
Signed-off-by: David Huang <d-huang@ti.com>
Free the current_el and current_el->data memory at the end of
topaz_process_message to fix memory leak.
Signed-off-by: David Huang <d-huang@ti.com>
osal: tirtos: osa_queue: Fix semaphore cleanup
On queue deletion, fix semaphore deletion failure due to
incorrect address passed.
Signed-off-by: David Huang <d-huang@ti.com>
On queue deletion, fix semaphore deletion failure due to
incorrect address passed.
Signed-off-by: David Huang <d-huang@ti.com>
timmlib: doxygen fixes for interface files
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
timmlib: encoder: KW fixes for critical and error scenarios
This patch fixes KW critical and error issues from encoder
driver.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes KW critical and error issues from encoder
driver.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
linux: encoder/decoder: Removed hard coded CROSS_COMPILE in Makefile
Use the variable $(CROSS_COMPILE) instead of hard coding
aarch64linux-gnu- as the cross compiler in Makefiles.
Signed-off-by: David Huang <d-huang@ti.com>
Use the variable $(CROSS_COMPILE) instead of hard coding
aarch64linux-gnu- as the cross compiler in Makefiles.
Signed-off-by: David Huang <d-huang@ti.com>
linux: encoder: fix compilation issue with debug mode
This patch fixes debug mode variable definition scope issue and also
fixes the makefile for profiling mode flag.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes debug mode variable definition scope issue and also
fixes the makefile for profiling mode flag.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Revert "encoder: Fix kernel debug warning for DMA-API"
This reverts commit f5c1c28e74c3ef4e1a018a37ae999e08388b635c.
This reverts commit f5c1c28e74c3ef4e1a018a37ae999e08388b635c.
timmlib: encoder: Add support for memory leak dump on destory and deinit
This patch adds dump of any leaked memory during the stream encoding.
The list of all outstanding memory allocations are dumped during
the stream destory and during the encoder driver de-init. The logic is
kept under DEBUG_OSA_MEM and has been disabled by default.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch adds dump of any leaked memory during the stream encoding.
The list of all outstanding memory allocations are dumped during
the stream destory and during the encoder driver de-init. The logic is
kept under DEBUG_OSA_MEM and has been disabled by default.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
tirtos: encoder: Fix mutex usage issue
This patch fixes logic issue with using the driver mutex
and also cleans up unused contenxt variables.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes logic issue with using the driver mutex
and also cleans up unused contenxt variables.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
driver: encoder: Add support for encoder performance profiling
Latency profiling support has been added for encoder firmware
level as well as driver level.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Latency profiling support has been added for encoder firmware
level as well as driver level.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
driver: encoder: Add support for dynamic slice map calculation
Hardcoded slice map is replaced with dynamic calculation and
all the required slice and pipe parameters are set correctly.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Hardcoded slice map is replaced with dynamic calculation and
all the required slice and pipe parameters are set correctly.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
linux: encoder: Makefile update to add memory tracking feature for debug
This patch adds DEBUG_OSA_MEM debug option to encoder makefile. This
feature is kept disabled by default and expected to be enabled only
for debug purpose.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch adds DEBUG_OSA_MEM debug option to encoder makefile. This
feature is kept disabled by default and expected to be enabled only
for debug purpose.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
linux: decoder: Reset EOS state and cleanup internal lists for V4L2 Plugin restart to work
Reset the eos state, buf mapping state and also the internal lists
to bring the module back to proper initial state to restart decoding.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Reset the eos state, buf mapping state and also the internal lists
to bring the module back to proper initial state to restart decoding.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
encoder: tirtos: H264 encoder driver support has been added
This patch enables H.264 encoder driver for TIRTOS SDK, and enbales
co-existance of encoder and decoder drivers.
Main changes include
1. Encoder timmlib addition
2. Additional OSAL files required for encoder driver
3. Decoder changes to co-exist with encoder driver
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch enables H.264 encoder driver for TIRTOS SDK, and enbales
co-existance of encoder and decoder drivers.
Main changes include
1. Encoder timmlib addition
2. Additional OSAL files required for encoder driver
3. Decoder changes to co-exist with encoder driver
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: 1st set of fixes for Klocwork reported warning issues
This patch fixes multiple warnings reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
This patch fixes multiple warnings reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
decoder: fix kernel crash during linux bootup
- This issue occurs when firmware binary is not present
in the rootfs so adding condition to check if firmware
is present or not.
Signed-off-by: Amit Makani <amit.makani@ti.com>
- This issue occurs when firmware binary is not present
in the rootfs so adding condition to check if firmware
is present or not.
Signed-off-by: Amit Makani <amit.makani@ti.com>
decoder: fix error recovery test for VDEC_ERROR_SR_ERROR
- VDEC_ERROR_SR_ERROR is for emulating software shift register error
now by setting zero to fw_error_value in sysfs will generate error.
Signed-off-by: Amit Makani <amit.makani@ti.com>
- VDEC_ERROR_SR_ERROR is for emulating software shift register error
now by setting zero to fw_error_value in sysfs will generate error.
Signed-off-by: Amit Makani <amit.makani@ti.com>
decoder: 4th set of fixes for Klocwork reported critical issues
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: 3rd set of fixes for Klocwork reported critical issues
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Megharaj A G <megharaj@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Megharaj A G <megharaj@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Decoder: RTOS driver profiling support is added.
RTOS mm lib profiler is added with compile time enable/disable control
with ENABLE_PROFILE config flag. the feature is disabled by default.
This patch also removes un-used variable from "struct vxd_return"
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Amai Prashanth Kumar <prashanth.amai@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
RTOS mm lib profiler is added with compile time enable/disable control
with ENABLE_PROFILE config flag. the feature is disabled by default.
This patch also removes un-used variable from "struct vxd_return"
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Amai Prashanth Kumar <prashanth.amai@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: 2nd set of Fixes for Klocwork reported critical issues
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: rtos: remove unnecessary buffer mapped trace
For OpenVX framework, bufprepare gets called every time along
with process. This is a valid scenario for OpenVX and not an
error, so the "buffer is already mapped" trace should not
come as an error trace.
This trace is commented out because it will come for every frame
decode otherwise.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
For OpenVX framework, bufprepare gets called every time along
with process. This is a valid scenario for OpenVX and not an
error, so the "buffer is already mapped" trace should not
come as an error trace.
This trace is commented out because it will come for every frame
decode otherwise.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
timmlib: Decoder: comments added to make zero warnings during doxygen build
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: Fixes for Klocwork reported critical issues
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Megharaj A G <megharaj@ti.com>
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Amai Prashanth Kumar <prashanth.amai@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes multiple issues reported by Klockwork
static analysis tool. No functionality change introduced
with these fixes.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Megharaj A G <megharaj@ti.com>
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Amai Prashanth Kumar <prashanth.amai@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: Fix trace level for informative traces
This patch fixes informative level traces to be under
OSA_PR_INFO category. This is required to avoid unwanted
traces for every decode run.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This patch fixes informative level traces to be under
OSA_PR_INFO category. This is required to avoid unwanted
traces for every decode run.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: tirtos: makefile: enable REDUCED_DPB_NO_PIC_REORDERING config
This config flag is enabled to avoid one frame delay for display callback
for I-frame only streams decoding. Since tirtos decoder driver is used for
I-frame only stream decoding, this config flag is enabled by default.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
This config flag is enabled to avoid one frame delay for display callback
for I-frame only streams decoding. Since tirtos decoder driver is used for
I-frame only stream decoding, this config flag is enabled by default.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: rtos: remove unnecessary buffer mapped trace
For OpenVX framework, bufprepare gets called every time along
with process. This is a valid scenario for OpenVX and not an
error, so the "buffer is already mapped" trace should not
come as an error trace.
This trace is commented out because it will come for every frame
decode otherwise.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
For OpenVX framework, bufprepare gets called every time along
with process. This is a valid scenario for OpenVX and not an
error, so the "buffer is already mapped" trace should not
come as an error trace.
This trace is commented out because it will come for every frame
decode otherwise.
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: rtos: Add multi-planar support
This patch adds multi-planar support.
The following changes are also included:
- Memory-leak patch applied for RTOS testing
- glue layer Error recovery patch is added
- check condition is added to know the MM buffer is 4K aligned or not
Signed-off-by: Gaviraju D B <x1046101@ti.com>
This patch adds multi-planar support.
The following changes are also included:
- Memory-leak patch applied for RTOS testing
- glue layer Error recovery patch is added
- check condition is added to know the MM buffer is 4K aligned or not
Signed-off-by: Gaviraju D B <x1046101@ti.com>
encoder/decoder: Fix lockdep warnings
Kernel lockdep throws warnings for seemingly nested locking
of mutexes, even though the mutexes are not the same.
Fix the warnings by replacing the mutex_lock calls with
mutex_lock_nested calls.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Kernel lockdep throws warnings for seemingly nested locking
of mutexes, even though the mutexes are not the same.
Fix the warnings by replacing the mutex_lock calls with
mutex_lock_nested calls.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
osal: time: Don't allocate memory for timespec
This fixes the following kernel debug warning:
BUG: sleeping function called from invalid context at mm/slab.h:422
This patch removes the need to allocation by defining
a new structure "struct osa_timespec", which is different
for each OS. This structure can be used in the common
code and it will use the OS-specific definition.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This fixes the following kernel debug warning:
BUG: sleeping function called from invalid context at mm/slab.h:422
This patch removes the need to allocation by defining
a new structure "struct osa_timespec", which is different
for each OS. This structure can be used in the common
code and it will use the OS-specific definition.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
encoder: Fix kernel debug warning for DMA-API
This patch fixes the following warning thrown from DMA-API
debugging:
img_enc 4200000.video-encoder: DMA-API: device driver syncs DMA memory with different direction
Memory mapping is fixed to be bi-directional, because the API is
generic and can be used for communication in either direction.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch fixes the following warning thrown from DMA-API
debugging:
img_enc 4200000.video-encoder: DMA-API: device driver syncs DMA memory with different direction
Memory mapping is fixed to be bi-directional, because the API is
generic and can be used for communication in either direction.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
encoder/decoder: fix incorrect handle use in mutex_destroy
A few places were using the wrong handle to the call. This patch
fixes it to pass the correct value.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
A few places were using the wrong handle to the call. This patch
fixes it to pass the correct value.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: Reproduce firmware non responsiveness through sysfs
Add sysfs entry ability to reproduce the firmware unresponsive
error case.
Signed-off-by: Megharaj A G <megharaj@ti.com>
Add sysfs entry ability to reproduce the firmware unresponsive
error case.
Signed-off-by: Megharaj A G <megharaj@ti.com>
decoder: Add resource leak debugging
Add code to track the allocations and frees through
the osa_mem module. By default, the memory debug tracking
is disabled in the makefile. To enable, set DEBUG_OSA_MEM
to "y":
DEBUG_OSA_MEM=y
When osa_mem debug tracing is enabled, whenever a handle
is closed or the module is removed, debug traces will print
showing outstanding allocations.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Add code to track the allocations and frees through
the osa_mem module. By default, the memory debug tracking
is disabled in the makefile. To enable, set DEBUG_OSA_MEM
to "y":
DEBUG_OSA_MEM=y
When osa_mem debug tracing is enabled, whenever a handle
is closed or the module is removed, debug traces will print
showing outstanding allocations.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: add missing cleanup of allocations
Fix some missing allocation cleanups in release/shutdown path.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Fix some missing allocation cleanups in release/shutdown path.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: fix crash when error recovery occurs
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Amit Makani <amit.makani@ti.com>
encoder: linux: Fix rt-linux build
This patch fixes the following build issues seen in rt-linux builds:
linux/encoder/vxe_v4l2.c: In function 'soft_thread_irq':
linux/encoder/vxe_v4l2.c:1599:10: error: 'IRQ_HANDLED' undeclared (first use in this function); did you mean 'OSA_IRQ_HANDLED'?
return IRQ_HANDLED;
^~~~~~~~~~~
OSA_IRQ_HANDLED
linux/encoder/vxe_v4l2.c:1599:10: note: each undeclared identifier is reported only once for each function it appears in
linux/encoder/vxe_v4l2.c:1601:9: error: 'IRQ_NONE' undeclared (first use in this function); did you mean 'WBI_NONE'?
return IRQ_NONE;
^~~~~~~~
WBI_NONE
linux/encoder/vxe_v4l2.c: In function 'vxe_enc_probe':
linux/encoder/vxe_v4l2.c:1677:3: error: implicit declaration of function 'free_irq'; did you mean 'free_uid'? [-Werror=implicit-function-declaration]
free_irq(module_irq, &vxe->topaz_dev_ctx);
^~~~~~~~
free_uid
linux/encoder/vxe_v4l2.c: In function 'soft_thread_irq':
linux/encoder/vxe_v4l2.c:1602:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch fixes the following build issues seen in rt-linux builds:
linux/encoder/vxe_v4l2.c: In function 'soft_thread_irq':
linux/encoder/vxe_v4l2.c:1599:10: error: 'IRQ_HANDLED' undeclared (first use in this function); did you mean 'OSA_IRQ_HANDLED'?
return IRQ_HANDLED;
^~~~~~~~~~~
OSA_IRQ_HANDLED
linux/encoder/vxe_v4l2.c:1599:10: note: each undeclared identifier is reported only once for each function it appears in
linux/encoder/vxe_v4l2.c:1601:9: error: 'IRQ_NONE' undeclared (first use in this function); did you mean 'WBI_NONE'?
return IRQ_NONE;
^~~~~~~~
WBI_NONE
linux/encoder/vxe_v4l2.c: In function 'vxe_enc_probe':
linux/encoder/vxe_v4l2.c:1677:3: error: implicit declaration of function 'free_irq'; did you mean 'free_uid'? [-Werror=implicit-function-declaration]
free_irq(module_irq, &vxe->topaz_dev_ctx);
^~~~~~~~
free_uid
linux/encoder/vxe_v4l2.c: In function 'soft_thread_irq':
linux/encoder/vxe_v4l2.c:1602:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Decoder: Delayed work-queue is implemented with Timer API MM_DEC_Create
- one bug fix wrt bytesperline calculation TIRTOS
- compiler warnings fixed after MJPEG merge
Signed-off-by: Gaviraju D B <x1046101@ti.com>
- one bug fix wrt bytesperline calculation TIRTOS
- compiler warnings fixed after MJPEG merge
Signed-off-by: Gaviraju D B <x1046101@ti.com>
decoder: linux: Use dma-contig memops for capture buffer allocation
The video decoder hardware does not need contiguous memory for
capture buffers, but for optimal performance for playback to display,
contiguous buffers should be used.
This patch adds a compilation flag to enable allocation of capture
buffers from contiguous memory. The flag is set to enabled by default,
but can be disabled from command line at compile time:
To disable:
CAPTURE_CONTIG_ALLOC=n
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
The video decoder hardware does not need contiguous memory for
capture buffers, but for optimal performance for playback to display,
contiguous buffers should be used.
This patch adds a compilation flag to enable allocation of capture
buffers from contiguous memory. The flag is set to enabled by default,
but can be disabled from command line at compile time:
To disable:
CAPTURE_CONTIG_ALLOC=n
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: Error recovery support has been added
This patch decoder implements error recovery feature
for firmware faults, driver faults, and HW hang scenarios.
The erro scenario is notified to application and
provides recovery from erro scenario by reloading the firmware
image into D5520 core. This feature has been tested with Linux
driver.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Megharaj A G <megharaj@ti.com>
This patch decoder implements error recovery feature
for firmware faults, driver faults, and HW hang scenarios.
The erro scenario is notified to application and
provides recovery from erro scenario by reloading the firmware
image into D5520 core. This feature has been tested with Linux
driver.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Megharaj A G <megharaj@ti.com>
decoder: MJPEG Decoder support has been added
This patch implements MJPEG decoding support, and
multiplanar format support (420p and 422p) needed by
D5520MP2 JPEG Decoder. This has been verified in Linux
driver context.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch implements MJPEG decoding support, and
multiplanar format support (420p and 422p) needed by
D5520MP2 JPEG Decoder. This has been verified in Linux
driver context.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: TI RTOS decoder support has been added
This patch implements H264 decoder support on
TI RTOS: sysbios. The driver supports single
and multi-channel H264 decoding for NV12, 8-bit content.
Signed-off-by: Shiju Sivasankaran <shiju@ti.com>
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Amai Prashanth Kumar <prashanth.amai@ti.com>
This patch implements H264 decoder support on
TI RTOS: sysbios. The driver supports single
and multi-channel H264 decoding for NV12, 8-bit content.
Signed-off-by: Shiju Sivasankaran <shiju@ti.com>
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Amai Prashanth Kumar <prashanth.amai@ti.com>
driver/encoder: VXE384MP2 encoder driver support has been added
This patch adds implementation of H264 encoder using VXE384MP2
core. This patch supports Linux driver and provides common
encoder driver baseline for RTOS encoder.
Supported features are:
1. H264 I & P frame encoding
2. 8-bit content
3. NV12 format
4. configurable bitrate
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: David Huang <d-huang@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch adds implementation of H264 encoder using VXE384MP2
core. This patch supports Linux driver and provides common
encoder driver baseline for RTOS encoder.
Supported features are:
1. H264 I & P frame encoding
2. 8-bit content
3. NV12 format
4. configurable bitrate
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: David Huang <d-huang@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
osal: add abstraction for atomic, event, string and regio.
New OSAL primitive abstraction has been implemented to enable
encoder driver.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
New OSAL primitive abstraction has been implemented to enable
encoder driver.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
driver/common: move generic modules from decoder to common
To enable encoder driver along with decoder, some of the generic
utility files have been moved from decoder folder to common.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
To enable encoder driver along with decoder, some of the generic
utility files have been moved from decoder folder to common.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: Debug instrumentation has been added
Detailed debug/info/error tracing has been added
to be able to debug video driver issues.
The logs are controlled via compile time kernel config:
DEBUG_DECODER_DRIVER.
by default, the config is disabled.
In order to collect the traces, the driver needs to be
rebuilt with this config enabled.
This is critical to isolate the issue between Host side
driver vs D5520MP2 Firmware.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Detailed debug/info/error tracing has been added
to be able to debug video driver issues.
The logs are controlled via compile time kernel config:
DEBUG_DECODER_DRIVER.
by default, the config is disabled.
In order to collect the traces, the driver needs to be
rebuilt with this config enabled.
This is critical to isolate the issue between Host side
driver vs D5520MP2 Firmware.
Signed-off-by: Amit Makani <amit.makani@ti.com>
decoder: Added negotiation for video resolution and reference buffer count
In order to optimize the buffer requirements for decode use case,
support has been added to dynamically query the buffer size and
count requirements for any given video stream.
Signed-off-by: Nikki Shah <a0226721@ti.com>
In order to optimize the buffer requirements for decode use case,
support has been added to dynamically query the buffer size and
count requirements for any given video stream.
Signed-off-by: Nikki Shah <a0226721@ti.com>
decoder: separate V4L2 node implementation from common driver
To make common driver OS agnostic, some of the interface logic
has been split between common driver and linux specific.
And moved all Linux specific implementation from decoder folder
to linux/decoder.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
To make common driver OS agnostic, some of the interface logic
has been split between common driver and linux specific.
And moved all Linux specific implementation from decoder folder
to linux/decoder.
Signed-off-by: Amit Makani <amit.makani@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
osal: Interrupt, platform, workque and page alloc abstraction fixes
In order to support TI RTOS driver along with Linux,
OSAL interface headers are updated to meet TIRTOS
requirements.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Shiju Sivasankaran <shiju@ti.com>
In order to support TI RTOS driver along with Linux,
OSAL interface headers are updated to meet TIRTOS
requirements.
Signed-off-by: Gaviraju D B <x1046101@ti.com>
Signed-off-by: Shiju Sivasankaran <shiju@ti.com>
decoder: directory structure update to enable common driver model
Linux driver code is re-organized to separate low level driver code
from Linux V4L2 node. This provides baseline for RTOS decoder driver
and Linux/RTOS encoder drivers going to be added in the future.
Below is the brief descritpion about different directories the driver
will be organised into. This patch adds basic folders, and the remaining
will be added in future patches:
driver: OS agnostic driver code for both decoders and encoders
driver/decoder: Core Decoder driver
driver/common: utility modules common between decoder and encoder drivers
driver/encoder: Core Encoder driver
linux/decoder: Linux OS specifc decoder sources/headers and makefiles
linux/encoder: Linux OS specifc encoder sources/headers and makefiles
tirtos/decoder: TI RTOS decoder specific files
tirtos/encoder: TI RTOS encoder specific files
timmlib/decoder: TI MM lib decoder interface files
timmlib/encoder: TI MM lin encoder interface files
osal/inc: OS abstraction header definitions
osal/src/linux: Linux OSAL implementation files
osal/src/tirtos: TI RTOS OSAL implementation files
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Linux driver code is re-organized to separate low level driver code
from Linux V4L2 node. This provides baseline for RTOS decoder driver
and Linux/RTOS encoder drivers going to be added in the future.
Below is the brief descritpion about different directories the driver
will be organised into. This patch adds basic folders, and the remaining
will be added in future patches:
driver: OS agnostic driver code for both decoders and encoders
driver/decoder: Core Decoder driver
driver/common: utility modules common between decoder and encoder drivers
driver/encoder: Core Encoder driver
linux/decoder: Linux OS specifc decoder sources/headers and makefiles
linux/encoder: Linux OS specifc encoder sources/headers and makefiles
tirtos/decoder: TI RTOS decoder specific files
tirtos/encoder: TI RTOS encoder specific files
timmlib/decoder: TI MM lib decoder interface files
timmlib/encoder: TI MM lin encoder interface files
osal/inc: OS abstraction header definitions
osal/src/linux: Linux OSAL implementation files
osal/src/tirtos: TI RTOS OSAL implementation files
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
decoder: fix spinlock_rt expected expression error
The following error is being thrown in rt-linux builds.
This patch fixes the error by removing the un-needed
return from a void function. After fixing this error
a typecheck error is thrown due to no casting of the flags.
Also added casting of the flags to fix that error as well.
In file included from ./include/linux/spinlock.h:317,
from osal/src/linux/osa_spin.c:18:
osal/src/linux/osa_spin.c: In function ‘osa_spin_unlock_irqrestore’:
./include/linux/spinlock_rt.h:121:2: error: expected expression before ‘do’
do { \
^~
osal/src/linux/osa_spin.c:68:12: note: in expansion of macro ‘spin_unlock_irqrestore’
return spin_unlock_irqrestore(lock, flags);
^~~~~~~~~~~~~~~~~~~~~~
./include/linux/spinlock_rt.h:121:2: warning: ‘return’ with a value, in function returning void
do { \
^~
osal/src/linux/osa_spin.c:68:12: note: in expansion of macro ‘spin_unlock_irqrestore’
return spin_unlock_irqrestore(lock, flags);
^~~~~~~~~~~~~~~~~~~~~~
osal/src/linux/osa_spin.c:66:6: note: declared here
void osa_spin_unlock_irqrestore(void *lock, uint64 flags)
^~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
The following error is being thrown in rt-linux builds.
This patch fixes the error by removing the un-needed
return from a void function. After fixing this error
a typecheck error is thrown due to no casting of the flags.
Also added casting of the flags to fix that error as well.
In file included from ./include/linux/spinlock.h:317,
from osal/src/linux/osa_spin.c:18:
osal/src/linux/osa_spin.c: In function ‘osa_spin_unlock_irqrestore’:
./include/linux/spinlock_rt.h:121:2: error: expected expression before ‘do’
do { \
^~
osal/src/linux/osa_spin.c:68:12: note: in expansion of macro ‘spin_unlock_irqrestore’
return spin_unlock_irqrestore(lock, flags);
^~~~~~~~~~~~~~~~~~~~~~
./include/linux/spinlock_rt.h:121:2: warning: ‘return’ with a value, in function returning void
do { \
^~
osal/src/linux/osa_spin.c:68:12: note: in expansion of macro ‘spin_unlock_irqrestore’
return spin_unlock_irqrestore(lock, flags);
^~~~~~~~~~~~~~~~~~~~~~
osal/src/linux/osa_spin.c:66:6: note: declared here
void osa_spin_unlock_irqrestore(void *lock, uint64 flags)
^~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: fix mutex_rt dereferencing void pointer error
The following error is thrown in rt-linux builds. This
patch fixes the error by casting the mutex_args.
In file included from ./include/linux/mutex.h:33,
from ./include/linux/notifier.h:14,
from ./include/linux/memory_hotplug.h:7,
from ./include/linux/mmzone.h:748,
from ./include/linux/gfp.h:6,
from ./include/linux/slab.h:15,
from osal/src/linux/osa_mutex.c:18:
osal/src/linux/osa_mutex.c: In function ‘osa_mutex_is_locked’:
./include/linux/mutex_rt.h:42:52: warning: dereferencing ‘void *’ pointer
#define mutex_is_locked(l) rt_mutex_is_locked(&(l)->lock)
^~
osal/src/linux/osa_mutex.c:66:12: note: in expansion of macro ‘mutex_is_locked’
return mutex_is_locked(mutex_args);
^~~~~~~~~~~~~~~
./include/linux/mutex_rt.h:42:52: error: request for member ‘lock’ in something not a structure or union
#define mutex_is_locked(l) rt_mutex_is_locked(&(l)->lock)
^~
osal/src/linux/osa_mutex.c:66:12: note: in expansion of macro ‘mutex_is_locked’
return mutex_is_locked(mutex_args);
^~~~~~~~~~~~~~~
osal/src/linux/osa_mutex.c:67:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
The following error is thrown in rt-linux builds. This
patch fixes the error by casting the mutex_args.
In file included from ./include/linux/mutex.h:33,
from ./include/linux/notifier.h:14,
from ./include/linux/memory_hotplug.h:7,
from ./include/linux/mmzone.h:748,
from ./include/linux/gfp.h:6,
from ./include/linux/slab.h:15,
from osal/src/linux/osa_mutex.c:18:
osal/src/linux/osa_mutex.c: In function ‘osa_mutex_is_locked’:
./include/linux/mutex_rt.h:42:52: warning: dereferencing ‘void *’ pointer
#define mutex_is_locked(l) rt_mutex_is_locked(&(l)->lock)
^~
osal/src/linux/osa_mutex.c:66:12: note: in expansion of macro ‘mutex_is_locked’
return mutex_is_locked(mutex_args);
^~~~~~~~~~~~~~~
./include/linux/mutex_rt.h:42:52: error: request for member ‘lock’ in something not a structure or union
#define mutex_is_locked(l) rt_mutex_is_locked(&(l)->lock)
^~
osal/src/linux/osa_mutex.c:66:12: note: in expansion of macro ‘mutex_is_locked’
return mutex_is_locked(mutex_args);
^~~~~~~~~~~~~~~
osal/src/linux/osa_mutex.c:67:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: fix unused variable warnings
This patch fixes the following unused variable warnings:
decoder/vxd_dec.c: In function ‘return_worker’:
decoder/vxd_dec.c:183:20: warning: unused variable ‘event’ [-Wunused-variable]
struct v4l2_event event = {};
^~~~~
decoder/vxd_dec.c:180:26: warning: unused variable ‘vb’ [-Wunused-variable]
struct vb2_v4l2_buffer *vb;
^~
decoder/vxd_dec.c:179:21: warning: unused variable ‘buf’ [-Wunused-variable]
struct vxd_buffer *buf = NULL;
^~~
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
This patch fixes the following unused variable warnings:
decoder/vxd_dec.c: In function ‘return_worker’:
decoder/vxd_dec.c:183:20: warning: unused variable ‘event’ [-Wunused-variable]
struct v4l2_event event = {};
^~~~~
decoder/vxd_dec.c:180:26: warning: unused variable ‘vb’ [-Wunused-variable]
struct vb2_v4l2_buffer *vb;
^~
decoder/vxd_dec.c:179:21: warning: unused variable ‘buf’ [-Wunused-variable]
struct vxd_buffer *buf = NULL;
^~~
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: fix left-hand operand of comma warnings
The following warning is being thrown in rt-linux builds
every time OSA_DEV_DBG, OSA_DEV_INFO, OSA_PR_DEBUG and
OSA_PR_INFO are used. This patch fixes the warnings.
decoder/vxd_core.c:125:22: warning: left-hand operand of comma expression has no effect [-Wunused-value]
OSA_DEV_DBG(vxd->dev, "%s:%d\n", __func__, __LINE__);
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
The following warning is being thrown in rt-linux builds
every time OSA_DEV_DBG, OSA_DEV_INFO, OSA_PR_DEBUG and
OSA_PR_INFO are used. This patch fixes the warnings.
decoder/vxd_core.c:125:22: warning: left-hand operand of comma expression has no effect [-Wunused-value]
OSA_DEV_DBG(vxd->dev, "%s:%d\n", __func__, __LINE__);
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
decoder: Add decoder firmware file
Add the decoder firmware file and the associated LICENSE
file for the firmware.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Add the decoder firmware file and the associated LICENSE
file for the firmware.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Initial commit
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>