]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Expose 10:10:10 XRGB formats on SNB-BDW sprites
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 31 Oct 2019 16:56:46 +0000 (18:56 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 4 Nov 2019 15:59:05 +0000 (17:59 +0200)
SNB-BDW support 10:10:10 formats on the sprite planes. Let's expose
them.

v2: Rebase due to fp16 landing

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191031165652.10868-2-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_sprite.c

index 14b35678a363696d639f87de53f7943ae3329d36..21d6e2f2e514621acb9ae0b7678772f58cd6be11 100644 (file)
@@ -1319,6 +1319,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_XBGR16161616F:
                sprctl |= SPRITE_FORMAT_RGBX161616 | SPRITE_RGB_ORDER_RGBX;
                break;
@@ -1624,6 +1630,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_XBGR16161616F:
                dvscntr |= DVS_FORMAT_RGBX161616 | DVS_RGB_ORDER_XBGR;
                break;
@@ -2355,6 +2367,8 @@ static const u64 i9xx_plane_format_modifiers[] = {
 static const u32 snb_plane_formats[] = {
        DRM_FORMAT_XRGB8888,
        DRM_FORMAT_XBGR8888,
+       DRM_FORMAT_XRGB2101010,
+       DRM_FORMAT_XBGR2101010,
        DRM_FORMAT_XRGB16161616F,
        DRM_FORMAT_XBGR16161616F,
        DRM_FORMAT_YUYV,
@@ -2573,6 +2587,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_XRGB16161616F:
        case DRM_FORMAT_XBGR16161616F:
        case DRM_FORMAT_YUYV: