drm/i915: Pass intel_connector to intel_attached_*()
Life is usually easier when we pass around intel_ types instead of drm_ types. In this case it might not be, but I think being consistent is a good thing anyway. Also some of this might get cleaned up a bit more later as we keep propagating the intel_ types further. @find@ identifier F =~ "^intel_attached_.*"; identifier C; @@ F(struct drm_connector *C) { ... } @@ identifier find.F; identifier find.C; @@ F( - struct drm_connector *C + struct intel_connector *connector ) { <... - C + &connector->base ...> } @@ identifier find.F; expression C; @@ - F(C) + F(to_intel_connector(C)) @@ expression C; @@ - to_intel_connector(&C->base) + C Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191204180549.1267-3-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola <mika.kahola@intel.com>
This commit is contained in:
@@ -1979,7 +1979,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(connector)->base);
|
||||
enc_to_intel_dp(&intel_attached_encoder(to_intel_connector(connector))->base);
|
||||
int ret;
|
||||
|
||||
if (!CAN_PSR(dev_priv)) {
|
||||
@@ -3014,7 +3014,7 @@ static int i915_dp_mst_info(struct seq_file *m, void *unused)
|
||||
if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)
|
||||
continue;
|
||||
|
||||
intel_encoder = intel_attached_encoder(connector);
|
||||
intel_encoder = intel_attached_encoder(to_intel_connector(connector));
|
||||
if (!intel_encoder || intel_encoder->type == INTEL_OUTPUT_DP_MST)
|
||||
continue;
|
||||
|
||||
@@ -4144,7 +4144,7 @@ static int i915_drrs_ctl_set(void *data, u64 val)
|
||||
drm_connector_mask(connector)))
|
||||
continue;
|
||||
|
||||
encoder = intel_attached_encoder(connector);
|
||||
encoder = intel_attached_encoder(to_intel_connector(connector));
|
||||
if (encoder->type != INTEL_OUTPUT_EDP)
|
||||
continue;
|
||||
|
||||
@@ -4355,7 +4355,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(connector)->base);
|
||||
enc_to_intel_dp(&intel_attached_encoder(to_intel_connector(connector))->base);
|
||||
u8 buf[16];
|
||||
ssize_t err;
|
||||
int i;
|
||||
@@ -4390,7 +4390,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(connector)->base);
|
||||
enc_to_intel_dp(&intel_attached_encoder(to_intel_connector(connector))->base);
|
||||
|
||||
if (connector->status != connector_status_connected)
|
||||
return -ENODEV;
|
||||
@@ -4468,7 +4468,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(connector)->base);
|
||||
intel_dp = enc_to_intel_dp(&intel_attached_encoder(to_intel_connector(connector))->base);
|
||||
crtc_state = to_intel_crtc_state(crtc->state);
|
||||
seq_printf(m, "DSC_Enabled: %s\n",
|
||||
yesno(crtc_state->dsc.compression_enable));
|
||||
@@ -4495,7 +4495,7 @@ static ssize_t i915_dsc_fec_support_write(struct file *file,
|
||||
int ret;
|
||||
struct drm_connector *connector =
|
||||
((struct seq_file *)file->private_data)->private;
|
||||
struct intel_encoder *encoder = intel_attached_encoder(connector);
|
||||
struct intel_encoder *encoder = intel_attached_encoder(to_intel_connector(connector));
|
||||
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
|
||||
|
||||
if (len == 0)
|
||||
|
Reference in New Issue
Block a user