diff mbox series

drm/i915: Add DSC/FEC support info to debugfs

Message ID 20250403190448.29795-1-shantam.yashashvi@intel.com (mailing list archive)
State New
Headers show
Series drm/i915: Add DSC/FEC support info to debugfs | expand

Commit Message

shantam.yashashvi@intel.com April 3, 2025, 7:04 p.m. UTC
From: Shantam Yashashvi <shantam.yashashvi@intel.com>

Signed-off-by: Shantam Yashashvi <shantam.yashashvi@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Imre Deak April 3, 2025, 8:24 p.m. UTC | #1
On Fri, Apr 04, 2025 at 12:34:48AM +0530, shantam.yashashvi@intel.com wrote:
> From: Shantam Yashashvi <shantam.yashashvi@intel.com>
> 
> Signed-off-by: Shantam Yashashvi <shantam.yashashvi@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 057a8ce0c2c97..b8d3a438a34d9 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -276,6 +276,7 @@ static void intel_connector_info(struct seq_file *m,
>  	struct intel_encoder *encoder =
>  		to_intel_encoder(conn_state->best_encoder);
>  	const struct drm_display_mode *mode;
> +	struct intel_dp *intel_dp;
>  
>  	seq_printf(m, "[CONNECTOR:%d:%s]: status: %s\n",
>  		   connector->base.id, connector->name,
> @@ -301,6 +302,16 @@ static void intel_connector_info(struct seq_file *m,
>  			intel_dp_mst_info(m, intel_connector);
>  		else
>  			intel_dp_info(m, intel_connector);
> +
> +		/* Add DSC and FEC Support Information for DisplayPort / eDP Connectors */
> +		intel_dp = intel_attached_dp(intel_connector);
> +		if (intel_dp){
> +			seq_printf(m, "\tDSC_Sink_Support: %s\n",
> +                str_yes_no(drm_dp_sink_supports_dsc(intel_connector->dp.dsc_dpcd)));
> +			if (!intel_dp_is_edp(intel_dp))
> +				    seq_printf(m, "\tFEC_Sink_Support: %s\n",
> +				        str_yes_no(drm_dp_sink_supports_fec(intel_connector->dp.fec_capability)));

Both of the above info is available already in the connector's
i915_dsc_fec_support debugfs entry. As I understood the aim is having
each CRTC / connector show its own properties, instead of combinining
all those into one debugfs entry (as this is done in i915_display_info).
Based on that I don't think more (duplicated) information should be
added here.

One issue with the i915_dsc_fec_support entry is that it doesn't show
the sink capabilities if the output isn't enabled on the connector, I
plan to follow up with a fix for that.

> +		}
>  		break;
>  	case DRM_MODE_CONNECTOR_HDMIA:
>  		if (encoder->type == INTEL_OUTPUT_HDMI ||
> -- 
> 2.25.1
>
Jani Nikula April 4, 2025, 9:45 a.m. UTC | #2
On Thu, 03 Apr 2025, Imre Deak <imre.deak@intel.com> wrote:
> On Fri, Apr 04, 2025 at 12:34:48AM +0530, shantam.yashashvi@intel.com wrote:
>> From: Shantam Yashashvi <shantam.yashashvi@intel.com>
>> 
>> Signed-off-by: Shantam Yashashvi <shantam.yashashvi@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> index 057a8ce0c2c97..b8d3a438a34d9 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
>> @@ -276,6 +276,7 @@ static void intel_connector_info(struct seq_file *m,
>>  	struct intel_encoder *encoder =
>>  		to_intel_encoder(conn_state->best_encoder);
>>  	const struct drm_display_mode *mode;
>> +	struct intel_dp *intel_dp;
>>  
>>  	seq_printf(m, "[CONNECTOR:%d:%s]: status: %s\n",
>>  		   connector->base.id, connector->name,
>> @@ -301,6 +302,16 @@ static void intel_connector_info(struct seq_file *m,
>>  			intel_dp_mst_info(m, intel_connector);
>>  		else
>>  			intel_dp_info(m, intel_connector);
>> +
>> +		/* Add DSC and FEC Support Information for DisplayPort / eDP Connectors */
>> +		intel_dp = intel_attached_dp(intel_connector);
>> +		if (intel_dp){
>> +			seq_printf(m, "\tDSC_Sink_Support: %s\n",
>> +                str_yes_no(drm_dp_sink_supports_dsc(intel_connector->dp.dsc_dpcd)));
>> +			if (!intel_dp_is_edp(intel_dp))
>> +				    seq_printf(m, "\tFEC_Sink_Support: %s\n",
>> +				        str_yes_no(drm_dp_sink_supports_fec(intel_connector->dp.fec_capability)));
>
> Both of the above info is available already in the connector's
> i915_dsc_fec_support debugfs entry. As I understood the aim is having
> each CRTC / connector show its own properties, instead of combinining
> all those into one debugfs entry (as this is done in i915_display_info).
> Based on that I don't think more (duplicated) information should be
> added here.

Agreed. I think the direction should be to reduce stuff from
i915_display_info and put it into per-crtc and per-connector debugfs
instead.

BR,
Jani.



>
> One issue with the i915_dsc_fec_support entry is that it doesn't show
> the sink capabilities if the output isn't enabled on the connector, I
> plan to follow up with a fix for that.
>
>> +		}
>>  		break;
>>  	case DRM_MODE_CONNECTOR_HDMIA:
>>  		if (encoder->type == INTEL_OUTPUT_HDMI ||
>> -- 
>> 2.25.1
>>
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 057a8ce0c2c97..b8d3a438a34d9 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -276,6 +276,7 @@  static void intel_connector_info(struct seq_file *m,
 	struct intel_encoder *encoder =
 		to_intel_encoder(conn_state->best_encoder);
 	const struct drm_display_mode *mode;
+	struct intel_dp *intel_dp;
 
 	seq_printf(m, "[CONNECTOR:%d:%s]: status: %s\n",
 		   connector->base.id, connector->name,
@@ -301,6 +302,16 @@  static void intel_connector_info(struct seq_file *m,
 			intel_dp_mst_info(m, intel_connector);
 		else
 			intel_dp_info(m, intel_connector);
+
+		/* Add DSC and FEC Support Information for DisplayPort / eDP Connectors */
+		intel_dp = intel_attached_dp(intel_connector);
+		if (intel_dp){
+			seq_printf(m, "\tDSC_Sink_Support: %s\n",
+                str_yes_no(drm_dp_sink_supports_dsc(intel_connector->dp.dsc_dpcd)));
+			if (!intel_dp_is_edp(intel_dp))
+				    seq_printf(m, "\tFEC_Sink_Support: %s\n",
+				        str_yes_no(drm_dp_sink_supports_fec(intel_connector->dp.fec_capability)));
+		}
 		break;
 	case DRM_MODE_CONNECTOR_HDMIA:
 		if (encoder->type == INTEL_OUTPUT_HDMI ||