diff mbox series

[v2,3/3] drm/i915/display: Fix DRRS debugfs

Message ID 20200824174345.87553-3-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] drm/i915/display: Compute has_drrs after compute has_psr | expand

Commit Message

Souza, Jose Aug. 24, 2020, 5:43 p.m. UTC
Supported and enabled are different things so printing both.

Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: Srinivas K <srinivasx.k@intel.com>
Cc: Hariom Pandey <hariom.pandey@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Gupta, Anshuman Aug. 25, 2020, 5:41 a.m. UTC | #1
On 2020-08-24 at 10:43:45 -0700, José Roberto de Souza wrote:
> Supported and enabled are different things so printing both.
> 
> Cc: Anshuman Gupta <anshuman.gupta@intel.com>
> Cc: Srinivas K <srinivasx.k@intel.com>
> Cc: Hariom Pandey <hariom.pandey@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index f549381048b3..4b4cabf34d24 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1069,10 +1069,18 @@ static void drrs_status_per_crtc(struct seq_file *m,
>  
>  	drm_connector_list_iter_begin(dev, &conn_iter);
>  	drm_for_each_connector_iter(connector, &conn_iter) {
> +		bool supported = false;
> +
>  		if (connector->state->crtc != &intel_crtc->base)
>  			continue;
>  
>  		seq_printf(m, "%s:\n", connector->name);
> +
> +		if (connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
> +		    dev_priv->vbt.drrs_type == SEAMLESS_DRRS_SUPPORT)
IMO use dev_priv->drrs.type here, becuase DRRS is not supported in case
intel_panel_edid_downclock_mode() return a NULL downclock mode in 
intel_dp_drrs_init().

Thanks,
Anshuman Gupta
> +			supported = true;
> +
> +		seq_printf(m, "\tDRRS Supported: %s\n", yesno(supported));
>  	}
>  	drm_connector_list_iter_end(&conn_iter);
>  
> @@ -1083,7 +1091,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
>  
>  		mutex_lock(&drrs->mutex);
>  		/* DRRS Supported */
> -		seq_puts(m, "\tDRRS Supported: Yes\n");
> +		seq_puts(m, "\tDRRS Enabled: Yes\n");
>  
>  		/* disable_drrs() will make drrs->dp NULL */
>  		if (!drrs->dp) {
> @@ -1118,7 +1126,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
>  		mutex_unlock(&drrs->mutex);
>  	} else {
>  		/* DRRS not supported. Print the VBT parameter*/
> -		seq_puts(m, "\tDRRS Supported : No");
> +		seq_puts(m, "\tDRRS Enabled : No");
>  	}
>  	seq_puts(m, "\n");
>  }
> -- 
> 2.28.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index f549381048b3..4b4cabf34d24 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1069,10 +1069,18 @@  static void drrs_status_per_crtc(struct seq_file *m,
 
 	drm_connector_list_iter_begin(dev, &conn_iter);
 	drm_for_each_connector_iter(connector, &conn_iter) {
+		bool supported = false;
+
 		if (connector->state->crtc != &intel_crtc->base)
 			continue;
 
 		seq_printf(m, "%s:\n", connector->name);
+
+		if (connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
+		    dev_priv->vbt.drrs_type == SEAMLESS_DRRS_SUPPORT)
+			supported = true;
+
+		seq_printf(m, "\tDRRS Supported: %s\n", yesno(supported));
 	}
 	drm_connector_list_iter_end(&conn_iter);
 
@@ -1083,7 +1091,7 @@  static void drrs_status_per_crtc(struct seq_file *m,
 
 		mutex_lock(&drrs->mutex);
 		/* DRRS Supported */
-		seq_puts(m, "\tDRRS Supported: Yes\n");
+		seq_puts(m, "\tDRRS Enabled: Yes\n");
 
 		/* disable_drrs() will make drrs->dp NULL */
 		if (!drrs->dp) {
@@ -1118,7 +1126,7 @@  static void drrs_status_per_crtc(struct seq_file *m,
 		mutex_unlock(&drrs->mutex);
 	} else {
 		/* DRRS not supported. Print the VBT parameter*/
-		seq_puts(m, "\tDRRS Supported : No");
+		seq_puts(m, "\tDRRS Enabled : No");
 	}
 	seq_puts(m, "\n");
 }