diff mbox series

[04/19] drm/i915/dp: Use i915/intel connector local variables in i915_dsc_fec_support_show()

Message ID 20231006133727.1822579-5-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Store DSC DPCD capabilities in the connector | expand

Commit Message

Imre Deak Oct. 6, 2023, 1:37 p.m. UTC
Cahce the i915 specific device and connector pointers in
i915_dsc_fec_support_show().

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Stanislav Lisovskiy Oct. 9, 2023, 1:58 p.m. UTC | #1
On Fri, Oct 06, 2023 at 04:37:12PM +0300, Imre Deak wrote:
> Cahce the i915 specific device and connector pointers in
> i915_dsc_fec_support_show().

Typo cahce/cache. Would say more like "store", but doesn't matter.


Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index fbe75d47a1654..834a8e50ea4fb 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1191,8 +1191,8 @@ DEFINE_SHOW_ATTRIBUTE(i915_lpsp_capability);
>  
>  static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
>  {
> -	struct drm_connector *connector = m->private;
> -	struct drm_device *dev = connector->dev;
> +	struct intel_connector *connector = to_intel_connector(m->private);
> +	struct drm_i915_private *i915 = to_i915(connector->base.dev);
>  	struct drm_crtc *crtc;
>  	struct intel_dp *intel_dp;
>  	struct drm_modeset_acquire_ctx ctx;
> @@ -1204,7 +1204,7 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
>  
>  	do {
>  		try_again = false;
> -		ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
> +		ret = drm_modeset_lock(&i915->drm.mode_config.connection_mutex,
>  				       &ctx);
>  		if (ret) {
>  			if (ret == -EDEADLK && !drm_modeset_backoff(&ctx)) {
> @@ -1213,8 +1213,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
>  			}
>  			break;
>  		}
> -		crtc = connector->state->crtc;
> -		if (connector->status != connector_status_connected || !crtc) {
> +		crtc = connector->base.state->crtc;
> +		if (connector->base.status != connector_status_connected || !crtc) {
>  			ret = -ENODEV;
>  			break;
>  		}
> @@ -1229,7 +1229,7 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
>  		} else if (ret) {
>  			break;
>  		}
> -		intel_dp = intel_attached_dp(to_intel_connector(connector));
> +		intel_dp = intel_attached_dp(connector);
>  		crtc_state = to_intel_crtc_state(crtc->state);
>  		seq_printf(m, "DSC_Enabled: %s\n",
>  			   str_yes_no(crtc_state->dsc.compression_enable));
> -- 
> 2.39.2
>
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 fbe75d47a1654..834a8e50ea4fb 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1191,8 +1191,8 @@  DEFINE_SHOW_ATTRIBUTE(i915_lpsp_capability);
 
 static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
 {
-	struct drm_connector *connector = m->private;
-	struct drm_device *dev = connector->dev;
+	struct intel_connector *connector = to_intel_connector(m->private);
+	struct drm_i915_private *i915 = to_i915(connector->base.dev);
 	struct drm_crtc *crtc;
 	struct intel_dp *intel_dp;
 	struct drm_modeset_acquire_ctx ctx;
@@ -1204,7 +1204,7 @@  static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
 
 	do {
 		try_again = false;
-		ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
+		ret = drm_modeset_lock(&i915->drm.mode_config.connection_mutex,
 				       &ctx);
 		if (ret) {
 			if (ret == -EDEADLK && !drm_modeset_backoff(&ctx)) {
@@ -1213,8 +1213,8 @@  static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
 			}
 			break;
 		}
-		crtc = connector->state->crtc;
-		if (connector->status != connector_status_connected || !crtc) {
+		crtc = connector->base.state->crtc;
+		if (connector->base.status != connector_status_connected || !crtc) {
 			ret = -ENODEV;
 			break;
 		}
@@ -1229,7 +1229,7 @@  static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
 		} else if (ret) {
 			break;
 		}
-		intel_dp = intel_attached_dp(to_intel_connector(connector));
+		intel_dp = intel_attached_dp(connector);
 		crtc_state = to_intel_crtc_state(crtc->state);
 		seq_printf(m, "DSC_Enabled: %s\n",
 			   str_yes_no(crtc_state->dsc.compression_enable));