Move clocks, gdsc, bandwidth resources out of venus_hfi and
use the ops in variant and venus_hfi code.
Change-Id: I1be77c9d384f4eef2cb8085b75c39dc3fd3eeb86
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
The operation is not used anywhere, delete it.
Change-Id: I4fe7cd41d63ea1b1e0792de6b3e98757860629d8
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
The init_interrupt op is not used out of variant, lets
remove the op and used the functions directly.
Change-Id: I8f97cf503503b7f30e824843a5bd9d93c702241a
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
On all places ucregion setup is done just before calling
boot_firmware, move setup in boot_firmware op and remove
ucregion_setup op.
Change-Id: I91a9a72d3b88eef91e82e19b9d8629e9731211f5
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
Define vidc macros corresponding to private v4l2 macros
defined in v4l2_vidc_extensions.h file in msm_vidc_internal.h
and use the same wherever applicable for successful
compilation of upstream driver.
Change-Id: I2c7b3741d29996beb35b08b9c6dbd88876bb6ca6
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Move mapping of v4l2 to vidc macros for codec, color format,
color primaries etc to target specific file to restirct the
usage of private v4l2 defines to target specific file.
Change-Id: Ie83968cb944c756e55b6514c496c0b23c5d16413
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Update all functions in msm_media_info.h to use vidc color formats
instead of v4l2 color formats macros to restrict the usage of private
color format defines in only helper functions.
Change-Id: Ib308c76af7b16ddac93023202191a47b21d68f5c
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Complexity parameter defines the encoding tools used
during an encode session. Higher the complexity implies
more quality with advance encoding tools used.
Keeping the default value as moderate or acceptable
range.
Change-Id: I3ee66d3a6612d5d60cd63a0698a4248f48ee8e2d
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
1. Remove load based admission control for decoder.
2. For decoder, use max of frame rate, operating rate,
timestamp rate and input rate for power calculations.
3. For encoder, use max of frame rate and operating rate
for power calculations.
Change-Id: Ibdb2d4b29438d7f656a27771953d10e0a0e72edd
Use client input buffer queuing rate for power
calculations for non-realtime sessions
Change-Id: I498422ba1ae9ae96b782a2096dc0cd0aa7b05798
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
This change is made to support 100ms VBV delay for
aggressive rate control in iris3 hw.
Video buffer verifer helps to ensure that encoded stream
doesn't overflow or underflow the decoder's buffer.
iris3 hw is capable to decode data in 100ms VBV buffer window.
Adaptive Blur (Internal encoder feature): This is other enhancement
which supports adaptive blur feature on iris3 for CBR_VFR
(Constant bit rate_Variable frame rate)/CBR_CFR
(Constant bit rate_Constant frame rate) rc types apart from
already supported VBR_CFR. Unlike iris2, there is no need to enable CAC.
Below are the listed scenarios when it is enabled/disabled on iris3-
- Supported only for 8 bits encoding (H.264 & H.265).
- By default enabled for VBR_CFR/CBR_VFR/CBR_CFR RC without CAC enabled.
- No dependency on CAC to be enabled.
- Adaptive Blur is disabled if minquality_VBR is enabled
- Adaptive Blur is supported for 3 RC types: VBR_CFR, CBR_VFR & CBR_CFR
- If any one of the features (scalar/external blur) enabled, encoder
disables adaptive-blur.
- Static property available to disable adaptive blur feature
Below are the listed scenarios when it is enabled/disabled on iris2-
- Supported only for 8 bits encoding (H.264 & H.265).
- By default enabled for VBR_CFR RC type with CAC enabled.
- Dependency on CAC to be enabled.
- Adaptive Blur is disabled if CAC is disabled
- Adaptive Blur is disabled if minquality_VBR is enabled
- Adaptive Blur is not supported for any other RC types except: VBR_CFR
- If any one of the features (scalar/external blur) enabled, encoder
disables adaptive-blur.
- Static property available to disable adaptive blur feature
For backward compatibilty:
- Removed CAC as parent from msm_vidc_kalama.c.
- Removed cac query from msm_vidc_adjust_blur_type in msm_vidc_control.c.
- Moved legacy code to newly created function msm_vidc_adjust_blur_type_iris2().
- Added msm_vidc_adjust_blur_type_iris2 in BLUR_TYPES in msm_vidc_waipio.c
Change-Id: I49dec7e2574496d1b32babde55c0187866ca21d2
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
-Removed unwanted functions
-Removed unwanted part of code from function definitions
-Added proper format specifier according to the data type.
Change-Id: I700202f1cf588506b329d202ce3e2729c027dcae
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Reset video_cc_mvs0_clk_src value to resolve MMRM high video
clock projection issue.
Change-Id: I0c549d7537a82792e9de708c96c265f0dce5908d
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
The clock video_cc_mvs0_clk_src will be automatically prepared and
unprepared when video core cpu clock is prepared and unprepared. So
skip explicit prepare/unprepare video_cc_mvs0_clk_src from video driver.
Change-Id: Ibe41b0b4ecfce27959c29d8024c91af8c1162aa7
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Following changes are done in power collapse sequence
1. AXI2AHB bridge is reset during power collapse.
2. controller regulator is disabled after disabling the
clocks.
3. disable core clock before axi clock.
Change-Id: I8be672728f349620deea22950597ca7766078697
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Use maximum framerate from published
instance caps to make it platform
agnostic.
Change-Id: I319768e722774969287abb9e782ddbece7593ff9
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
increase clockrate and bandwidth by 25percent for
960fps decode session and disable dcvs.
Change-Id: I40aef0a9b8f0950b559ee301549869e20e881a40
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
[1] Currently enable/disable clock(video_cc_mvs0_clk_src) not called. So
updating clock reset value to MMRM is getting skipped. So MMRM has high
projection
[2] __scale_clocks() api is not considering scaling factor, while
setting clock rate.
Added change to address above 2 issues.
Change-Id: I4e96556f9b9d659c436e77d03f8d0dd471a50226
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Video driver clk scaling is through mmrm. So without informing
to mmrm if we disable_clk, then mmrm will hold stale peak_current
values and that will lead to incorrect calculations at mmrm side.
So always request to set lowest clk corner to mmrm before calling
clk_disable_unprepare() api.
Change-Id: I3e54249430ec4e886afb42f5af6863c7e40686c4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Currently video driver ignoring error value returned by
__read_register() api. So added changes to improve error
handling.
Change-Id: Ia3968f0f900915b46b96c5e790af9be02389e841
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Upstream recommends to use readl_relaxed_poll_timeout instead of reading
register in a loop with sleep. So replaced with readl_relaxed_poll_timeout
in all possible places.
Change-Id: Ide1758314128751a6876678d4265bb77c52de25f
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Image session should run as fast as possible mode and dynamic
framerate detection is not applicable for image session. So
added change to disable that feature for image decode session.
Change-Id: Ifcfeb24d1f70009ba48e9ade77bd765c1b0e8fd7
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Force the clocks to NOM if bitrate nears or exceeds maximum
supported for VP9 usecases.
Change-Id: I917b0f6c624837403fd9f1499a68812acb00b568
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Increase vpp cycles to bump frequency to 366MHz
for encoder 960fps use case.
Change-Id: If0f9d0f084dfcefa9f8614ec6774588dec6b7007
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
As per vperf sheet, VSP FW Overhead factor(1.05) needs
to be applied to both entropy mode CABAC & CAVLC.
Change-Id: I93dc00137e0633ac2a79862c58970ba43b515ad6
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Decoder base cycle requirement of B frames has increased to 80.
Also, updated cycle count requirement for Encoder HIER B usecase.
Pulled from CL: 3302650.
Change-Id: I0f56166b7261e161630feeb8793473491dacccd7
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Accessing vcodec subsystem registers without video core clock enabled
will result in register access errors. Core clock might have been
already disabled by video firmware as part of inter frame power collapse.
So do not read vcodec noc error log registers from video driver.
Change-Id: I19a32c377c661aa848fbd463ae59159cca4cfe04
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
1. Calculate framerate based on buffer timestamp
2. If framerate changed and stable for 2 frames,
update it to firmware and in driver internally.
Change-Id: I7feda86dec8fcfc1dff6defac8c15a97c1b8393e
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Client can choose to run an encode session to acheive maximum
performance rather than maximum quality.
Add the handling to configure video core accordingly for the
configured video session.
Such configuration is only applicable for non-realtime session.
Change-Id: Ife290b377c844e5b1d3be93b2509c787f8e05c59
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Amend power on and off sequences for iris2 video hardware.
Change-Id: Icada0b95ba5990a6911803ee9fa650a296c357db
Signed-off-by: Maheshwar Ajja <majja@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>
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>
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>
adjust MAX_MAP_OUTPUT_COUNT based on resolution
to enhance performance and reduce memory pressure.
- For 8K session: count = 20
- For 4K session: count = 32
- For 1080p session: count = 48
- For all remaining sessions: count = 64
reduce MAX_DPB_COUNT to 32.
reduce DEFAULT_MAX_HOST_BUF_COUNT to 64.
Change-Id: I0e6d25121947524b843e9cce96b75871aba174af
Signed-off-by: Darshana Patil <darshana@codeaurora.org>