From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/i915: stop using is_pch_edp() in intel_dp_init_connector()
Date: Wed, 8 May 2013 11:07:56 +0300 [thread overview]
Message-ID: <20130508080756.GD14974@intel.com> (raw)
In-Reply-To: <1367940253-10329-5-git-send-email-imre.deak@intel.com>
On Tue, May 07, 2013 at 06:24:11PM +0300, Imre Deak wrote:
> is_pch_edp() will be removed in a follow-up patch, so replace it
> with a check for the port and VBT info (for port-D eDP).
>
> Also make things a bit clearer by using a switch on the ports.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 32 +++++++++++++++++++++-----------
> 1 file changed, 21 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index d5a3717..31c6129 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3010,24 +3010,34 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> if (intel_dpd_is_edp(dev))
> intel_dp->is_pch_edp = true;
>
> + type = DRM_MODE_CONNECTOR_DisplayPort;
> /*
> * FIXME : We need to initialize built-in panels before external panels.
> * For X0, DP_C is fixed as eDP. Revisit this as part of VLV eDP cleanup
> */
> - if (IS_VALLEYVIEW(dev) && port == PORT_C) {
> - type = DRM_MODE_CONNECTOR_eDP;
> - intel_encoder->type = INTEL_OUTPUT_EDP;
> - } else if (port == PORT_A || is_pch_edp(intel_dp)) {
> + switch (port) {
> + case PORT_A:
> type = DRM_MODE_CONNECTOR_eDP;
> - intel_encoder->type = INTEL_OUTPUT_EDP;
> - } else {
> - /* The intel_encoder->type value may be INTEL_OUTPUT_UNKNOWN for
> - * DDI or INTEL_OUTPUT_DISPLAYPORT for the older gens, so don't
> - * rewrite it.
> - */
> - type = DRM_MODE_CONNECTOR_DisplayPort;
> + break;
> + case PORT_C:
> + if (IS_VALLEYVIEW(dev))
> + type = DRM_MODE_CONNECTOR_eDP;
> + break;
> + case PORT_D:
> + if (HAS_PCH_SPLIT(dev) && intel_dpd_is_edp(dev))
> + type = DRM_MODE_CONNECTOR_eDP;
> + break;
> + default: /* silence GCC warning */
> + break;
> }
>
> + /* The intel_encoder->type value may be INTEL_OUTPUT_UNKNOWN for
> + * DDI or INTEL_OUTPUT_DISPLAYPORT for the older gens, so don't
> + * rewrite it.
> + */
> + if (type == DRM_MODE_CONNECTOR_eDP)
> + intel_encoder->type = INTEL_OUTPUT_EDP;
The comment is a bit confusing since now it's in the code path that can
rewrite it. Perhaps add some mention of eDP to the comment as well, so
that people understand that it's still valid for other kinds of
connectors.
> +
> drm_connector_init(dev, connector, &intel_dp_connector_funcs, type);
> drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
>
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-05-08 8:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 15:24 [PATCH 0/6] drm/i915: remove pch_edp encoder state variable Imre Deak
2013-05-07 15:24 ` [PATCH 1/6] drm/i915: use enc_to_intel_dp() instead of opencoding the same Imre Deak
2013-05-07 15:24 ` [PATCH 2/6] drm/i915: hsw: replace !is_pch_edp() with port==PORT_A Imre Deak
2013-05-07 15:24 ` [PATCH 3/6] drm/i915: ilk-ivb: replace is_pch_edp() with port==PORT_D Imre Deak
2013-05-07 15:35 ` Daniel Vetter
2013-05-07 15:24 ` [PATCH 4/6] drm/i915: stop using is_pch_edp() in intel_dp_init_connector() Imre Deak
2013-05-08 8:07 ` Ville Syrjälä [this message]
2013-05-07 15:24 ` [PATCH 5/6] drm/i915: stop using is_pch_edp() in is_cpu_edp() Imre Deak
2013-05-07 15:24 ` [PATCH 6/6] drm/i915: remove is_pch_edp() helpers and state variable Imre Deak
2013-05-08 10:14 ` [PATCH v2 0/7] drm/i915: remove pch_edp encoder " Imre Deak
2013-05-08 10:14 ` [PATCH v2 1/7] drm/i915: use enc_to_intel_dp() instead of opencoding the same Imre Deak
2013-05-08 10:14 ` [PATCH v2 2/7] drm/i915: hsw: replace !is_pch_edp() with port==PORT_A Imre Deak
2013-05-08 10:14 ` [PATCH v2 3/7] drm/i915: ilk-ivb: " Imre Deak
2013-05-08 10:14 ` [PATCH v2 4/7] drm/i915: stop using is_pch_edp() in intel_dp_init_connector() Imre Deak
2013-05-08 10:14 ` [PATCH v2 5/7] drm/i915: stop using is_pch_edp() in is_cpu_edp() Imre Deak
2013-05-10 8:49 ` Daniel Vetter
2013-05-10 8:52 ` Imre Deak
2013-05-08 10:14 ` [PATCH v2 6/7] drm/i915: remove is_pch_edp() helpers and state variable Imre Deak
2013-05-08 10:14 ` [PATCH v2 7/7] drm/i915: print DP init debug messages from a single place Imre Deak
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=20130508080756.GD14974@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=imre.deak@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.