Merge "disp: msm: sde: add line-based QoS calculation support"
This commit is contained in:

gecommit door
Gerrit - the friendly Code Review server

commit
7f4c58ac65
@@ -5123,6 +5123,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->perf.min_prefill_lines = 40;
|
||||
sde_cfg->vbif_qos_nlvl = 8;
|
||||
sde_cfg->qos_target_time_ns = 11160;
|
||||
sde_cfg->ts_prefill_rev = 2;
|
||||
sde_cfg->ctl_rev = SDE_CTL_CFG_VERSION_1_0_0;
|
||||
sde_cfg->true_inline_rot_rev = SDE_INLINE_ROT_VERSION_2_0_1;
|
||||
|
@@ -1777,6 +1777,7 @@ struct sde_perf_cfg {
|
||||
* @max_mixer_width max layer mixer line width
|
||||
* @max_mixer_blendstages max layer mixer blend stages (z orders)
|
||||
* @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
|
||||
* @pipe_order_type indicates if it is required to specify pipe order
|
||||
* @csc_type csc or csc_10bit support
|
||||
@@ -1885,6 +1886,7 @@ struct sde_mdss_cfg {
|
||||
|
||||
/* Configs */
|
||||
u32 vbif_qos_nlvl;
|
||||
u32 qos_target_time_ns;
|
||||
u32 macrotile_mode;
|
||||
u32 pipe_order_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;
|
||||
struct sde_perf_cfg *perf;
|
||||
struct sde_plane_state *pstate;
|
||||
struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
|
||||
bool inline_rot = false, landscape = false;
|
||||
struct drm_display_mode *mode;
|
||||
u32 fl_require0 = 0;
|
||||
|
||||
if (!plane || !fb) {
|
||||
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];
|
||||
|
||||
ds_lut_index = lut_index * SDE_DANGER_SAFE_LUT_TYPE_MAX;
|
||||
if (landscape)
|
||||
ds_lut_index += SDE_DANGER_SAFE_LUT_TYPE_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 += (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.safe_lut = perf->safe_lut[ds_lut_index];
|
||||
|
Verwijs in nieuw issue
Block a user