intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH v3 1/3] drm/i915/icl: replace check for combo phy
Date: Wed, 14 Nov 2018 10:03:25 +0200	[thread overview]
Message-ID: <87efbojdbm.fsf@intel.com> (raw)
In-Reply-To: <20181114011509.3667-1-lucas.demarchi@intel.com>

On Tue, 13 Nov 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> These are the only places that assume ports A and B are the ones with
> combo phy.  Let's use intel_port_is_combophy() there to make sure
> it checks for combo phy ports the same way everywhere.
>
> v2: define for_each_combo_port() helper to check the ports
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> Reviewed-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_combo_phy.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_combo_phy.c b/drivers/gpu/drm/i915/intel_combo_phy.c
> index f7c16f6724f0..49f3a533860d 100644
> --- a/drivers/gpu/drm/i915/intel_combo_phy.c
> +++ b/drivers/gpu/drm/i915/intel_combo_phy.c
> @@ -5,6 +5,10 @@
>  
>  #include "intel_drv.h"
>  
> +#define for_each_combo_port(__dev_priv, __port) \
> +	for ((__port) = PORT_A; (__port) < I915_MAX_PORTS; (__port)++)	\
> +		for_each_if(intel_port_is_combophy(__dev_priv, __port))
> +
>  enum {
>  	PROCMON_0_85V_DOT_0,
>  	PROCMON_0_95V_DOT_0,
> @@ -199,7 +203,7 @@ void icl_combo_phys_init(struct drm_i915_private *dev_priv)
>  {
>  	enum port port;
>  
> -	for (port = PORT_A; port <= PORT_B; port++) {
> +	for_each_combo_port(dev_priv, port) {
>  		u32 val;
>  
>  		if (icl_combo_phy_verify_state(dev_priv, port)) {
> @@ -228,7 +232,7 @@ void icl_combo_phys_uninit(struct drm_i915_private *dev_priv)
>  {
>  	enum port port;
>  
> -	for (port = PORT_A; port <= PORT_B; port++) {
> +	for_each_combo_port(dev_priv, port) {
>  		u32 val;
>  
>  		if (!icl_combo_phy_verify_state(dev_priv, port))

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2018-11-14  8:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14  1:15 [PATCH v3 1/3] drm/i915/icl: replace check for combo phy Lucas De Marchi
2018-11-14  1:15 ` [PATCH v3 2/3] drm/i915/icl: reverse uninit order Lucas De Marchi
2018-11-14  8:08   ` Jani Nikula
2018-11-14  1:15 ` [PATCH v3 3/3] drm/i195: spell out reverse on for_each macros Lucas De Marchi
2018-11-14  8:09   ` Jani Nikula
2018-11-14  1:20 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v3,1/3] drm/i915/icl: replace check for combo phy Patchwork
2018-11-14  4:40 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-14  6:23 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-16  0:41   ` Souza, Jose
2018-11-14  8:03 ` Jani Nikula [this message]

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=87efbojdbm.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=paulo.r.zanoni@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).