Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 11/11] drm/i915/ddi: simplify intel_ddi_get_encoder_pipes() slightly
Date: Tue, 19 Nov 2024 13:40:16 +0200	[thread overview]
Message-ID: <Zzx5IKsm7us1CcBP@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <0aa1274597fa84a0dc3c9ccf7bb20997d1d154bf.1731941270.git.jani.nikula@intel.com>

On Mon, Nov 18, 2024 at 04:49:06PM +0200, Jani Nikula wrote:
> Use a temporary variable for DDI mode to simplify the conditions. This
> is in line with the other places that read DDI mode.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 33628cbc0f72..e25b712bf03b 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -818,7 +818,7 @@ static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder,
>  	mst_pipe_mask = 0;
>  	for_each_pipe(dev_priv, p) {
>  		enum transcoder cpu_transcoder = (enum transcoder)p;
> -		unsigned int port_mask, ddi_select;
> +		u32 port_mask, ddi_select, ddi_mode;
>  		intel_wakeref_t trans_wakeref;
>  
>  		trans_wakeref = intel_display_power_get_if_enabled(dev_priv,
> @@ -842,9 +842,10 @@ static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder,
>  		if ((tmp & port_mask) != ddi_select)
>  			continue;
>  
> -		if ((tmp & TRANS_DDI_MODE_SELECT_MASK) == TRANS_DDI_MODE_SELECT_DP_MST ||
> -		    (HAS_DP20(display) &&
> -		     (tmp & TRANS_DDI_MODE_SELECT_MASK) == TRANS_DDI_MODE_SELECT_FDI_OR_128B132B))
> +		ddi_mode = tmp & TRANS_DDI_MODE_SELECT_MASK;
> +
> +		if (ddi_mode == TRANS_DDI_MODE_SELECT_DP_MST ||
> +		    (ddi_mode == TRANS_DDI_MODE_SELECT_FDI_OR_128B132B && HAS_DP20(display)))

nit: the above condition and the fdi counterpart is used elsewhere too,
so could use a helper. The patchset looks ok regardless:

Reviewed-by: Imre Deak <imre.deak@intel.com>

>  			mst_pipe_mask |= BIT(p);
>  
>  		*pipe_mask |= BIT(p);
> -- 
> 2.39.5
> 

  reply	other threads:[~2024-11-19 11:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 14:48 [PATCH 00/11] drm/i915: MST and DDI cleanups and refactoring Jani Nikula
2024-11-18 14:48 ` [PATCH 01/11] drm/i915/mst: pass intel_dp around in mst stream helpers Jani Nikula
2024-11-18 14:48 ` [PATCH 02/11] drm/i915/mst: unify MST connector function naming to mst_connector_* Jani Nikula
2024-11-18 14:48 ` [PATCH 03/11] drm/i915/mst: simplify mst_connector_get_hw_state() Jani Nikula
2024-11-18 14:48 ` [PATCH 04/11] drm/i915/mst: unify MST topology callback naming to mst_topology_* Jani Nikula
2024-11-18 14:49 ` [PATCH 05/11] drm/i915/ddi: use intel_ddi_* naming convention for encoder enable/disable Jani Nikula
2024-11-18 14:49 ` [PATCH 06/11] drm/i915/reg: convert DP_TP_CTL/DP_TP_STATUS to REG_BIT() and friends Jani Nikula
2024-11-19 11:47   ` Imre Deak
2024-11-19 13:09     ` Jani Nikula
2024-11-19 15:29     ` Jani Nikula
2024-11-19 15:27   ` [PATCH v2] " Jani Nikula
2024-11-18 14:49 ` [PATCH 07/11] drm/i915/dp: refactor clear/wait for act sent Jani Nikula
2024-11-18 14:49 ` [PATCH 08/11] drm/i915/ddi: rename temp to ddi_func_ctl in intel_ddi_read_func_ctl() Jani Nikula
2024-11-18 14:49 ` [PATCH 09/11] drm/i915/ddi: split up intel_ddi_read_func_ctl() by output type Jani Nikula
2024-11-18 14:49 ` [PATCH 10/11] drm/i915/ddi: refactor intel_ddi_connector_get_hw_state() Jani Nikula
2024-11-18 14:49 ` [PATCH 11/11] drm/i915/ddi: simplify intel_ddi_get_encoder_pipes() slightly Jani Nikula
2024-11-19 11:40   ` Imre Deak [this message]
2024-11-19 13:11     ` Jani Nikula
2024-11-20 11:35     ` Jani Nikula
2024-11-18 16:40 ` ✗ Fi.CI.SPARSE: warning for drm/i915: MST and DDI cleanups and refactoring Patchwork
2024-11-18 17:05 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-11-19 12:35 ` ✗ Fi.CI.SPARSE: warning for drm/i915: MST and DDI cleanups and refactoring (rev2) Patchwork
2024-11-19 13:00 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-11-19 15:55 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: MST and DDI cleanups and refactoring (rev3) Patchwork
2024-11-19 15:55 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-11-19 16:16 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-20 12:10 ` [PATCH 00/11] drm/i915: MST and DDI cleanups and refactoring 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=Zzx5IKsm7us1CcBP@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@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