All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Simon Ser <contact@emersion.fr>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3] drm/i915: add immutable zpos plane properties
Date: Tue, 16 Apr 2019 16:20:17 +0300	[thread overview]
Message-ID: <20190416132017.GF24299@intel.com> (raw)
In-Reply-To: <YSH9PasoADJJdNJCSdI4m55ankIBsCaoSgkw-NQ5dlruCAxc8J-SQwVl5n3ddSAMDLTdbdyQvkONmtbjkUU-TQk5VIu1p-aZRO1OjjuSxjY=@emersion.fr>

On Sat, Apr 13, 2019 at 11:13:27AM +0000, Simon Ser wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> This adds basic immutable support for the zpos property. The zpos increases
> from bottom to top: primary, sprites, cursor.

I was thinking a bit about how we might go about testing this.

We probably want a basic test that just checks that if any
plane has a zpos prop then all planes should have it.

A functional test would stack the planes up in some way and
compare against a software rendered reference. IIRC there was 
a zpos test case floating around but that depended on alpha
blending which we don't necessarily have.

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> [contact@emersion.fr: adapted for latest drm-tip]
> Signed-off-by: Simon Ser <contact@emersion.fr>
> ---
> 
> Maarten, could your review this patch?
> 
> Changes from v2 to v3: add the zpos property in skl_universal_plane_create too.
> 
>  drivers/gpu/drm/i915/intel_display.c | 10 ++++++++--
>  drivers/gpu/drm/i915/intel_sprite.c  |  7 ++++++-
>  2 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 8576a7f799..f0a85a75bd 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14323,7 +14323,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
>  	const u64 *modifiers;
>  	const u32 *formats;
>  	int num_formats;
> -	int ret;
> +	int ret, zpos;
>  
>  	if (INTEL_GEN(dev_priv) >= 9)
>  		return skl_universal_plane_create(dev_priv, pipe,
> @@ -14412,6 +14412,9 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
>  						   DRM_MODE_ROTATE_0,
>  						   supported_rotations);
>  
> +	zpos = 0;
> +	drm_plane_create_zpos_immutable_property(&plane->base, zpos);
> +
>  	drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
>  
>  	return plane;
> @@ -14428,7 +14431,7 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
>  {
>  	unsigned int possible_crtcs;
>  	struct intel_plane *cursor;
> -	int ret;
> +	int ret, zpos;
>  
>  	cursor = intel_plane_alloc();
>  	if (IS_ERR(cursor))
> @@ -14477,6 +14480,9 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
>  						   DRM_MODE_ROTATE_0 |
>  						   DRM_MODE_ROTATE_180);
>  
> +	zpos = RUNTIME_INFO(dev_priv)->num_sprites[pipe] + 1;
> +	drm_plane_create_zpos_immutable_property(&cursor->base, zpos);
> +
>  	drm_plane_helper_add(&cursor->base, &intel_plane_helper_funcs);
>  
>  	return cursor;
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 65de7387bf..40b7bcd720 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -2333,6 +2333,8 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
>  					     BIT(DRM_MODE_BLEND_PREMULTI) |
>  					     BIT(DRM_MODE_BLEND_COVERAGE));
>  
> +	drm_plane_create_zpos_immutable_property(&plane->base, plane_id);
> +
>  	drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
>  
>  	return plane;
> @@ -2354,7 +2356,7 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
>  	const u64 *modifiers;
>  	const u32 *formats;
>  	int num_formats;
> -	int ret;
> +	int ret, zpos;
>  
>  	if (INTEL_GEN(dev_priv) >= 9)
>  		return skl_universal_plane_create(dev_priv, pipe,
> @@ -2444,6 +2446,9 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
>  					  DRM_COLOR_YCBCR_BT709,
>  					  DRM_COLOR_YCBCR_LIMITED_RANGE);
>  
> +	zpos = sprite + 1;
> +	drm_plane_create_zpos_immutable_property(&plane->base, zpos);
> +
>  	drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
>  
>  	return plane;
> -- 
> 2.21.0
> 

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

  parent reply	other threads:[~2019-04-16 13:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 22:19 [PATCH] drm/i915: add immutable zpos plane properties Simon Ser
2019-03-30  0:11 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-03-30  0:37 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-04-02  7:49 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-02 11:34 ` ✓ Fi.CI.IGT: " Patchwork
2019-04-02 12:35 ` [PATCH] " Joonas Lahtinen
2019-04-02 14:36   ` Simon Ser
2019-04-03  8:28     ` Joonas Lahtinen
2019-04-03 16:21 ` [PATCH v2] " Simon Ser
2019-04-09 18:49   ` Simon Ser
2019-04-13 11:13   ` [PATCH v3] " Simon Ser
2019-04-15 20:33     ` Maarten Lankhorst
2019-04-16 13:20     ` Ville Syrjälä [this message]
2019-04-16 13:28       ` Maarten Lankhorst
2019-04-16 13:42         ` Ville Syrjälä
2019-04-16 18:13           ` Maarten Lankhorst
2019-04-16 19:04             ` Ville Syrjälä
2019-04-17 20:35               ` Simon Ser
2019-04-18  5:20                 ` Simon Ser
2019-04-19 17:10                   ` Simon Ser
2019-04-03 18:08 ` ✓ Fi.CI.BAT: success for drm/i915: add immutable zpos plane properties (rev2) Patchwork
2019-04-04 12:39 ` ✓ Fi.CI.IGT: " Patchwork
2019-04-04 12:44 ` Patchwork
2019-04-13 11:57 ` ✓ Fi.CI.BAT: success for drm/i915: add immutable zpos plane properties (rev3) Patchwork
2019-04-13 13:52 ` ✓ 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=20190416132017.GF24299@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=contact@emersion.fr \
    --cc=intel-gfx@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.