]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display: Do not write in removed FBC fence registers
authorRadhakrishna Sripada <radhakrishna.sripada@intel.com>
Fri, 6 Mar 2020 18:58:33 +0000 (10:58 -0800)
committerJosé Roberto de Souza <jose.souza@intel.com>
Tue, 10 Mar 2020 20:43:18 +0000 (13:43 -0700)
Platforms without fences don't have FBC host tracking and those
registers are marked as reserved in those platforms.

v2: checking num_fences to write to FBC fence registers (Ville)

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200306185833.53984-2-jose.souza@intel.com
drivers/gpu/drm/i915/display/intel_fbc.c

index 010b1107671fa4398300d992cec55c956b433a86..2e5d835a9eaa866e0a6c8c94b35ff00cbcf04db7 100644 (file)
@@ -321,7 +321,7 @@ static void gen7_fbc_activate(struct drm_i915_private *dev_priv)
                               SNB_CPU_FENCE_ENABLE | params->fence_id);
                intel_de_write(dev_priv, DPFC_CPU_FENCE_OFFSET,
                               params->crtc.fence_y_offset);
-       } else {
+       } else if (dev_priv->ggtt.num_fences) {
                intel_de_write(dev_priv, SNB_DPFC_CTL_SA, 0);
                intel_de_write(dev_priv, DPFC_CPU_FENCE_OFFSET, 0);
        }