drm/i915/display/icl+: Check if DMC is fused off
authorJosé Roberto de Souza <jose.souza@intel.com>
Sat, 26 Oct 2019 00:13:22 +0000 (17:13 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Tue, 29 Oct 2019 19:12:48 +0000 (12:12 -0700)
Check if DMC is fused off and handle it.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191026001323.216052-4-jose.souza@intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_device_info.c

index ecbcc0e..32a5371 100644 (file)
@@ -7750,6 +7750,7 @@ enum {
 #define   SKL_DFSM_CDCLK_LIMIT_540     (1 << 23)
 #define   SKL_DFSM_CDCLK_LIMIT_450     (2 << 23)
 #define   SKL_DFSM_CDCLK_LIMIT_337_5   (3 << 23)
+#define   ICL_DFSM_DMC_DISABLE         (1 << 23)
 #define   SKL_DFSM_PIPE_A_DISABLE      (1 << 30)
 #define   SKL_DFSM_PIPE_B_DISABLE      (1 << 21)
 #define   SKL_DFSM_PIPE_C_DISABLE      (1 << 28)
index a3e9071..fa64648 100644 (file)
@@ -987,6 +987,9 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 
                if (dfsm & SKL_DFSM_DISPLAY_PM_DISABLE)
                        info->display.has_fbc = 0;
+
+               if (INTEL_GEN(dev_priv) >= 11 && (dfsm & ICL_DFSM_DMC_DISABLE))
+                       info->display.has_csr = 0;
        }
 
        /* Initialize slice/subslice/EU info */