disp: msm: sde: fix video mode prefill lines for RSCC
The RSCC static wakeup and the bandwidth trigger for the downvotes are based on the prefill lines. Reduce the prefill lines based on the panel vertical front porch to avoid issuing bw downvotes during active region of the previous frame. Change-Id: I408209ba308c32e71d9f70c5ed7e60c134877c84 Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

부모
46ec8687c0
커밋
b1c9d65e3d
@@ -1928,11 +1928,13 @@ static int _sde_encoder_update_rsc_client(
|
||||
struct drm_crtc *crtc;
|
||||
enum sde_rsc_state rsc_state = SDE_RSC_IDLE_STATE;
|
||||
struct sde_rsc_cmd_config *rsc_config;
|
||||
int ret, prefill_lines;
|
||||
int ret;
|
||||
struct msm_display_info *disp_info;
|
||||
struct msm_mode_info *mode_info;
|
||||
int wait_vblank_crtc_id = SDE_RSC_INVALID_CRTC_ID;
|
||||
u32 qsync_mode = 0;
|
||||
u32 qsync_mode = 0, v_front_porch;
|
||||
struct drm_display_mode *mode;
|
||||
bool is_vid_mode;
|
||||
|
||||
if (!drm_enc || !drm_enc->dev) {
|
||||
SDE_ERROR("invalid encoder arguments\n");
|
||||
@@ -1977,17 +1979,31 @@ static int _sde_encoder_update_rsc_client(
|
||||
|
||||
SDE_EVT32(rsc_state, qsync_mode);
|
||||
|
||||
prefill_lines = mode_info->prefill_lines;
|
||||
is_vid_mode = sde_encoder_check_curr_mode(&sde_enc->base,
|
||||
MSM_DISPLAY_VIDEO_MODE);
|
||||
mode = &sde_enc->crtc->state->mode;
|
||||
v_front_porch = mode->vsync_start - mode->vdisplay;
|
||||
|
||||
/* compare specific items and reconfigure the rsc */
|
||||
if ((rsc_config->fps != mode_info->frame_rate) ||
|
||||
(rsc_config->vtotal != mode_info->vtotal) ||
|
||||
(rsc_config->prefill_lines != prefill_lines) ||
|
||||
(rsc_config->prefill_lines != mode_info->prefill_lines) ||
|
||||
(rsc_config->jitter_numer != mode_info->jitter_numer) ||
|
||||
(rsc_config->jitter_denom != mode_info->jitter_denom)) {
|
||||
|
||||
rsc_config->fps = mode_info->frame_rate;
|
||||
rsc_config->vtotal = mode_info->vtotal;
|
||||
rsc_config->prefill_lines = prefill_lines;
|
||||
/*
|
||||
* for video mode, prefill lines should not go beyond vertical
|
||||
* front porch for RSCC configuration. This will ensure bw
|
||||
* downvotes are not sent within the active region. Additional
|
||||
* -1 is to give one line time for rscc mode min_threshold.
|
||||
*/
|
||||
if (is_vid_mode && (mode_info->prefill_lines >= v_front_porch))
|
||||
rsc_config->prefill_lines = v_front_porch - 1;
|
||||
else
|
||||
rsc_config->prefill_lines = mode_info->prefill_lines;
|
||||
|
||||
rsc_config->jitter_numer = mode_info->jitter_numer;
|
||||
rsc_config->jitter_denom = mode_info->jitter_denom;
|
||||
sde_enc->rsc_state_init = false;
|
||||
|
Reference in New Issue
Block a user