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 2/4] drm/i915: Remove ARBG/ABGR 2101010 on platform not supporting those formats
Date: Fri, 15 May 2015 21:44:03 +0300	[thread overview]
Message-ID: <20150515184403.GY18908@intel.com> (raw)
In-Reply-To: <1431713163-23900-3-git-send-email-damien.lespiau@intel.com>

On Fri, May 15, 2015 at 07:06:01PM +0100, Damien Lespiau wrote:
> We just have have VLV and CHV sprites programming the hardware
> differently for the ABGR2101010 so keep them working.

Right. We'd need to update the primary plane programming for VLV/CHV
(and potentially gen4 sprite C) to support it properly. In the meantime
dropping it seems like a good idea. The rest of the platforms definitely
don't list it as a supported format.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 17 +++++++----------
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b7e9ae3..5ebac76 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -64,9 +64,7 @@ static const uint32_t i965_primary_formats[] = {
>  	DRM_FORMAT_ARGB8888,
>  	DRM_FORMAT_ABGR8888,
>  	DRM_FORMAT_XRGB2101010,
> -	DRM_FORMAT_ARGB2101010,
>  	DRM_FORMAT_XBGR2101010,
> -	DRM_FORMAT_ABGR2101010,
>  };
>  
>  /* Cursor formats */
> @@ -2716,11 +2714,9 @@ static void i9xx_update_primary_plane(struct drm_crtc *crtc,
>  		dspcntr |= DISPPLANE_RGBX888;
>  		break;
>  	case DRM_FORMAT_XRGB2101010:
> -	case DRM_FORMAT_ARGB2101010:
>  		dspcntr |= DISPPLANE_BGRX101010;
>  		break;
>  	case DRM_FORMAT_XBGR2101010:
> -	case DRM_FORMAT_ABGR2101010:
>  		dspcntr |= DISPPLANE_RGBX101010;
>  		break;
>  	default:
> @@ -2824,11 +2820,9 @@ static void ironlake_update_primary_plane(struct drm_crtc *crtc,
>  		dspcntr |= DISPPLANE_RGBX888;
>  		break;
>  	case DRM_FORMAT_XRGB2101010:
> -	case DRM_FORMAT_ARGB2101010:
>  		dspcntr |= DISPPLANE_BGRX101010;
>  		break;
>  	case DRM_FORMAT_XBGR2101010:
> -	case DRM_FORMAT_ABGR2101010:
>  		dspcntr |= DISPPLANE_RGBX101010;
>  		break;
>  	default:
> @@ -4542,9 +4536,7 @@ skl_update_scaler_users(
>  		case DRM_FORMAT_ABGR8888:
>  		case DRM_FORMAT_ARGB8888:
>  		case DRM_FORMAT_XRGB2101010:
> -		case DRM_FORMAT_ARGB2101010:
>  		case DRM_FORMAT_XBGR2101010:
> -		case DRM_FORMAT_ABGR2101010:
>  		case DRM_FORMAT_YUYV:
>  		case DRM_FORMAT_YVYU:
>  		case DRM_FORMAT_UYVY:
> @@ -13982,15 +13974,20 @@ static int intel_framebuffer_init(struct drm_device *dev,
>  	case DRM_FORMAT_XBGR8888:
>  	case DRM_FORMAT_ABGR8888:
>  	case DRM_FORMAT_XRGB2101010:
> -	case DRM_FORMAT_ARGB2101010:
>  	case DRM_FORMAT_XBGR2101010:
> -	case DRM_FORMAT_ABGR2101010:
>  		if (INTEL_INFO(dev)->gen < 4) {
>  			DRM_DEBUG("unsupported pixel format: %s\n",
>  				  drm_get_format_name(mode_cmd->pixel_format));
>  			return -EINVAL;
>  		}
>  		break;
> +	case DRM_FORMAT_ABGR2101010:
> +		if (!IS_VALLEYVIEW(dev)) {
> +			DRM_DEBUG("unsupported pixel format: %s\n",
> +				  drm_get_format_name(mode_cmd->pixel_format));
> +			return -EINVAL;
> +		}
> +		break;
>  	case DRM_FORMAT_YUYV:
>  	case DRM_FORMAT_UYVY:
>  	case DRM_FORMAT_YVYU:
> -- 
> 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

  reply	other threads:[~2015-05-15 18:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 18:05 [PATCH 0/4] Don't say we support framebuffers with alpha when we don't Damien Lespiau
2015-05-15 18:06 ` [PATCH 1/4] drm/i915: Remove the COMMON_PRIMARY_FORMATS defines Damien Lespiau
2015-05-15 18:41   ` Ville Syrjälä
2015-05-15 18:06 ` [PATCH 2/4] drm/i915: Remove ARBG/ABGR 2101010 on platform not supporting those formats Damien Lespiau
2015-05-15 18:44   ` Ville Syrjälä [this message]
2015-05-15 18:06 ` [PATCH 3/4] drm/i915: Don't expose RGB/BGR 8888 formats on primary planes before SKL Damien Lespiau
2015-05-15 18:56   ` Ville Syrjälä
2015-05-15 19:15     ` [PATCH v2] " Damien Lespiau
2015-05-19  8:00       ` Daniel Vetter
2015-05-19 11:29         ` [PATCH 3/4 v3] drm/i915: Tighten the exposure ARGB/ABGR 8888 formats Damien Lespiau
2015-05-19 17:01           ` Daniel Vetter
2015-05-15 18:06 ` [PATCH 4/4] drm/i915: Don't expose ARGB1555 on gen2/3 Damien Lespiau
2015-05-15 18:57   ` Ville Syrjälä
2015-05-18  8:34     ` Daniel Vetter
2015-05-18 14:57   ` shuang.he

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=20150515184403.GY18908@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