All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 1/4] drm/i915: Rename for_each_plane -> for_each_universal_plane
Date: Fri, 28 Oct 2016 16:15:01 -0200	[thread overview]
Message-ID: <1477678501.19886.133.camel@intel.com> (raw)
In-Reply-To: <1477522291-10874-2-git-send-email-matthew.d.roper@intel.com>

Em Qua, 2016-10-26 às 15:51 -0700, Matt Roper escreveu:
> This macro's name is a bit misleading; it doesn't actually iterate
> over
> all planes since it omits the cursor plane.  Its only uses are in
> gen9
> code which is using it to iterate over the universal planes (which we
> treat as primary+sprites); in these cases the legacy cursor registers
> are programmed independently if necessary.  The macro's iterator
> value
> (0 for primary plane, spritenum+1 for each secondary plane) also
> isn't
> meaningful outside the gen9 context where the hardware considers them
> to
> all be "universal" planes that follow this numbering.
> 
> This is just a renaming/clarification patch with no functional
> change.
> However it will make the subsequent patches more clear.

I really like the rename. Also, this seems to apply even on top of
Maarten's series. IMHO we should merge this soon, before patch 3 reach
its final form.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>


> 
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c  | 2 +-
>  drivers/gpu/drm/i915/i915_drv.h      | 2 +-
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  drivers/gpu/drm/i915/intel_pm.c      | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c
> b/drivers/gpu/drm/i915/i915_debugfs.c
> index be92efe..9f5a392 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -3463,7 +3463,7 @@ static int i915_ddb_info(struct seq_file *m,
> void *unused)
>  	for_each_pipe(dev_priv, pipe) {
>  		seq_printf(m, "Pipe %c\n", pipe_name(pipe));
>  
> -		for_each_plane(dev_priv, pipe, plane) {
> +		for_each_universal_plane(dev_priv, pipe, plane) {
>  			entry = &ddb->plane[pipe][plane];
>  			seq_printf(m, "  Plane%-8d%8u%8u%8u\n",
> plane + 1,
>  				   entry->start, entry->end,
> diff --git a/drivers/gpu/drm/i915/i915_drv.h
> b/drivers/gpu/drm/i915/i915_drv.h
> index 55afb66..4714051 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -312,7 +312,7 @@ struct i915_hotplug {
>  #define for_each_pipe_masked(__dev_priv, __p, __mask) \
>  	for ((__p) = 0; (__p) < INTEL_INFO(__dev_priv)->num_pipes;
> (__p)++) \
>  		for_each_if ((__mask) & (1 << (__p)))
> -#define for_each_plane(__dev_priv, __pipe, __p)			
> 	\
> +#define for_each_universal_plane(__dev_priv, __pipe, __p)		
> \
>  	for ((__p) = 0;						
> 	\
>  	     (__p) < INTEL_INFO(__dev_priv)->num_sprites[(__pipe)] +
> 1;	\
>  	     (__p)++)
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 895b3dc..cb7dd11 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13485,7 +13485,7 @@ static void verify_wm_state(struct drm_crtc
> *crtc,
>  	sw_ddb = &dev_priv->wm.skl_hw.ddb;
>  
>  	/* planes */
> -	for_each_plane(dev_priv, pipe, plane) {
> +	for_each_universal_plane(dev_priv, pipe, plane) {
>  		hw_plane_wm = &hw_wm.planes[plane];
>  		sw_plane_wm = &sw_wm->planes[plane];
>  
> diff --git a/drivers/gpu/drm/i915/intel_pm.c
> b/drivers/gpu/drm/i915/intel_pm.c
> index 9e0e874..58d3ba0 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3160,7 +3160,7 @@ void skl_ddb_get_hw_state(struct
> drm_i915_private *dev_priv,
>  		if (!intel_display_power_get_if_enabled(dev_priv,
> power_domain))
>  			continue;
>  
> -		for_each_plane(dev_priv, pipe, plane) {
> +		for_each_universal_plane(dev_priv, pipe, plane) {
>  			val = I915_READ(PLANE_BUF_CFG(pipe, plane));
>  			skl_ddb_entry_init_from_hw(&ddb-
> >plane[pipe][plane],
>  						   val);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-28 18:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 22:51 [RFC 0/4] Wire gen9 cursor interface to universal plane registers Matt Roper
2016-10-26 22:51 ` [RFC 1/4] drm/i915: Rename for_each_plane -> for_each_universal_plane Matt Roper
2016-10-28 18:15   ` Paulo Zanoni [this message]
2016-10-26 22:51 ` [RFC 2/4] drm/i915: Use macro in place of open-coded for_each_universal_plane loop Matt Roper
2016-10-28 18:17   ` Paulo Zanoni
2016-10-28 18:30     ` Matt Roper
2016-10-26 22:51 ` [RFC 3/4] drm/i915/gen9: Expose top-most universal plane as cursor Matt Roper
2016-10-27 20:03   ` Paulo Zanoni
2016-10-27 21:11     ` Matt Roper
2016-10-27 22:15   ` Lyude Paul
2016-10-27 22:35     ` Matt Roper
2016-10-27 22:55       ` Lyude Paul
2016-10-26 22:51 ` [RFC 4/4] drm/i915/gen9: Skip debugfs cursor output for universal plane platforms Matt Roper
2016-10-26 23:16 ` ✓ Fi.CI.BAT: success for Wire gen9 cursor interface to universal plane registers Patchwork
2016-10-27  0:15 ` [RFC 0/4] " Chris Wilson
2016-10-27  0:30   ` Matt Roper
2016-10-27  7:35     ` Daniel Vetter

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=1477678501.19886.133.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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.