[Intel-gfx] [PATCH 1/9] drm/i915: Expose 10:10:10 XRGB formats on SNB-BDW sprites

Shankar, Uma uma.shankar at intel.com
Tue Oct 29 09:08:05 UTC 2019



>-----Original Message-----
>From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Ville Syrjala
>Sent: Tuesday, October 8, 2019 9:45 PM
>To: intel-gfx at lists.freedesktop.org
>Subject: [Intel-gfx] [PATCH 1/9] drm/i915: Expose 10:10:10 XRGB formats on SNB-
>BDW sprites
>
>From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
>SNB-BDW support 10:10:10 formats on the sprite planes. Let's expose them.
>
>Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>---
> drivers/gpu/drm/i915/display/intel_sprite.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c
>b/drivers/gpu/drm/i915/display/intel_sprite.c
>index 633fa8069348..90b0e65420a5 100644
>--- a/drivers/gpu/drm/i915/display/intel_sprite.c
>+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
>@@ -1054,6 +1054,12 @@ static u32 ivb_sprite_ctl(const struct intel_crtc_state
>*crtc_state,
> 	case DRM_FORMAT_XRGB8888:
> 		sprctl |= SPRITE_FORMAT_RGBX888;
> 		break;
>+	case DRM_FORMAT_XBGR2101010:
>+		sprctl |= SPRITE_FORMAT_RGBX101010 |
>SPRITE_RGB_ORDER_RGBX;
>+		break;
>+	case DRM_FORMAT_XRGB2101010:
>+		sprctl |= SPRITE_FORMAT_RGBX101010;
>+		break;
> 	case DRM_FORMAT_YUYV:
> 		sprctl |= SPRITE_FORMAT_YUV422 | SPRITE_YUV_ORDER_YUYV;
> 		break;
>@@ -1288,6 +1294,12 @@ static u32 g4x_sprite_ctl(const struct intel_crtc_state
>*crtc_state,
> 	case DRM_FORMAT_XRGB8888:
> 		dvscntr |= DVS_FORMAT_RGBX888;
> 		break;
>+	case DRM_FORMAT_XBGR2101010:
>+		dvscntr |= DVS_FORMAT_RGBX101010 | DVS_RGB_ORDER_XBGR;
>+		break;
>+	case DRM_FORMAT_XRGB2101010:
>+		dvscntr |= DVS_FORMAT_RGBX101010;
>+		break;
> 	case DRM_FORMAT_YUYV:
> 		dvscntr |= DVS_FORMAT_YUV422 | DVS_YUV_ORDER_YUYV;
> 		break;
>@@ -1983,6 +1995,8 @@ static const u64 i9xx_plane_format_modifiers[] = {  static
>const u32 snb_plane_formats[] = {
> 	DRM_FORMAT_XBGR8888,
> 	DRM_FORMAT_XRGB8888,
>+	DRM_FORMAT_XRGB2101010,
>+	DRM_FORMAT_XBGR2101010,

The order seems inconsistent with 8888 but I guess you have a patch fixing the
ordering, so should be ok. 

Reviewed-by: Uma Shankar <uma.shankar at intel.com>

> 	DRM_FORMAT_YUYV,
> 	DRM_FORMAT_YVYU,
> 	DRM_FORMAT_UYVY,
>@@ -2193,6 +2207,8 @@ static bool snb_sprite_format_mod_supported(struct
>drm_plane *_plane,
> 	switch (format) {
> 	case DRM_FORMAT_XRGB8888:
> 	case DRM_FORMAT_XBGR8888:
>+	case DRM_FORMAT_XRGB2101010:
>+	case DRM_FORMAT_XBGR2101010:
> 	case DRM_FORMAT_YUYV:
> 	case DRM_FORMAT_YVYU:
> 	case DRM_FORMAT_UYVY:
>--
>2.21.0
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list