intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
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/8] drm/i915: Introduce intel_encoder_is_dig_port()
Date: Fri, 6 Jul 2018 10:01:54 -0700	[thread overview]
Message-ID: <20180706170154.GF2848@intel.com> (raw)
In-Reply-To: <20180705164357.28512-3-ville.syrjala@linux.intel.com>

On Thu, Jul 05, 2018 at 07:43:51PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add intel_encoder_is_dig_port() to match intel_encoder_is_dp().
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_drv.h | 24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 6fe3adafaf20..077189ed9e46 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1246,23 +1246,29 @@ intel_attached_encoder(struct drm_connector *connector)
>  	return to_intel_connector(connector)->encoder;
>  }
>  
> -static inline struct intel_digital_port *
> -enc_to_dig_port(struct drm_encoder *encoder)
> +static inline bool intel_encoder_is_dig_port(struct intel_encoder *encoder)
>  {
> -	struct intel_encoder *intel_encoder = to_intel_encoder(encoder);
> -
> -	switch (intel_encoder->type) {
> +	switch (encoder->type) {
>  	case INTEL_OUTPUT_DDI:
> -		WARN_ON(!HAS_DDI(to_i915(encoder->dev)));
> -		/* fall through */
>  	case INTEL_OUTPUT_DP:
>  	case INTEL_OUTPUT_EDP:
>  	case INTEL_OUTPUT_HDMI:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}
> +
> +static inline struct intel_digital_port *
> +enc_to_dig_port(struct drm_encoder *encoder)
> +{
> +	struct intel_encoder *intel_encoder = to_intel_encoder(encoder);
> +
> +	if (intel_encoder_is_dig_port(intel_encoder))
>  		return container_of(encoder, struct intel_digital_port,
>  				    base.base);
> -	default:
> +	else
>  		return NULL;
> -	}
>  }
>  
>  static inline struct intel_dp_mst_encoder *
> -- 
> 2.16.4
> 
> _______________________________________________
> 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

  reply	other threads:[~2018-07-06 17:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 16:43 [PATCH 0/8] drm/i915: Hotplug cleanups and whanot Ville Syrjala
2018-07-05 16:43 ` [PATCH 1/8] drm/i915: Introduce for_each_intel_dp() Ville Syrjala
2018-07-05 21:17   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 2/8] drm/i915: Introduce intel_encoder_is_dig_port() Ville Syrjala
2018-07-06 17:01   ` Rodrigo Vivi [this message]
2018-07-05 16:43 ` [PATCH 3/8] drm/i915: Rewrite mst suspend/resume in terms of encoders Ville Syrjala
2018-07-05 21:29   ` Rodrigo Vivi
2018-07-06 10:42     ` Ville Syrjälä
2018-07-06 17:00       ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 4/8] drm/i915: Nuke dev_priv->irq_port[] Ville Syrjala
2018-07-09 21:27   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 5/8] drm/i915: s/int i/enum hpd_pin pin/ Ville Syrjala
2018-07-09 21:28   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 6/8] drm/i915: Pass hpd_pin to long_pulse_detect() Ville Syrjala
2018-07-05 21:14   ` Rodrigo Vivi
2018-07-05 16:43 ` [PATCH 7/8] drm/i915: Assert that our hpd pin bitmasks don't overflow Ville Syrjala
2018-07-05 16:52   ` Chris Wilson
2018-07-05 17:51     ` Ville Syrjälä
2018-07-05 17:57       ` Chris Wilson
2018-07-05 16:43 ` [PATCH 8/8] drm/i915: Print the long_mask alongside the pin_mask Ville Syrjala
2018-07-05 18:00   ` Chris Wilson
2018-07-05 20:55 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Hotplug cleanups and whanot Patchwork
2018-07-05 20:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-05 21:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-06 11:05 ` ✓ 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=20180706170154.GF2848@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).