]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dp: Use i915/intel connector local variables in i915_dsc_fec_support_show()
authorImre Deak <imre.deak@intel.com>
Fri, 6 Oct 2023 13:37:12 +0000 (16:37 +0300)
committerImre Deak <imre.deak@intel.com>
Mon, 16 Oct 2023 14:00:45 +0000 (17:00 +0300)
Cache the i915 specific device and connector pointers in
i915_dsc_fec_support_show().

v2:
- s/Cahce/Cache typo in commit log. (Stan)

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231006133727.1822579-5-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display_debugfs.c

index f6d7c4d45fae62fac85397d9326e50d43dc9acaa..cdadda327272f37a1ff30af4a0a557457d9d2057 100644 (file)
@@ -1192,8 +1192,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;
@@ -1205,7 +1205,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)) {
@@ -1214,8 +1214,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;
                }
@@ -1230,7 +1230,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));