All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Michał Grzelak" <michal.grzelak@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: "Michał Grzelak" <michal.grzelak@intel.com>
Subject: Re: [RFC v1 06/11] drm/i915/buf_trans: add intel_edp_above_hbr2() helper
Date: Wed, 11 Mar 2026 11:19:11 +0200	[thread overview]
Message-ID: <c42e2f2d486b94b23e473f8bc15eef3502ea93b4@intel.com> (raw)
In-Reply-To: <20260308132446.3320848-7-michal.grzelak@intel.com>

On Sun, 08 Mar 2026, Michał Grzelak <michal.grzelak@intel.com> wrote:
> Check if port_clock is above HBR2 inside separate function.

Same as the previous patch.

>
> Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
> ---
>  .../drm/i915/display/intel_ddi_buf_trans.c    | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 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 ee6a78a20dac..8b369535189c 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
> @@ -1191,6 +1191,13 @@ static bool intel_dp_above_hbr1(const struct intel_crtc_state *crtc_state)
>  	return false;
>  }
>  
> +static bool intel_edp_above_hbr2(const struct intel_crtc_state *crtc_state)

This doesn't have anything to do with "edp" specifically.

> +{
> +	if (crtc_state->port_clock > 540000)
> +		return true;
> +	return false;

Side note, this is just "return crtc_state->port_clock > 540000"
directly, if-else for returning true/false is unnecessary.

BR,
Jani.

> +}
> +
>  static bool use_edp_hobl(struct intel_encoder *encoder)
>  {
>  	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> @@ -1374,7 +1381,7 @@ icl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
>  			    const struct intel_crtc_state *crtc_state,
>  			    int *n_entries)
>  {
> -	if (crtc_state->port_clock > 540000) {
> +	if (intel_edp_above_hbr2(crtc_state)) {
>  		return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
>  					   n_entries);
>  	} else if (use_edp_low_vswing(encoder)) {
> @@ -1499,7 +1506,7 @@ tgl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
>  			    const struct intel_crtc_state *crtc_state,
>  			    int *n_entries)
>  {
> -	if (crtc_state->port_clock > 540000) {
> +	if (intel_edp_above_hbr2(crtc_state)) {
>  		return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
>  					   n_entries);
>  	} else if (use_edp_hobl(encoder)) {
> @@ -1544,7 +1551,7 @@ dg1_get_combo_buf_trans_edp(struct intel_encoder *encoder,
>  			    const struct intel_crtc_state *crtc_state,
>  			    int *n_entries)
>  {
> -	if (crtc_state->port_clock > 540000)
> +	if (intel_edp_above_hbr2(crtc_state))
>  		return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
>  					   n_entries);
>  	else if (use_edp_hobl(encoder))
> @@ -1586,7 +1593,7 @@ rkl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
>  			    const struct intel_crtc_state *crtc_state,
>  			    int *n_entries)
>  {
> -	if (crtc_state->port_clock > 540000) {
> +	if (intel_edp_above_hbr2(crtc_state)) {
>  		return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
>  					   n_entries);
>  	} else if (use_edp_hobl(encoder)) {
> @@ -1629,7 +1636,7 @@ adls_get_combo_buf_trans_edp(struct intel_encoder *encoder,
>  			     const struct intel_crtc_state *crtc_state,
>  			     int *n_entries)
>  {
> -	if (crtc_state->port_clock > 540000)
> +	if (intel_edp_above_hbr2(crtc_state))
>  		return intel_get_buf_trans(&adls_combo_phy_trans_edp_hbr3, n_entries);
>  	else if (use_edp_hobl(encoder))
>  		return intel_get_buf_trans(&tgl_combo_phy_trans_edp_hbr2_hobl, n_entries);
> @@ -1668,7 +1675,7 @@ adlp_get_combo_buf_trans_edp(struct intel_encoder *encoder,
>  			     const struct intel_crtc_state *crtc_state,
>  			     int *n_entries)
>  {
> -	if (crtc_state->port_clock > 540000) {
> +	if (intel_edp_above_hbr2(crtc_state)) {
>  		return intel_get_buf_trans(&adlp_combo_phy_trans_edp_hbr3,
>  					   n_entries);
>  	} else if (use_edp_hobl(encoder)) {

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-03-11  9:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-08 13:24 [RFC v1 00/11] support for vswing/preemphasis override Michał Grzelak
2026-03-08 13:24 ` [RFC v1 01/11] drm/i915/bios: search for Block 57 by default Michał Grzelak
2026-03-08 13:24 ` [RFC v1 02/11] drm/i915/bios: cache V/P Override block Michał Grzelak
2026-03-08 13:24 ` [RFC v1 03/11] drm/i915/bios: remove V/P Override warning Michał Grzelak
2026-03-08 13:24 ` [RFC v1 04/11] drm/i915/bios: print V/P Override port info Michał Grzelak
2026-03-08 13:24 ` [RFC v1 05/11] drm/i915/buf_trans: add intel_dp_above_hbr1() helper Michał Grzelak
2026-03-11  9:17   ` Jani Nikula
2026-03-08 13:24 ` [RFC v1 06/11] drm/i915/buf_trans: add intel_edp_above_hbr2() helper Michał Grzelak
2026-03-11  9:19   ` Jani Nikula [this message]
2026-03-08 13:24 ` [RFC v1 07/11] drm/i915/lt: align xe3plpd with V/P Override layout Michał Grzelak
2026-03-08 13:24 ` [RFC v1 08/11] drm/i915/buf_trans: switch from u8 to u32 Michał Grzelak
2026-03-08 13:24 ` [RFC v1 09/11] drm/i915/xe3p: add V/P Override support for xe3p Michał Grzelak
2026-03-09  0:11   ` kernel test robot
2026-03-10  8:40   ` kernel test robot
2026-03-08 13:24 ` [RFC v1 10/11] drm/i915/dg2: warn on V/P Override request on dg2 Michał Grzelak
2026-03-08 13:24 ` [RFC v1 11/11] drm/i915/mtl: add V/P Override support for mtl+ Michał Grzelak
2026-03-11  9:51   ` Jani Nikula
2026-03-08 13:31 ` ✗ CI.checkpatch: warning for support for vswing/preemphasis override Patchwork
2026-03-08 13:33 ` ✓ CI.KUnit: success " Patchwork
2026-03-08 14:08 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-08 14:19 ` ✓ i915.CI.BAT: " Patchwork
2026-03-08 15:06 ` ✓ Xe.CI.FULL: " Patchwork
2026-03-08 16:09 ` ✗ i915.CI.Full: failure " 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=c42e2f2d486b94b23e473f8bc15eef3502ea93b4@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.grzelak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.