Commit 8e329a03 authored by Jani Nikula's avatar Jani Nikula Committed by Dave Airlie

drm/i915: replace drm_get_encoder_name() with direct name field use

Generated using semantic patches:

@@
expression E;
@@

- drm_get_encoder_name(&E)
+ E.name

@@
expression E;
@@

- drm_get_encoder_name(E)
+ E->name

v2: Turn drm_get_encoder_name(&E) into E.name instead of &(E)->name.
Acked-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 25933820
...@@ -2197,7 +2197,7 @@ static void intel_encoder_info(struct seq_file *m, ...@@ -2197,7 +2197,7 @@ static void intel_encoder_info(struct seq_file *m,
encoder = &intel_encoder->base; encoder = &intel_encoder->base;
seq_printf(m, "\tencoder %d: type: %s, connectors:\n", seq_printf(m, "\tencoder %d: type: %s, connectors:\n",
encoder->base.id, drm_get_encoder_name(encoder)); encoder->base.id, encoder->name);
for_each_connector_on_encoder(dev, encoder, intel_connector) { for_each_connector_on_encoder(dev, encoder, intel_connector) {
struct drm_connector *connector = &intel_connector->base; struct drm_connector *connector = &intel_connector->base;
seq_printf(m, "\t\tconnector %d: type: %s, status: %s", seq_printf(m, "\t\tconnector %d: type: %s, status: %s",
......
...@@ -7855,7 +7855,7 @@ void intel_write_eld(struct drm_encoder *encoder, ...@@ -7855,7 +7855,7 @@ void intel_write_eld(struct drm_encoder *encoder,
connector->base.id, connector->base.id,
connector->name, connector->name,
connector->encoder->base.id, connector->encoder->base.id,
drm_get_encoder_name(connector->encoder)); connector->encoder->name);
connector->eld[6] = drm_av_sync_delay(connector, mode) / 2; connector->eld[6] = drm_av_sync_delay(connector, mode) / 2;
...@@ -8321,7 +8321,7 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector, ...@@ -8321,7 +8321,7 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,
DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id, connector->name, connector->base.id, connector->name,
encoder->base.id, drm_get_encoder_name(encoder)); encoder->base.id, encoder->name);
/* /*
* Algorithm gets a little messy: * Algorithm gets a little messy:
...@@ -8433,7 +8433,7 @@ void intel_release_load_detect_pipe(struct drm_connector *connector, ...@@ -8433,7 +8433,7 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id, connector->name, connector->base.id, connector->name,
encoder->base.id, drm_get_encoder_name(encoder)); encoder->base.id, encoder->name);
if (old->load_detect_temp) { if (old->load_detect_temp) {
to_intel_connector(connector)->new_encoder = NULL; to_intel_connector(connector)->new_encoder = NULL;
...@@ -10050,7 +10050,7 @@ check_encoder_state(struct drm_device *dev) ...@@ -10050,7 +10050,7 @@ check_encoder_state(struct drm_device *dev)
DRM_DEBUG_KMS("[ENCODER:%d:%s]\n", DRM_DEBUG_KMS("[ENCODER:%d:%s]\n",
encoder->base.base.id, encoder->base.base.id,
drm_get_encoder_name(&encoder->base)); encoder->base.name);
WARN(&encoder->new_crtc->base != encoder->base.crtc, WARN(&encoder->new_crtc->base != encoder->base.crtc,
"encoder's stage crtc doesn't match current crtc\n"); "encoder's stage crtc doesn't match current crtc\n");
...@@ -11960,7 +11960,7 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder) ...@@ -11960,7 +11960,7 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
if (encoder->connectors_active && !has_active_crtc) { if (encoder->connectors_active && !has_active_crtc) {
DRM_DEBUG_KMS("[ENCODER:%d:%s] has active connectors but no active pipe!\n", DRM_DEBUG_KMS("[ENCODER:%d:%s] has active connectors but no active pipe!\n",
encoder->base.base.id, encoder->base.base.id,
drm_get_encoder_name(&encoder->base)); encoder->base.name);
/* Connector is active, but has no active pipe. This is /* Connector is active, but has no active pipe. This is
* fallout from our resume register restoring. Disable * fallout from our resume register restoring. Disable
...@@ -11968,7 +11968,7 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder) ...@@ -11968,7 +11968,7 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
if (encoder->base.crtc) { if (encoder->base.crtc) {
DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n", DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n",
encoder->base.base.id, encoder->base.base.id,
drm_get_encoder_name(&encoder->base)); encoder->base.name);
encoder->disable(encoder); encoder->disable(encoder);
} }
...@@ -12086,7 +12086,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) ...@@ -12086,7 +12086,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
encoder->connectors_active = false; encoder->connectors_active = false;
DRM_DEBUG_KMS("[ENCODER:%d:%s] hw state readout: %s, pipe %c\n", DRM_DEBUG_KMS("[ENCODER:%d:%s] hw state readout: %s, pipe %c\n",
encoder->base.base.id, encoder->base.base.id,
drm_get_encoder_name(&encoder->base), encoder->base.name,
encoder->base.crtc ? "enabled" : "disabled", encoder->base.crtc ? "enabled" : "disabled",
pipe_name(pipe)); pipe_name(pipe));
} }
......
...@@ -3267,7 +3267,7 @@ intel_dp_check_link_status(struct intel_dp *intel_dp) ...@@ -3267,7 +3267,7 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count)) { if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count)) {
DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n", DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
drm_get_encoder_name(&intel_encoder->base)); intel_encoder->base.name);
intel_dp_start_link_train(intel_dp); intel_dp_start_link_train(intel_dp);
intel_dp_complete_link_train(intel_dp); intel_dp_complete_link_train(intel_dp);
intel_dp_stop_link_train(intel_dp); intel_dp_stop_link_train(intel_dp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment