[4/5] drm/i915/display/icl+: Check if DMC is fused off
diff mbox series

Message ID 20191019004124.371929-4-jose.souza@intel.com
State New
Headers show
Series
  • [1/5] drm/i915/display: Handle fused off display correctly
Related show

Commit Message

Souza, Jose Oct. 19, 2019, 12:41 a.m. UTC
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>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h          | 1 +
 drivers/gpu/drm/i915/intel_device_info.c | 3 +++
 2 files changed, 4 insertions(+)

Comments

Ramalingam C Oct. 24, 2019, 7:06 a.m. UTC | #1
On 2019-10-18 at 17:41:23 -0700, José Roberto de Souza wrote:
> 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>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h          | 1 +
>  drivers/gpu/drm/i915/intel_device_info.c | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 31375ddc2b3b..84fca4f3af5a 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -7660,6 +7660,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)
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index b6a9f527f8f9..97d962944e48 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -993,6 +993,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 */
> -- 
> 2.23.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 31375ddc2b3b..84fca4f3af5a 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -7660,6 +7660,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)
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index b6a9f527f8f9..97d962944e48 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -993,6 +993,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 */