From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Subject: Re: [PATCH v2 2/4] drm/i915/dp: Move initialization of hpd_pin to a new function
Date: Fri, 03 Feb 2017 16:22:24 +0200 [thread overview]
Message-ID: <874m0bxskf.fsf@intel.com> (raw)
In-Reply-To: <20170203140316.20792-2-ander.conselvan.de.oliveira@intel.com>
On Fri, 03 Feb 2017, Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> wrote:
> This shaves a few lines from intel_dp_init_connector() and will serve as
> a good place to add other port specific information in a follow up
> patch.
>
> While at it, convert BUG() to MISSING_CASE() in the default case.
>
> v2: s/BUG/MISSING_CASE. (Chris)
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 48 ++++++++++++++++++++++++-----------------
> 1 file changed, 28 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 1a07072..5231965 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5903,6 +5903,33 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> return false;
> }
>
> +static void
> +intel_dp_init_connector_port_info(struct intel_digital_port *intel_dig_port)
> +{
> + struct intel_encoder *encoder = &intel_dig_port->base;
> +
> + /* Set up the hotplug pin. */
> + switch (intel_dig_port->port) {
> + case PORT_A:
> + encoder->hpd_pin = HPD_PORT_A;
> + break;
> + case PORT_B:
> + encoder->hpd_pin = HPD_PORT_B;
> + break;
> + case PORT_C:
> + encoder->hpd_pin = HPD_PORT_C;
> + break;
> + case PORT_D:
> + encoder->hpd_pin = HPD_PORT_D;
> + break;
> + case PORT_E:
> + encoder->hpd_pin = HPD_PORT_E;
> + break;
> + default:
> + MISSING_CASE(intel_dig_port->port);
> + }
> +}
> +
> bool
> intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> struct intel_connector *intel_connector)
> @@ -5988,26 +6015,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> else
> intel_connector->get_hw_state = intel_connector_get_hw_state;
>
> - /* Set up the hotplug pin. */
> - switch (port) {
> - case PORT_A:
> - intel_encoder->hpd_pin = HPD_PORT_A;
> - break;
> - case PORT_B:
> - intel_encoder->hpd_pin = HPD_PORT_B;
> - break;
> - case PORT_C:
> - intel_encoder->hpd_pin = HPD_PORT_C;
> - break;
> - case PORT_D:
> - intel_encoder->hpd_pin = HPD_PORT_D;
> - break;
> - case PORT_E:
> - intel_encoder->hpd_pin = HPD_PORT_E;
> - break;
> - default:
> - BUG();
> - }
> + intel_dp_init_connector_port_info(intel_dig_port);
>
> /* init MST on ports that can support it */
> if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-02-03 14:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 14:03 [PATCH v2 1/4] drm/i915: Remove WA for swapped HPD pins in broxton A stepping Ander Conselvan de Oliveira
2017-02-03 14:03 ` [PATCH v2 2/4] drm/i915/dp: Move initialization of hpd_pin to a new function Ander Conselvan de Oliveira
2017-02-03 14:22 ` Jani Nikula [this message]
2017-02-09 8:25 ` Ander Conselvan De Oliveira
2017-02-03 14:03 ` [PATCH v2 3/4] drm/i915: Store aux power domain in intel_dp Ander Conselvan de Oliveira
2017-02-03 14:32 ` Jani Nikula
2017-02-06 7:41 ` Ander Conselvan De Oliveira
2017-02-03 14:03 ` [PATCH v2 4/4] drm/i915: Store encoder power domain in struct intel_encoder Ander Conselvan de Oliveira
2017-02-03 14:21 ` [PATCH v2 1/4] drm/i915: Remove WA for swapped HPD pins in broxton A stepping Jani Nikula
2017-02-03 16:26 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/4] " 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=874m0bxskf.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ander.conselvan.de.oliveira@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox