All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 2/3] drm/i915/display: Use display-specific platform checks in intel_bw.c
Date: Mon, 17 Feb 2025 19:49:08 +0200	[thread overview]
Message-ID: <Z7N2lPPy7hzih3DK@intel.com> (raw)
In-Reply-To: <20250217153550.43909-3-gustavo.sousa@intel.com>

On Mon, Feb 17, 2025 at 12:35:24PM -0300, Gustavo Sousa wrote:
> Add one step further into making intel_bw.c xe/i915 agnostic by using
> display-specific platform checks.
> 
> v2:
>   - Fix typo that resulted in converting IS_DG1(display) to
>     display->platform.dg2.
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bw.c | 77 ++++++++++++++-----------
>  1 file changed, 43 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
> index 0fb41e6cd8ae..51b82979a8e4 100644
> --- a/drivers/gpu/drm/i915/display/intel_bw.c
> +++ b/drivers/gpu/drm/i915/display/intel_bw.c
> @@ -78,6 +78,7 @@ static int icl_pcode_read_qgv_point_info(struct drm_i915_private *dev_priv,
>  					 struct intel_qgv_point *sp,
>  					 int point)
>  {
> +	struct intel_display *display = &dev_priv->display;
>  	u32 val = 0, val2 = 0;
>  	u16 dclk;
>  	int ret;
> @@ -89,7 +90,7 @@ static int icl_pcode_read_qgv_point_info(struct drm_i915_private *dev_priv,
>  		return ret;
>  
>  	dclk = val & 0xffff;
> -	sp->dclk = DIV_ROUND_UP((16667 * dclk) + (DISPLAY_VER(dev_priv) >= 12 ? 500 : 0),
> +	sp->dclk = DIV_ROUND_UP((16667 * dclk) + (DISPLAY_VER(display) >= 12 ? 500 : 0),

Side note: could you (or someone) fix up this botched rounding stuff?

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-02-17 17:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17 15:35 [PATCH v2 0/3] drm/i915/xe3lpd: Update bandwidth parameters Gustavo Sousa
2025-02-17 15:35 ` [PATCH v2 1/3] drm/i915/display: Use display variable in intel_bw.c Gustavo Sousa
2025-02-17 17:44   ` Ville Syrjälä
2025-02-17 20:05     ` Gustavo Sousa
2025-02-21 12:15       ` Vodapalli, Ravi Kumar
2025-02-17 15:35 ` [PATCH v2 2/3] drm/i915/display: Use display-specific platform checks " Gustavo Sousa
2025-02-17 17:49   ` Ville Syrjälä [this message]
2025-02-17 18:03     ` Ville Syrjälä
2025-02-17 15:35 ` [PATCH v2 3/3] drm/i915/xe3lpd: Update bandwidth parameters Gustavo Sousa
2025-02-26 22:33   ` Matt Roper
2025-02-17 16:21 ` ✓ CI.Patch_applied: success for drm/i915/xe3lpd: Update bandwidth parameters (rev2) Patchwork
2025-02-17 16:21 ` ✓ CI.checkpatch: " Patchwork
2025-02-17 16:22 ` ✓ CI.KUnit: " Patchwork
2025-02-17 16:39 ` ✓ CI.Build: " Patchwork
2025-02-17 16:41 ` ✓ CI.Hooks: " Patchwork
2025-02-17 16:42 ` ✓ CI.checksparse: " Patchwork
2025-02-17 17:33 ` ✓ i915.CI.BAT: " Patchwork
2025-02-17 21:32 ` ✗ i915.CI.Full: failure " Patchwork
2025-02-18  7:16 ` ✓ Xe.CI.BAT: success " 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=Z7N2lPPy7hzih3DK@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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.