Skip to content

Commit 829d8a1

Browse files
committed
drm/i915/dp: Use i915/intel connector local variables in i915_dsc_fec_support_show()
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 <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 808b43f commit 829d8a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/gpu/drm/i915/display/intel_display_debugfs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,8 @@ DEFINE_SHOW_ATTRIBUTE(i915_lpsp_capability);
11921192

11931193
static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
11941194
{
1195-
struct drm_connector *connector = m->private;
1196-
struct drm_device *dev = connector->dev;
1195+
struct intel_connector *connector = to_intel_connector(m->private);
1196+
struct drm_i915_private *i915 = to_i915(connector->base.dev);
11971197
struct drm_crtc *crtc;
11981198
struct intel_dp *intel_dp;
11991199
struct drm_modeset_acquire_ctx ctx;
@@ -1205,7 +1205,7 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
12051205

12061206
do {
12071207
try_again = false;
1208-
ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
1208+
ret = drm_modeset_lock(&i915->drm.mode_config.connection_mutex,
12091209
&ctx);
12101210
if (ret) {
12111211
if (ret == -EDEADLK && !drm_modeset_backoff(&ctx)) {
@@ -1214,8 +1214,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
12141214
}
12151215
break;
12161216
}
1217-
crtc = connector->state->crtc;
1218-
if (connector->status != connector_status_connected || !crtc) {
1217+
crtc = connector->base.state->crtc;
1218+
if (connector->base.status != connector_status_connected || !crtc) {
12191219
ret = -ENODEV;
12201220
break;
12211221
}
@@ -1230,7 +1230,7 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
12301230
} else if (ret) {
12311231
break;
12321232
}
1233-
intel_dp = intel_attached_dp(to_intel_connector(connector));
1233+
intel_dp = intel_attached_dp(connector);
12341234
crtc_state = to_intel_crtc_state(crtc->state);
12351235
seq_printf(m, "DSC_Enabled: %s\n",
12361236
str_yes_no(crtc_state->dsc.compression_enable));

0 commit comments

Comments
 (0)