public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 07/10] drm/i915/skl: Don't advertize ARGB2101010 and ABGR2101010
Date: Tue, 12 May 2015 19:29:40 +0300	[thread overview]
Message-ID: <20150512162940.GJ18908@intel.com> (raw)
In-Reply-To: <1431443602-22886-8-git-send-email-damien.lespiau@intel.com>

On Tue, May 12, 2015 at 04:13:19PM +0100, Damien Lespiau wrote:
> While we have been historically exposing those formats, but the hardware
> doesn't do anything with the alpha bits. The DDX doesn't seem to
> particularly care about those formats either, so just expose the
> XRGB/XBGR variants.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 8adf3bf..13efade 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -70,6 +70,15 @@ static const uint32_t gen4_primary_formats[] = {
>  	DRM_FORMAT_ABGR2101010,
>  };
>  
> +
> +static const uint32_t skl_primary_formats[] = {
> +	COMMON_PRIMARY_FORMATS, \

Please kill COMMON_PRIMARY_FORMATS. It's making it hard to figure out
which formats are actually listed here.

> +	DRM_FORMAT_XBGR8888,
> +	DRM_FORMAT_ABGR8888,
> +	DRM_FORMAT_XRGB2101010,
> +	DRM_FORMAT_XBGR2101010,
> +};
> +
>  /* Cursor formats */
>  static const uint32_t intel_cursor_formats[] = {
>  	DRM_FORMAT_ARGB8888,
> @@ -13287,12 +13296,15 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
>  	if (HAS_FBC(dev) && INTEL_INFO(dev)->gen < 4)
>  		primary->plane = !pipe;
>  
> -	if (INTEL_INFO(dev)->gen <= 3) {
> -		intel_primary_formats = gen2_primary_formats;
> -		num_formats = ARRAY_SIZE(gen2_primary_formats);
> -	} else {
> +	if (INTEL_INFO(dev)->gen >= 9) {
> +		intel_primary_formats = skl_primary_formats;
> +		num_formats = ARRAY_SIZE(skl_primary_formats);
> +	} else if (INTEL_INFO(dev)->gen >= 4) {
>  		intel_primary_formats = gen4_primary_formats;
>  		num_formats = ARRAY_SIZE(gen4_primary_formats);
> +	} else {
> +		intel_primary_formats = gen2_primary_formats;
> +		num_formats = ARRAY_SIZE(gen2_primary_formats);
>  	}
>  
>  	drm_universal_plane_init(dev, &primary->base, 0,
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  parent reply	other threads:[~2015-05-12 16:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 15:13 [PATCH 00/10] Expose the same formats for SKL primary/sprite planes Damien Lespiau
2015-05-12 15:13 ` [PATCH 01/10] drm/i915/skl: Leave a new line between variable declarations and code Damien Lespiau
2015-05-14  5:19   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 02/10] drm/i915/skl: Add a new line before return Damien Lespiau
2015-05-14  5:20   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 03/10] drm/i915/skl: Rename a local variable to fit in 80 chars Damien Lespiau
2015-05-12 16:20   ` Ville Syrjälä
2015-05-14  5:20   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 04/10] drm/i915/skl: Replace BUG() by MISSING_CASE() in skl_plane_ctl_format() Damien Lespiau
2015-05-14  5:24   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 05/10] drm/i915/skl: Support the advertized index format Damien Lespiau
2015-05-14  5:24   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 06/10] drm/i915: Don't use the intel_ prefix for gen-specific data Damien Lespiau
2015-05-12 16:04   ` Daniel Vetter
2015-05-12 16:09     ` Daniel Vetter
2015-05-12 15:13 ` [PATCH 07/10] drm/i915/skl: Don't advertize ARGB2101010 and ABGR2101010 Damien Lespiau
2015-05-12 16:13   ` Daniel Vetter
2015-05-12 16:18     ` Damien Lespiau
2015-05-12 16:48       ` Daniel Vetter
2015-05-12 16:29   ` Ville Syrjälä [this message]
2015-05-12 15:13 ` [PATCH 08/10] drm/i915/skl: Make primary and sprite plane advertize the same formats Damien Lespiau
2015-05-12 16:14   ` Daniel Vetter
2015-05-12 16:33   ` Ville Syrjälä
2015-05-12 15:13 ` [PATCH 09/10] drm/i915/skl: Factor skl_plane_get_formats() Damien Lespiau
2015-05-12 15:13 ` [PATCH 10/10] drm/i915: Make the sprite formats const Damien Lespiau
2015-05-12 16:14   ` 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=20150512162940.GJ18908@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=damien.lespiau@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox