Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dg2: fix snps buf trans for uhbr
Date: Thu, 7 Oct 2021 15:08:40 +0300	[thread overview]
Message-ID: <YV7jSPCIROxnh4HJ@intel.com> (raw)
In-Reply-To: <20211007115629.4531-1-jani.nikula@intel.com>

On Thu, Oct 07, 2021 at 02:56:29PM +0300, Jani Nikula wrote:
> The UHBR check was using > instead of >=. Use the helper instead to
> avoid mistakes. Also always use the non-UHBR values for HDMI.
> 
> Fixes: 2817efaeb608 ("drm/i915/dg2: add SNPS PHY translations for UHBR link rates")
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
> index a2d39131ea53..a87a688d8475 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
> @@ -8,6 +8,7 @@
>  #include "intel_ddi_buf_trans.h"
>  #include "intel_de.h"
>  #include "intel_display_types.h"
> +#include "intel_dp.h"
>  
>  /* HDMI/DVI modes ignore everything but the last 2 items. So we share
>   * them for both DP and FDI transports, allowing those ports to
> @@ -1611,10 +1612,11 @@ dg2_get_snps_buf_trans(struct intel_encoder *encoder,
>  		       const struct intel_crtc_state *crtc_state,
>  		       int *n_entries)
>  {
> -	if (crtc_state->port_clock > 1000000)
> -		return intel_get_buf_trans(&dg2_snps_trans_uhbr, n_entries);
> -	else
> +	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) ||
> +	    !intel_dp_is_uhbr(crtc_state))

Might be more clear flipped around to 'has_dp_encoder && is_uhbr'?

Either way
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  		return intel_get_buf_trans(&dg2_snps_trans, n_entries);
> +	else
> +		return intel_get_buf_trans(&dg2_snps_trans_uhbr, n_entries);
>  }
>  
>  void intel_ddi_buf_trans_init(struct intel_encoder *encoder)
> -- 
> 2.30.2

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-10-07 12:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 11:56 [Intel-gfx] [PATCH] drm/i915/dg2: fix snps buf trans for uhbr Jani Nikula
2021-10-07 12:08 ` Ville Syrjälä [this message]
2021-10-07 12:43   ` Jani Nikula
2021-10-07 12:42 ` [Intel-gfx] [PATCH v2] " Jani Nikula
2021-10-07 14:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dg2: fix snps buf trans for uhbr (rev2) Patchwork
2021-10-07 16:10 ` [Intel-gfx] ✓ 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=YV7jSPCIROxnh4HJ@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@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