All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v28 1/6] drm/i915: Introduce skl_plane_wm_level accessor.
Date: Tue, 12 May 2020 14:35:52 +0300	[thread overview]
Message-ID: <20200512113552.GL6112@intel.com> (raw)
In-Reply-To: <20200507144503.15506-2-stanislav.lisovskiy@intel.com>

On Thu, May 07, 2020 at 05:44:58PM +0300, Stanislav Lisovskiy wrote:
> For future Gen12 SAGV implementation we need to
> seemlessly alter wm levels calculated, depending
> on whether we are allowed to enable SAGV or not.
> 
> So this accessor will give additional flexibility
> to do that.
> 
> Currently this accessor is still simply working
> as "pass-through" function. This will be changed
> in next coming patches from this series.
> 
> v2: - plane_id -> plane->id(Ville Syrjälä)
>     - Moved wm_level var to have more local scope
>       (Ville Syrjälä)
>     - Renamed yuv to color_plane(Ville Syrjälä) in
>       skl_plane_wm_level
> 
> v3: - plane->id -> plane_id(this time for real, Ville Syrjälä)
>     - Changed colorplane id type from boolean to int as index
>       (Ville Syrjälä)
>     - Moved crtc_state param so that it is first now
>       (Ville Syrjälä)
>     - Moved wm_level declaration to tigher scope in
>       skl_write_plane_wm(Ville Syrjälä)
> 
> v4: - Started to use enum values for color plane
>     - Do sizeof for a type what we are memset'ing
>     - Zero out wm_uv as well(Ville Syrjälä)
> 
> v5: - Fixed rebase conflict caused by COLOR_PLANE_*
>       enum removal
> 
> v6: - Do not use skl_plane_wm_level accessor in skl_allocate_pipe_ddb
> 
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 26 ++++++++++++++++++++++++--
>  1 file changed, 24 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 416cb1a1e7cb..8a86298962dc 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4632,6 +4632,18 @@ icl_get_total_relative_data_rate(struct intel_crtc_state *crtc_state,
>  	return total_data_rate;
>  }
>  
> +static const struct skl_wm_level *
> +skl_plane_wm_level(const struct intel_crtc_state *crtc_state,
> +		   enum plane_id plane_id,
> +		   int level,
> +		   int color_plane)
> +{
> +	const struct skl_plane_wm *wm =
> +		&crtc_state->wm.skl.optimal.planes[plane_id];
> +
> +	return color_plane == 0 ? &wm->wm[level] : &wm->uv_wm[level];

uv_wm still not a thing as far as the hw is concerned, so can't see why
we'd have this here.

> +}
> +
>  static int
>  skl_allocate_pipe_ddb(struct intel_crtc_state *crtc_state)
>  {
> @@ -5439,8 +5451,13 @@ void skl_write_plane_wm(struct intel_plane *plane,
>  		&crtc_state->wm.skl.plane_ddb_uv[plane_id];
>  
>  	for (level = 0; level <= max_level; level++) {
> +		const struct skl_wm_level *wm_level;
> +		int color_plane = 0;
> +
> +		wm_level = skl_plane_wm_level(crtc_state, plane_id, level, color_plane);
> +
>  		skl_write_wm_level(dev_priv, PLANE_WM(pipe, plane_id, level),
> -				   &wm->wm[level]);
> +				   wm_level);
>  	}
>  	skl_write_wm_level(dev_priv, PLANE_WM_TRANS(pipe, plane_id),
>  			   &wm->trans_wm);
> @@ -5473,8 +5490,13 @@ void skl_write_cursor_wm(struct intel_plane *plane,
>  		&crtc_state->wm.skl.plane_ddb_y[plane_id];
>  
>  	for (level = 0; level <= max_level; level++) {
> +		const struct skl_wm_level *wm_level;
> +		int color_plane = 0;
> +
> +		wm_level = skl_plane_wm_level(crtc_state, plane_id, level, color_plane);
> +
>  		skl_write_wm_level(dev_priv, CUR_WM(pipe, level),
> -				   &wm->wm[level]);
> +				   wm_level);
>  	}
>  	skl_write_wm_level(dev_priv, CUR_WM_TRANS(pipe), &wm->trans_wm);
>  
> -- 
> 2.24.1.485.gad05a3d8e5

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-05-12 11:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 14:44 [Intel-gfx] [PATCH v28 0/6] SAGV support for Gen12+ Stanislav Lisovskiy
2020-05-07 14:44 ` [Intel-gfx] [PATCH v28 1/6] drm/i915: Introduce skl_plane_wm_level accessor Stanislav Lisovskiy
2020-05-12 11:35   ` Ville Syrjälä [this message]
2020-05-07 14:44 ` [Intel-gfx] [PATCH v28 2/6] drm/i915: Extract skl SAGV checking Stanislav Lisovskiy
2020-05-12 11:47   ` Ville Syrjälä
2020-05-07 14:45 ` [Intel-gfx] [PATCH v28 3/6] drm/i915: Make active_pipes check skl specific Stanislav Lisovskiy
2020-05-12 11:39   ` Ville Syrjälä
2020-05-12 12:44     ` Lisovskiy, Stanislav
2020-05-12 13:03       ` Ville Syrjälä
2020-05-12 13:14       ` Ville Syrjälä
2020-05-12 13:26         ` Lisovskiy, Stanislav
2020-05-12 15:32           ` Ville Syrjälä
2020-05-12 20:36             ` Lisovskiy, Stanislav
2020-05-07 14:45 ` [Intel-gfx] [PATCH v28 4/6] drm/i915: Add TGL+ SAGV support Stanislav Lisovskiy
2020-05-12 12:03   ` Ville Syrjälä
2020-05-12 12:52     ` Lisovskiy, Stanislav
2020-05-12 13:10       ` Ville Syrjälä
2020-05-12 13:17         ` Lisovskiy, Stanislav
2020-05-12 13:38           ` Ville Syrjälä
2020-05-12 13:41             ` Lisovskiy, Stanislav
2020-05-12 13:50               ` Ville Syrjälä
2020-05-12 13:59                 ` Lisovskiy, Stanislav
2020-05-12 14:32                   ` Ville Syrjälä
2020-05-12 15:04                     ` Lisovskiy, Stanislav
2020-05-12 15:14                       ` Ville Syrjälä
2020-05-07 14:45 ` [Intel-gfx] [PATCH v28 5/6] drm/i915: Restrict qgv points which don't have enough bandwidth Stanislav Lisovskiy
2020-05-12 16:02   ` Ville Syrjälä
2020-05-07 14:45 ` [Intel-gfx] [PATCH v28 6/6] drm/i915: Enable SAGV support for Gen12 Stanislav Lisovskiy
2020-05-07 16:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for SAGV support for Gen12+ (rev36) Patchwork
2020-05-07 16:29 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-05-07 20:39 ` [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=20200512113552.GL6112@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stanislav.lisovskiy@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.