Skip to content

Commit

Permalink
drm/i915/display/adlp: Disable underrun recovery
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1954728

It was also defeatured for ADL-P and other platforms.

BSpec: 55424
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211104010858.43559-1-jose.souza@intel.com
(backported from commit 4fe7907 linux-next)
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
  • Loading branch information
José Roberto de Souza authored and Timo Aaltonen committed Dec 16, 2021
1 parent b29e7fa commit b59abe8
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions drivers/gpu/drm/i915/display/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,26 +2197,6 @@ void intel_display_finish_reset(struct drm_i915_private *dev_priv)
clear_bit_unlock(I915_RESET_MODESET, &dev_priv->gt.reset.flags);
}

static bool underrun_recovery_supported(const struct intel_crtc_state *crtc_state)
{
if (crtc_state->pch_pfit.enabled &&
(crtc_state->pipe_src_w > drm_rect_width(&crtc_state->pch_pfit.dst) ||
crtc_state->pipe_src_h > drm_rect_height(&crtc_state->pch_pfit.dst) ||
crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420))
return false;

if (crtc_state->dsc.compression_enable)
return false;

if (crtc_state->has_psr2)
return false;

if (crtc_state->splitter.enable)
return false;

return true;
}

static void icl_set_pipe_chicken(const struct intel_crtc_state *crtc_state)
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
Expand All @@ -2240,12 +2220,11 @@ static void icl_set_pipe_chicken(const struct intel_crtc_state *crtc_state)
*/
tmp |= PIXEL_ROUNDING_TRUNC_FB_PASSTHRU;

if (DISPLAY_VER(dev_priv) >= 13) {
if (underrun_recovery_supported(crtc_state))
tmp &= ~UNDERRUN_RECOVERY_DISABLE_ADLP;
else
tmp |= UNDERRUN_RECOVERY_DISABLE_ADLP;
}
/*
* Underrun recovery must always be disabled on display 13+.
*/
if (DISPLAY_VER(dev_priv) >= 13)
tmp |= UNDERRUN_RECOVERY_DISABLE_ADLP;

intel_de_write(dev_priv, PIPE_CHICKEN(pipe), tmp);
}
Expand Down

0 comments on commit b59abe8

Please sign in to comment.