Re: [PATCH] drm/i915/skl: handle all pixel formats in skylake_update_primary_plane()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 10, 2015 at 01:15:49PM +0200, Jani Nikula wrote:
> skylake_update_primary_plane() did not handle all pixel formats returned
> by skl_format_to_fourcc(). Handle alpha similar to skl_update_plane().
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89052
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> 
> ---
> 
> This is purely cargo culting to avoid the BUG.
> ---
>  drivers/gpu/drm/i915/intel_display.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3fe95982be93..cede05256d56 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2751,10 +2751,19 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
>  	case DRM_FORMAT_XRGB8888:
>  		plane_ctl |= PLANE_CTL_FORMAT_XRGB_8888;
>  		break;
> +	case DRM_FORMAT_ARGB8888:
> +		plane_ctl |= PLANE_CTL_FORMAT_XRGB_8888;
> +		plane_ctl |= PLANE_CTL_ALPHA_SW_PREMULTIPLY;

We don't do alpha blending yet properly so we should just ignore alpha
for now. And someone should rip out that bit from skl_update_plane() as
well.

Also we seem to be missing more formats here than just these two. hint:
intel_primary_formats_gen4[]

> +		break;
>  	case DRM_FORMAT_XBGR8888:
>  		plane_ctl |= PLANE_CTL_ORDER_RGBX;
>  		plane_ctl |= PLANE_CTL_FORMAT_XRGB_8888;
>  		break;
> +	case DRM_FORMAT_ABGR8888:
> +		plane_ctl |= PLANE_CTL_ORDER_RGBX;
> +		plane_ctl |= PLANE_CTL_FORMAT_XRGB_8888;
> +		plane_ctl |= PLANE_CTL_ALPHA_SW_PREMULTIPLY;
> +		break;
>  	case DRM_FORMAT_XRGB2101010:
>  		plane_ctl |= PLANE_CTL_FORMAT_XRGB_2101010;
>  		break;
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux