public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 08/15] drm/i915/display: convert HAS_MBUS_JOINING() to struct intel_display
Date: Wed, 6 Nov 2024 12:04:56 -0500	[thread overview]
Message-ID: <ZyuhuH9NaHex8YyH@intel.com> (raw)
In-Reply-To: <754f1d16612082ef48e7e33b1240418549ed1407.1730740629.git.jani.nikula@intel.com>

On Mon, Nov 04, 2024 at 07:19:22PM +0200, Jani Nikula wrote:
> Convert HAS_MBUS_JOINING() to struct intel_display. Do minimal drive-by
> conversions to struct intel_display in the callers while at it.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  .../drm/i915/display/intel_display_device.h    |  2 +-
>  drivers/gpu/drm/i915/display/skl_watermark.c   | 18 ++++++++++--------
>  2 files changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
> index b85b1d3ff708..a0fed40b7779 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -167,7 +167,7 @@ struct intel_display_platforms {
>  #define HAS_IPS(__display)		((__display)->platform.haswell_ult || (__display)->platform.broadwell)
>  #define HAS_LRR(i915)			(DISPLAY_VER(i915) >= 12)
>  #define HAS_LSPCON(i915)		(IS_DISPLAY_VER(i915, 9, 10))
> -#define HAS_MBUS_JOINING(i915)		(IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14)
> +#define HAS_MBUS_JOINING(__display)	((__display)->platform.alderlake_p || DISPLAY_VER(__display) >= 14)
>  #define HAS_MSO(i915)			(DISPLAY_VER(i915) >= 12)
>  #define HAS_OVERLAY(i915)		(DISPLAY_INFO(i915)->has_overlay)
>  #define HAS_PSR(i915)			(DISPLAY_INFO(i915)->has_psr)
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> index 3b0e87edbacf..83e2cbbfcaf0 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -2496,6 +2496,7 @@ static u8 intel_dbuf_enabled_slices(const struct intel_dbuf_state *dbuf_state)
>  static int
>  skl_compute_ddb(struct intel_atomic_state *state)
>  {
> +	struct intel_display *display = to_intel_display(state);
>  	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	const struct intel_dbuf_state *old_dbuf_state;
>  	struct intel_dbuf_state *new_dbuf_state = NULL;
> @@ -2524,7 +2525,7 @@ skl_compute_ddb(struct intel_atomic_state *state)
>  			return ret;
>  	}
>  
> -	if (HAS_MBUS_JOINING(i915)) {
> +	if (HAS_MBUS_JOINING(display)) {
>  		new_dbuf_state->joined_mbus =
>  			adlp_check_mbus_joined(new_dbuf_state->active_pipes);
>  
> @@ -2984,7 +2985,7 @@ static void skl_wm_get_hw_state(struct drm_i915_private *i915)
>  		to_intel_dbuf_state(i915->display.dbuf.obj.state);
>  	struct intel_crtc *crtc;
>  
> -	if (HAS_MBUS_JOINING(i915))
> +	if (HAS_MBUS_JOINING(display))
>  		dbuf_state->joined_mbus = intel_de_read(i915, MBUS_CTL) & MBUS_JOIN;
>  
>  	dbuf_state->mdclk_cdclk_ratio = intel_mdclk_cdclk_ratio(display, &display->cdclk.hw);
> @@ -3562,23 +3563,24 @@ int intel_dbuf_state_set_mdclk_cdclk_ratio(struct intel_atomic_state *state,
>  void intel_dbuf_mdclk_cdclk_ratio_update(struct drm_i915_private *i915,
>  					 int ratio, bool joined_mbus)
>  {
> +	struct intel_display *display = &i915->display;
>  	enum dbuf_slice slice;
>  
> -	if (!HAS_MBUS_JOINING(i915))
> +	if (!HAS_MBUS_JOINING(display))
>  		return;
>  
> -	if (DISPLAY_VER(i915) >= 20)
> -		intel_de_rmw(i915, MBUS_CTL, MBUS_TRANSLATION_THROTTLE_MIN_MASK,
> +	if (DISPLAY_VER(display) >= 20)
> +		intel_de_rmw(display, MBUS_CTL, MBUS_TRANSLATION_THROTTLE_MIN_MASK,
>  			     MBUS_TRANSLATION_THROTTLE_MIN(ratio - 1));
>  
>  	if (joined_mbus)
>  		ratio *= 2;
>  
> -	drm_dbg_kms(&i915->drm, "Updating dbuf ratio to %d (mbus joined: %s)\n",
> +	drm_dbg_kms(display->drm, "Updating dbuf ratio to %d (mbus joined: %s)\n",
>  		    ratio, str_yes_no(joined_mbus));
>  
> -	for_each_dbuf_slice(i915, slice)
> -		intel_de_rmw(i915, DBUF_CTL_S(slice),
> +	for_each_dbuf_slice(display, slice)
> +		intel_de_rmw(display, DBUF_CTL_S(slice),
>  			     DBUF_MIN_TRACKER_STATE_SERVICE_MASK,
>  			     DBUF_MIN_TRACKER_STATE_SERVICE(ratio - 1));
>  }
> -- 
> 2.39.5
> 

  parent reply	other threads:[~2024-11-06 17:07 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04 17:19 [PATCH 00/15] drm/i915/display: convert display feature helpers to struct intel_display Jani Nikula
2024-11-04 17:19 ` [PATCH 01/15] drm/i915/display: identify discrete graphics Jani Nikula
2024-11-06 16:43   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 02/15] drm/i915/display: convert HAS_D12_PLANE_MINIMIZATION() to struct intel_display Jani Nikula
2024-11-06  8:58   ` Govindapillai, Vinod
2024-11-06  9:07     ` Jani Nikula
2024-11-06 16:44   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 03/15] drm/i915/display: convert HAS_4TILE() " Jani Nikula
2024-11-06  9:11   ` Govindapillai, Vinod
2024-11-06 16:45   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 04/15] drm/i915/display: convert HAS_DOUBLE_BUFFERED_M_N() " Jani Nikula
2024-11-06  9:17   ` Govindapillai, Vinod
2024-11-06 16:46   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 05/15] drm/i915/display: convert HAS_DP20() " Jani Nikula
2024-11-06 10:19   ` Govindapillai, Vinod
2024-11-06 16:47   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 06/15] drm/i915/display: convert HAS_GMBUS_BURST_READ() " Jani Nikula
2024-11-06 10:21   ` Govindapillai, Vinod
2024-11-06 17:03   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 07/15] drm/i915/display: convert HAS_IPS() " Jani Nikula
2024-11-06 10:24   ` Govindapillai, Vinod
2024-11-06 17:04   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 08/15] drm/i915/display: convert HAS_MBUS_JOINING() " Jani Nikula
2024-11-06 10:27   ` Govindapillai, Vinod
2024-11-06 17:04   ` Rodrigo Vivi [this message]
2024-11-04 17:19 ` [PATCH 09/15] drm/i915/display: convert HAS_SAGV() " Jani Nikula
2024-11-06 10:38   ` Govindapillai, Vinod
2024-11-06 17:06   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 10/15] drm/i915/display: convert HAS_HW_SAGV_WM() " Jani Nikula
2024-11-06 10:44   ` Govindapillai, Vinod
2024-11-06 17:08   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 11/15] drm/i915/display: convert HAS_ULTRAJOINER() " Jani Nikula
2024-11-06 10:55   ` Govindapillai, Vinod
2024-11-06 17:09   ` Rodrigo Vivi
2024-11-04 17:19 ` [PATCH 12/15] drm/i915/display: rename i915 parameter to __display in feature helpers Jani Nikula
2024-11-06 11:50   ` Govindapillai, Vinod
2024-11-04 17:19 ` [PATCH 13/15] drm/i915/display: convert display device identification to struct intel_display Jani Nikula
2024-11-05 10:17   ` [PATCH v2] " Jani Nikula
2024-11-06 13:03     ` Govindapillai, Vinod
2024-11-04 17:19 ` [PATCH 14/15] drm/i915/display: pass struct pci_dev * to intel_display_device_probe() Jani Nikula
2024-11-06 13:10   ` Govindapillai, Vinod
2024-11-04 17:19 ` [PATCH 15/15] drm/i915/display: add mobile platform group Jani Nikula
2024-11-05 18:53   ` kernel test robot
2024-11-06  9:27   ` [PATCH v2] " Jani Nikula
2024-11-06 15:44     ` Govindapillai, Vinod
2024-11-06 16:40   ` [PATCH 15/15] " Rodrigo Vivi
2024-11-07 10:32     ` Jani Nikula
2024-11-07 18:10       ` Rodrigo Vivi
2024-11-04 17:51 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: convert display feature helpers to struct intel_display Patchwork
2024-11-04 17:51 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-11-04 18:43 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-11-05 11:15 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: convert display feature helpers to struct intel_display (rev2) Patchwork
2024-11-05 11:15 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-11-05 12:27 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-06 10:01 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: convert display feature helpers to struct intel_display (rev3) Patchwork
2024-11-06 10:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-11-06 10:17 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-06 12:33 ` ✗ Fi.CI.IGT: 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=ZyuhuH9NaHex8YyH@intel.com \
    --to=rodrigo.vivi@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