From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Polish intel_get_lvds_encoder()
Date: Mon, 18 Mar 2019 13:35:04 -0700 [thread overview]
Message-ID: <20190318203504.GB21001@intel.com> (raw)
In-Reply-To: <20190318202653.15217-2-ville.syrjala@linux.intel.com>
On Mon, Mar 18, 2019 at 10:26:52PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> 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>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 2 +-
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> drivers/gpu/drm/i915/intel_lvds.c | 13 +++++++------
> 3 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 35962a84b910..7c043e8f6298 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -7073,7 +7073,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> * eDP and LVDS bail out early in this case to prevent interfering
> * with an already powered-on LVDS power sequencer.
> */
> - if (intel_get_lvds_encoder(&dev_priv->drm)) {
> + if (intel_get_lvds_encoder(dev_priv)) {
> WARN_ON(!(HAS_PCH_IBX(dev_priv) || HAS_PCH_CPT(dev_priv)));
> DRM_INFO("LVDS was detected, not registering eDP\n");
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index d9f188ef21f4..ac8a67ba704d 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -2117,7 +2117,7 @@ void intel_read_infoframe(struct intel_encoder *encoder,
> bool intel_lvds_port_enabled(struct drm_i915_private *dev_priv,
> i915_reg_t lvds_reg, enum pipe *pipe);
> void intel_lvds_init(struct drm_i915_private *dev_priv);
> -struct intel_encoder *intel_get_lvds_encoder(struct drm_device *dev);
> +struct intel_encoder *intel_get_lvds_encoder(struct drm_i915_private *dev_priv);
> bool intel_is_dual_link_lvds(struct drm_device *dev);
>
> /* intel_overlay.c */
> 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;
> }
> --
> 2.19.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-03-18 20:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 20:26 [PATCH 1/3] drm/i915: Add some missing curly braces Ville Syrjala
2019-03-18 20:26 ` [PATCH 2/3] drm/i915: Polish intel_get_lvds_encoder() Ville Syrjala
2019-03-18 20:35 ` Rodrigo Vivi [this message]
2019-03-18 20:26 ` [PATCH 3/3] drm/i915: Pass dev_priv to intel_is_dual_link_lvds() Ville Syrjala
2019-03-18 20:35 ` Rodrigo Vivi
2019-03-18 20:45 ` Michal Wajdeczko
2019-03-18 20:59 ` Ville Syrjälä
2019-03-19 15:50 ` Jani Nikula
2019-03-19 17:31 ` Rodrigo Vivi
2019-03-19 17:36 ` Chris Wilson
2019-03-18 20:34 ` [PATCH 1/3] drm/i915: Add some missing curly braces Rodrigo Vivi
2019-03-19 14:42 ` Ville Syrjälä
2019-03-19 1:21 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2019-03-19 14:26 ` ✓ Fi.CI.IGT: " 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=20190318203504.GB21001@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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.