modify scanlines alignment for linear rgba color
format to 32.
Change-Id: Ide64322bc872bfda64d8f48474ef2d37a4f314b7
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
if skip_pc_count reaches VIDC_MAX_PC_SKIP_COUNT, that means
something wrong with hardware. So call core_deinit to reset
the hardware, so that atleast next session willbe proper.
Change-Id: I320fcc2917825a2ff79889b8183e2842257f3569
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Enable HFI_PROP_SECURE when secure session is enabled
in encoder. Same behaviour as Decoder.
Change-Id: I5edfe3d735fda8edea9e491ae17546945b4431a1
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
- To determine if session is admissible, check only the
decoder input width/height and encoder crop width/height.
- Update session MBPF Calculations.
- Amend work mode setting to consider decoder input width,
height and GOP size.
Change-Id: If4053c222de2a55ad5b85a8ab96c12c47b145aa3
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Priority level was not determined at few sequences.
Determine the priority level and set to firmware, if
there is a change in driver and firmware priority.
Change-Id: I97861fd4ce8cfb7cf828a8da9a5ce8ba900280ef
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Currently driver prints hex values for codec type, pixel
format and port number. So added change to print strings
instead of hex values.
Removed unnecessary logs to avoid overlogging timeout
issues.
Change-Id: Ia44401990797dc20eae0a35631e9ed6a0b094c20
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
- misc fix for setting frame qp, min qp, max qp.
- seperate LEVEL database entry for encoder and
decoder as max level supported by encoder is 6_0,
but decoder supports upto 6_2.
Change-Id: Ia0a0a717e73e55a8b6933421e3eb55c3831524b2
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Currently session_error check is scattered at multiple places,
So check for session error at ioctl entry point itself(for set
type controls only).
Cleanup &inst->response_works.list as part of session close to
avoid leaks and remove unused variables from inst struct.
Change-Id: I349ec845cc71814b33a94ac07c7628304ddae564
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
If msm_vidc_open() sequence fails before calling event_queue_init()
then it calls msm_vidc_close as part of cleanup.
So event_queue_deinit will attempt to call v4l2_fh_del without
completing v4l2_fh_init & v4l2_fh_add. So i.e leading to NULL ptr
dereferrence issue at v4l2_fh_del api.
Added change to avoid calling event_queue_deinit() sequence, if
event_queue_init is not completed.
Change-Id: Ia2732c39be819247379d955d40dddccaba7c00eb
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Userspace is allowed to close driver fd at anytime, even in middle
of ongoing session. So it will create a problem, if multiple ioctls
were waiting for &inst->lock() and msm_vidc_close() acquired the
&inst->lock and cleaned up all session specific resources including
vb2 queues, v4l2_fh file handles and all buffers and finally frees
inst itself, as part of put_inst(). So once that is done, other
enties waiting on &inst->lock will get chance, but by that time,
everything is freed. So proceeding that cmd will completely lead to
undefined behaviour and target reset will happen.
Added change to avoid above mentioned scenario by Incrementing inst
refcount everytime before proceeding any ioctls and acquired &inst->lock
to avoid concurrent access between ioctls.
Currently &inst->lock was not acquired except for reqbuf, qbuf, dqbuf
ioctls. But it is good to acquire lock at every ioctl types. This will
help avoid corner cases, such as during ipsc, all port setting were
updated to inst structure, So if userspace attempts any ioctl(like
g_ctrl) without lock, it might get intermittent value, which is wrong.
Change-Id: Ic4bdf562f7036f3796019fe45d1cdc392045878a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Update metadata buffer size after port resolution
changes.
Change-Id: Ieb9ce986500b4f06b5b0a324b4cd42ebae5c4d9e
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
qbuf will be deferred on all ports before streamon,
So explicitly queue pending buffers at the time of
streamon.
Change-Id: I673a14f0d43563184aac887f5f23b63ed13d59df
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Encoder supports downscale with scaling ratio upto 1/8 of width
and 1/8 of height. So added necessary scaling checks at streamon.
Change-Id: I3a29b43c79cf4e693ba2c0d9f98ec24410d50fbd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Add strict check in msm_vidc_check_mbpf_supported() to
reject image session, if total image load exceeds 16K.
Added msm_vidc_print_insts_info() support to print all
running instance info, if new session is rejected due
to mbpf/mbps checks.
Change-Id: I98bab985fcf4f4d20c6f263c48e0c701ec86ab6f
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Decoder supports dynamic low latency. When client configures the
video session in low latency mode, driver would configure the
firmware such that HFI_CMD_SETTINGS_CHANGE is triggerred on
sync frame boundary.
Change-Id: Ie70eaaeb8ad420db926f0d99f77723476deee400
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
During input port streamoff, state is changed from START_INPUT
to OPEN and then sent CMD_STOP to firmware. So reverse thread
acquired the lock and trying to process IPSC. Since IPSC is
not allowed in OPEN state, driver treats that as a fatal issue
and moves inst->state to ERROR state. Added change to avoid
above mentioned issue.
Change-Id: If0e18f01b6ecac3c810c0dab878ae392c48ffc27
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Use bitstream fps in clock and bus vote calculation, if
bitstream detected fps is higher than client set rate.
Change-Id: I58fa1a8725086c112796b3ce5172a39f322e178e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
allow main and main 10 profiles for heic enc.
Change-Id: I5ce6f24fede3d7b2267a97a0aaf01e19e9894ba3
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Occationally when multiple sessions are waiting for firmware
response and at the same time if there was a system error
received which will deinitalize the core and remove all sessions
from core list. If client opened new session which will initialize
the core and start the new session. As there will be no response
for old sessions, eventually, they will timeout and try to deinitialize
the core which will reset new session also which is not correct.
So check if timed out session is valid (present in core list) before
deintializing the core from timeout session.
This change also addresses below race condition issue -
If client is opening multiple new sessions and multiple old sessions
are also timedout at the same time and all are waiting for core lock
to be acquired. The new session does init_completion(&core->init_done);
and release core lock before waiting for completion event. As core lock
was released the timed out session will acquire the core lock and deinit
the core and release core lock. As core was deinited, another new session
will do init_completion(&core->init_done); on which the previous session
was waiting for completion event. doing init_completion again on an
already waiting completion event will result in list corruption issues.
Change-Id: I94766ead8b3ecad7d0b87f4b999608f435d0cee2
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
For decoder, reject unsupported session during output
port streamon.
Change-Id: I048bf86cce1357a8db6c4ed5fc15508db1382916
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
[1] Irrespective of layer encoding type P or B, always
caliberate gop size to have gop size multiple
of sub gop size.
[2] Do not cap enh layer count value to max 1 value when
cvp is disabled.
Change-Id: I10f602202ce007707c0fee76d9f847db70798754
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
do core_deinit for sesion_open and session_close failures, to
handle recurring clock prepare failure.
Change-Id: I1c305f9e6269f7176b8283dbe91712f9e31448f5
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Existing video driver expects session priority to be set
explicitly during static configuration. CAP_ROOT is not
enabled for decoders, hence explicit setting is needed.
Change-Id: Id754b38f15e9e045d31797557a4a7aa7a296346e
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>