disp: msm: sde: add line-based QoS calculation support
From kalama, add support for QoS fill level calculations based on line-based QoS calculations. Change-Id: I524ca29c6e9d1912b44a328a2a88d08341cccefc Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
This commit is contained in:
@@ -5270,6 +5270,7 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
|
|||||||
sde_cfg->autorefresh_disable_seq = AUTOREFRESH_DISABLE_SEQ2;
|
sde_cfg->autorefresh_disable_seq = AUTOREFRESH_DISABLE_SEQ2;
|
||||||
sde_cfg->perf.min_prefill_lines = 40;
|
sde_cfg->perf.min_prefill_lines = 40;
|
||||||
sde_cfg->vbif_qos_nlvl = 8;
|
sde_cfg->vbif_qos_nlvl = 8;
|
||||||
|
sde_cfg->qos_target_time_ns = 11160;
|
||||||
sde_cfg->ts_prefill_rev = 2;
|
sde_cfg->ts_prefill_rev = 2;
|
||||||
sde_cfg->ctl_rev = SDE_CTL_CFG_VERSION_1_0_0;
|
sde_cfg->ctl_rev = SDE_CTL_CFG_VERSION_1_0_0;
|
||||||
sde_cfg->true_inline_rot_rev = SDE_INLINE_ROT_VERSION_2_0_1;
|
sde_cfg->true_inline_rot_rev = SDE_INLINE_ROT_VERSION_2_0_1;
|
||||||
|
@@ -1795,6 +1795,7 @@ struct sde_perf_cfg {
|
|||||||
* @max_mixer_width max layer mixer line width
|
* @max_mixer_width max layer mixer line width
|
||||||
* @max_mixer_blendstages max layer mixer blend stages (z orders)
|
* @max_mixer_blendstages max layer mixer blend stages (z orders)
|
||||||
* @vbif_qos_nlvl number of vbif QoS priority levels
|
* @vbif_qos_nlvl number of vbif QoS priority levels
|
||||||
|
* @qos_target_time_ns normalized qos target time for line-based qos
|
||||||
* @macrotile_mode UBWC parameter for macro tile channel distribution
|
* @macrotile_mode UBWC parameter for macro tile channel distribution
|
||||||
* @pipe_order_type indicates if it is required to specify pipe order
|
* @pipe_order_type indicates if it is required to specify pipe order
|
||||||
* @csc_type csc or csc_10bit support
|
* @csc_type csc or csc_10bit support
|
||||||
@@ -1904,6 +1905,7 @@ struct sde_mdss_cfg {
|
|||||||
|
|
||||||
/* Configs */
|
/* Configs */
|
||||||
u32 vbif_qos_nlvl;
|
u32 vbif_qos_nlvl;
|
||||||
|
u32 qos_target_time_ns;
|
||||||
u32 macrotile_mode;
|
u32 macrotile_mode;
|
||||||
u32 pipe_order_type;
|
u32 pipe_order_type;
|
||||||
u32 csc_type;
|
u32 csc_type;
|
||||||
|
@@ -250,8 +250,10 @@ static void _sde_plane_set_qos_lut(struct drm_plane *plane,
|
|||||||
u32 frame_rate, qos_count, fps_index = 0, lut_index, creq_lut_index, ds_lut_index;
|
u32 frame_rate, qos_count, fps_index = 0, lut_index, creq_lut_index, ds_lut_index;
|
||||||
struct sde_perf_cfg *perf;
|
struct sde_perf_cfg *perf;
|
||||||
struct sde_plane_state *pstate;
|
struct sde_plane_state *pstate;
|
||||||
|
struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
|
||||||
bool inline_rot = false, landscape = false;
|
bool inline_rot = false, landscape = false;
|
||||||
struct drm_display_mode *mode;
|
struct drm_display_mode *mode;
|
||||||
|
u32 fl_require0 = 0;
|
||||||
|
|
||||||
if (!plane || !fb) {
|
if (!plane || !fb) {
|
||||||
SDE_ERROR("invalid arguments\n");
|
SDE_ERROR("invalid arguments\n");
|
||||||
@@ -305,8 +307,13 @@ static void _sde_plane_set_qos_lut(struct drm_plane *plane,
|
|||||||
psde->pipe_qos_cfg.creq_lut = perf->creq_lut[creq_lut_index];
|
psde->pipe_qos_cfg.creq_lut = perf->creq_lut[creq_lut_index];
|
||||||
|
|
||||||
ds_lut_index = lut_index * SDE_DANGER_SAFE_LUT_TYPE_MAX;
|
ds_lut_index = lut_index * SDE_DANGER_SAFE_LUT_TYPE_MAX;
|
||||||
if (landscape)
|
if (landscape) {
|
||||||
|
if (psde->catalog->qos_target_time_ns && sde_crtc->line_time_in_ns)
|
||||||
|
fl_require0 = psde->catalog->qos_target_time_ns /
|
||||||
|
(sde_crtc->line_time_in_ns * 2);
|
||||||
|
if (!fl_require0 || fl_require0 < 4.5)
|
||||||
ds_lut_index += SDE_DANGER_SAFE_LUT_TYPE_LANDSCAPE;
|
ds_lut_index += SDE_DANGER_SAFE_LUT_TYPE_LANDSCAPE;
|
||||||
|
}
|
||||||
ds_lut_index += (fps_index * SDE_QOS_LUT_USAGE_MAX * SDE_DANGER_SAFE_LUT_TYPE_MAX);
|
ds_lut_index += (fps_index * SDE_QOS_LUT_USAGE_MAX * SDE_DANGER_SAFE_LUT_TYPE_MAX);
|
||||||
psde->pipe_qos_cfg.danger_lut = perf->danger_lut[ds_lut_index];
|
psde->pipe_qos_cfg.danger_lut = perf->danger_lut[ds_lut_index];
|
||||||
psde->pipe_qos_cfg.safe_lut = perf->safe_lut[ds_lut_index];
|
psde->pipe_qos_cfg.safe_lut = perf->safe_lut[ds_lut_index];
|
||||||
|
Reference in New Issue
Block a user