[Intel-gfx] [PATCH 2/4] drm/i915: Remove ARBG/ABGR 2101010 on platform not supporting those formats

Ville Syrjälä ville.syrjala at linux.intel.com
Fri May 15 11:44:03 PDT 2015


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 at linux.intel.com>

> 
> Signed-off-by: Damien Lespiau <damien.lespiau at 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list