From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> No need to tiptoe around programming DPFC_FENCE_YOFF with params->fence_y_offset vs. 0. If the fence is not enabled it doesn't even matter what we program here. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_fbc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c index c95a32f1985a..8f51af2b4ebc 100644 --- a/drivers/gpu/drm/i915/display/intel_fbc.c +++ b/drivers/gpu/drm/i915/display/intel_fbc.c @@ -235,13 +235,11 @@ static void g4x_fbc_activate(struct drm_i915_private *dev_priv) dpfc_ctl |= g4x_dpfc_ctl_limit(dev_priv); - if (params->fence_id >= 0) { + if (params->fence_id >= 0) dpfc_ctl |= DPFC_CTL_FENCE_EN | params->fence_id; - intel_de_write(dev_priv, DPFC_FENCE_YOFF, - params->fence_y_offset); - } else { - intel_de_write(dev_priv, DPFC_FENCE_YOFF, 0); - } + + intel_de_write(dev_priv, DPFC_FENCE_YOFF, + params->fence_y_offset); /* enable it... */ intel_de_write(dev_priv, DPFC_CONTROL, dpfc_ctl | DPFC_CTL_EN); -- 2.32.0