aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorVille Syrjälä2019-12-04 20:05:45 +0200
committerVille Syrjälä2020-01-21 18:16:34 +0200
commitfa7edcd25cd0ffd0321d89c2cf0257ce043c8e60 (patch)
tree20451ed83e1620a5db9ef704f5f902c6fb65aaa6 /drivers/gpu/drm/i915/i915_debugfs.c
parent6fe20299b3eec33e544485f5fc65524f145465be (diff)
drm/i915: Use intel_attached_encoder()
It's easy to confuse the drm_connector->encoder (legacy state adjusted during modeset) and intel_connector->encoder (the statically (sans. MST) attached encoder of the connector). For the latter let's use intel_attached_encoder() consistently. @@ identifier F !~ "^intel_attached_encoder$"; struct intel_connector *C; expression E; @@ F(...) { <... ( C->encoder = E | - C->encoder + intel_attached_encoder(C) ) ...> } @@ identifier F !~ "^intel_attached_encoder$"; struct drm_connector *C; expression E; @@ F(...) { <... ( to_intel_connector(C)->encoder = E | - to_intel_connector(C)->encoder + intel_attached_encoder(to_intel_connector(C)) ) ...> } v2: Regenerated Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191204180549.1267-6-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index c05fa4205de8..49291f142386 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2391,7 +2391,7 @@ static void intel_hdcp_info(struct seq_file *m,
static void intel_dp_info(struct seq_file *m,
struct intel_connector *intel_connector)
{
- struct intel_encoder *intel_encoder = intel_connector->encoder;
+ struct intel_encoder *intel_encoder = intel_attached_encoder(intel_connector);
struct intel_dp *intel_dp = enc_to_intel_dp(intel_encoder);
seq_printf(m, "\tDPCD rev: %x\n", intel_dp->dpcd[DP_DPCD_REV]);
@@ -2410,7 +2410,7 @@ static void intel_dp_info(struct seq_file *m,
static void intel_dp_mst_info(struct seq_file *m,
struct intel_connector *intel_connector)
{
- struct intel_encoder *intel_encoder = intel_connector->encoder;
+ struct intel_encoder *intel_encoder = intel_attached_encoder(intel_connector);
struct intel_dp_mst_encoder *intel_mst =
enc_to_mst(intel_encoder);
struct intel_digital_port *intel_dig_port = intel_mst->primary;
@@ -2424,7 +2424,7 @@ static void intel_dp_mst_info(struct seq_file *m,
static void intel_hdmi_info(struct seq_file *m,
struct intel_connector *intel_connector)
{
- struct intel_encoder *intel_encoder = intel_connector->encoder;
+ struct intel_encoder *intel_encoder = intel_attached_encoder(intel_connector);
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(intel_encoder);
seq_printf(m, "\taudio support: %s\n", yesno(intel_hdmi->has_audio));