diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-03-18 23:26:52 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-03-19 17:36:54 +0300 |
commit | 17be49428a4f834d64235b861580b24786effe0e (patch) | |
tree | a6471674100ed50cb09258d66151716de0b4173e /drivers/gpu/drm/i915/intel_lvds.c | |
parent | 27b680f917e755f1da6f4b22363af96e65969c4e (diff) | |
download | linux-17be49428a4f834d64235b861580b24786effe0e.tar.xz |
drm/i915: Polish intel_get_lvds_encoder()
Pass dev_priv to intel_get_lvds_encoder() and polish the
implementation a bit.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190318202653.15217-2-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 6e3cf1c4ad00..306bc321fdaa 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -742,20 +742,21 @@ static const struct dmi_system_id intel_dual_link_lvds[] = { { } /* terminating entry */ }; -struct intel_encoder *intel_get_lvds_encoder(struct drm_device *dev) +struct intel_encoder *intel_get_lvds_encoder(struct drm_i915_private *dev_priv) { - struct intel_encoder *intel_encoder; + struct intel_encoder *encoder; - for_each_intel_encoder(dev, intel_encoder) - if (intel_encoder->type == INTEL_OUTPUT_LVDS) - return intel_encoder; + for_each_intel_encoder(&dev_priv->drm, encoder) { + if (encoder->type == INTEL_OUTPUT_LVDS) + return encoder; + } return NULL; } bool intel_is_dual_link_lvds(struct drm_device *dev) { - struct intel_encoder *encoder = intel_get_lvds_encoder(dev); + struct intel_encoder *encoder = intel_get_lvds_encoder(to_i915(dev)); return encoder && to_lvds_encoder(&encoder->base)->is_dual_link; } |