All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 7/9] drm/i915: Use intel_attached_dp() instead of hand rolling it
Date: Wed,  4 Dec 2019 20:05:47 +0200	[thread overview]
Message-ID: <20191204180549.1267-8-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20191204180549.1267-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Replace the hand rolled intel_attached_dp() with the real thing.

@@
identifier F !~ "^intel_attached_dp$";
expression C;
@@
F(...)
{
<...
- enc_to_intel_dp(intel_attached_encoder(C))
+ intel_attached_dp(C)
...>
}

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c         |  2 +-
 .../gpu/drm/i915/display/intel_dp_aux_backlight.c    | 12 ++++++------
 drivers/gpu/drm/i915/i915_debugfs.c                  |  8 ++++----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index df1b80387106..ec292ccb6eaf 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -14505,7 +14505,7 @@ static void intel_set_dp_tp_ctl_normal(struct intel_crtc *crtc,
 		if (conn_state->crtc == &crtc->base)
 			break;
 	}
-	intel_dp = enc_to_intel_dp(intel_attached_encoder(to_intel_connector(conn)));
+	intel_dp = intel_attached_dp(to_intel_connector(conn));
 	intel_dp_stop_link_train(intel_dp);
 }
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
index 771e22a0b2a4..1e69c5bbe65b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -57,7 +57,7 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable)
  */
 static u32 intel_dp_aux_get_backlight(struct intel_connector *connector)
 {
-	struct intel_dp *intel_dp = enc_to_intel_dp(intel_attached_encoder(connector));
+	struct intel_dp *intel_dp = intel_attached_dp(connector);
 	u8 read_val[2] = { 0x0 };
 	u16 level = 0;
 
@@ -82,7 +82,7 @@ static void
 intel_dp_aux_set_backlight(const struct drm_connector_state *conn_state, u32 level)
 {
 	struct intel_connector *connector = to_intel_connector(conn_state->connector);
-	struct intel_dp *intel_dp = enc_to_intel_dp(intel_attached_encoder(connector));
+	struct intel_dp *intel_dp = intel_attached_dp(connector);
 	u8 vals[2] = { 0x0 };
 
 	vals[0] = level;
@@ -110,7 +110,7 @@ intel_dp_aux_set_backlight(const struct drm_connector_state *conn_state, u32 lev
 static bool intel_dp_aux_set_pwm_freq(struct intel_connector *connector)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
-	struct intel_dp *intel_dp = enc_to_intel_dp(intel_attached_encoder(connector));
+	struct intel_dp *intel_dp = intel_attached_dp(connector);
 	int freq, fxp, fxp_min, fxp_max, fxp_actual, f = 1;
 	u8 pn, pn_min, pn_max;
 
@@ -178,7 +178,7 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_st
 					  const struct drm_connector_state *conn_state)
 {
 	struct intel_connector *connector = to_intel_connector(conn_state->connector);
-	struct intel_dp *intel_dp = enc_to_intel_dp(intel_attached_encoder(connector));
+	struct intel_dp *intel_dp = intel_attached_dp(connector);
 	u8 dpcd_buf, new_dpcd_buf, edp_backlight_mode;
 
 	if (drm_dp_dpcd_readb(&intel_dp->aux,
@@ -229,7 +229,7 @@ static void intel_dp_aux_disable_backlight(const struct drm_connector_state *old
 static int intel_dp_aux_setup_backlight(struct intel_connector *connector,
 					enum pipe pipe)
 {
-	struct intel_dp *intel_dp = enc_to_intel_dp(intel_attached_encoder(connector));
+	struct intel_dp *intel_dp = intel_attached_dp(connector);
 	struct intel_panel *panel = &connector->panel;
 
 	if (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT)
@@ -248,7 +248,7 @@ static int intel_dp_aux_setup_backlight(struct intel_connector *connector,
 static bool
 intel_dp_aux_display_control_capable(struct intel_connector *connector)
 {
-	struct intel_dp *intel_dp = enc_to_intel_dp(intel_attached_encoder(connector));
+	struct intel_dp *intel_dp = intel_attached_dp(connector);
 
 	/* Check the eDP Display control capabilities registers to determine if
 	 * the panel can support backlight control over the aux channel
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index d8c2fa2672b5..5de5dacef394 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2020,7 +2020,7 @@ static int i915_psr_sink_status_show(struct seq_file *m, void *data)
 	struct drm_connector *connector = m->private;
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_dp *intel_dp =
-		enc_to_intel_dp(intel_attached_encoder(to_intel_connector(connector)));
+		intel_attached_dp(to_intel_connector(connector));
 	int ret;
 
 	if (!CAN_PSR(dev_priv)) {
@@ -4396,7 +4396,7 @@ static int i915_dpcd_show(struct seq_file *m, void *data)
 {
 	struct drm_connector *connector = m->private;
 	struct intel_dp *intel_dp =
-		enc_to_intel_dp(intel_attached_encoder(to_intel_connector(connector)));
+		intel_attached_dp(to_intel_connector(connector));
 	u8 buf[16];
 	ssize_t err;
 	int i;
@@ -4431,7 +4431,7 @@ static int i915_panel_show(struct seq_file *m, void *data)
 {
 	struct drm_connector *connector = m->private;
 	struct intel_dp *intel_dp =
-		enc_to_intel_dp(intel_attached_encoder(to_intel_connector(connector)));
+		intel_attached_dp(to_intel_connector(connector));
 
 	if (connector->status != connector_status_connected)
 		return -ENODEV;
@@ -4509,7 +4509,7 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
 		} else if (ret) {
 			break;
 		}
-		intel_dp = enc_to_intel_dp(intel_attached_encoder(to_intel_connector(connector)));
+		intel_dp = intel_attached_dp(to_intel_connector(connector));
 		crtc_state = to_intel_crtc_state(crtc->state);
 		seq_printf(m, "DSC_Enabled: %s\n",
 			   yesno(crtc_state->dsc.compression_enable));
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-12-04 18:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 18:05 [Intel-gfx] [PATCH 0/9] drm/i915: Cleanups around intel_attached_encoder() & co Ville Syrjala
2019-12-04 18:05 ` [Intel-gfx] [PATCH 1/9] drm/i915/hdcp: Nuke intel_hdcp_transcoder_config() Ville Syrjala
2019-12-05  9:33   ` Ramalingam C
2019-12-04 18:05 ` [Intel-gfx] [PATCH 2/9] drm/i915: Pass intel_connector to intel_attached_*() Ville Syrjala
2020-01-09  7:28   ` Kahola, Mika
2019-12-04 18:05 ` [Intel-gfx] [PATCH 3/9] drm/i915: Pass intel_encoder to enc_to_*() Ville Syrjala
2019-12-18 20:41   ` Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 4/9] drm/i915: Use the passed in encoder Ville Syrjala
2019-12-05 10:24   ` Ramalingam C
2019-12-04 18:05 ` [Intel-gfx] [PATCH 5/9] drm/i915: Use intel_attached_encoder() Ville Syrjala
2019-12-05 10:59   ` Ramalingam C
2019-12-05 11:04     ` Ramalingam C
2019-12-09 15:52     ` Ville Syrjälä
2020-01-21 15:49   ` Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 6/9] drm/i915: Relocate intel_attached_dp() Ville Syrjala
2020-01-13 13:53   ` Kahola, Mika
2019-12-04 18:05 ` Ville Syrjala [this message]
2020-01-21 14:46   ` [Intel-gfx] [PATCH 7/9] drm/i915: Use intel_attached_dp() instead of hand rolling it Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 8/9] drm/i915: Rename conn_to_dig_port() to intel_attached_dig_port() Ville Syrjala
2020-01-21 14:46   ` Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 9/9] drm/i915/hdcp: Clean up local variables Ville Syrjala
2019-12-05 10:22   ` Ramalingam C
2019-12-04 23:48 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Cleanups around intel_attached_encoder() & co Patchwork
2019-12-05  0:15 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2019-12-05 11:58 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Cleanups around intel_attached_encoder() & co. (rev2) Patchwork
2019-12-05 12:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2019-12-05 15:06 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204180549.1267-8-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.