drm/i915/display: fix phy name
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / display / intel_sprite.c
index 72fda04..8394502 100644 (file)
@@ -81,9 +81,9 @@ int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
  */
 void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
 {
-       struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
        struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
-       const struct drm_display_mode *adjusted_mode = &new_crtc_state->base.adjusted_mode;
+       const struct drm_display_mode *adjusted_mode = &new_crtc_state->hw.adjusted_mode;
        long timeout = msecs_to_jiffies_timeout(1);
        int scanline, min, max, vblank_start;
        wait_queue_head_t *wq = drm_crtc_vblank_waitqueue(&crtc->base);
@@ -190,7 +190,7 @@ irq_disable:
  */
 void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
 {
-       struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
        enum pipe pipe = crtc->pipe;
        int scanline_end = intel_get_crtc_scanline(crtc);
        u32 end_vbl_count = intel_crtc_get_vblank_counter(crtc);
@@ -203,14 +203,15 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
         * Would be slightly nice to just grab the vblank count and arm the
         * event outside of the critical section - the spinlock might spin for a
         * while ... */
-       if (new_crtc_state->base.event) {
+       if (new_crtc_state->uapi.event) {
                WARN_ON(drm_crtc_vblank_get(&crtc->base) != 0);
 
                spin_lock(&crtc->base.dev->event_lock);
-               drm_crtc_arm_vblank_event(&crtc->base, new_crtc_state->base.event);
+               drm_crtc_arm_vblank_event(&crtc->base,
+                                         new_crtc_state->uapi.event);
                spin_unlock(&crtc->base.dev->event_lock);
 
-               new_crtc_state->base.event = NULL;
+               new_crtc_state->uapi.event = NULL;
        }
 
        local_irq_enable();
@@ -239,9 +240,9 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
 
 int intel_plane_check_stride(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       unsigned int rotation = plane_state->base.rotation;
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       unsigned int rotation = plane_state->hw.rotation;
        u32 stride, max_stride;
 
        /*
@@ -251,7 +252,7 @@ int intel_plane_check_stride(const struct intel_plane_state *plane_state)
         * kick in due the plane being invisible.
         */
        if (intel_plane_can_remap(plane_state) &&
-           !plane_state->base.visible)
+           !plane_state->uapi.visible)
                return 0;
 
        /* FIXME other color planes? */
@@ -271,10 +272,10 @@ int intel_plane_check_stride(const struct intel_plane_state *plane_state)
 
 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state)
 {
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       struct drm_rect *src = &plane_state->base.src;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       struct drm_rect *src = &plane_state->uapi.src;
        u32 src_x, src_y, src_w, src_h, hsub, vsub;
-       bool rotated = drm_rotation_90_or_270(plane_state->base.rotation);
+       bool rotated = drm_rotation_90_or_270(plane_state->hw.rotation);
 
        /*
         * Hardware doesn't handle subpixel coordinates.
@@ -327,8 +328,8 @@ skl_plane_ratio(const struct intel_crtc_state *crtc_state,
                const struct intel_plane_state *plane_state,
                unsigned int *num, unsigned int *den)
 {
-       struct drm_i915_private *dev_priv = to_i915(plane_state->base.plane->dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       struct drm_i915_private *dev_priv = to_i915(plane_state->uapi.plane->dev);
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
 
        if (fb->format->cpp[0] == 8) {
                if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) {
@@ -347,7 +348,7 @@ skl_plane_ratio(const struct intel_crtc_state *crtc_state,
 static int skl_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
                               const struct intel_plane_state *plane_state)
 {
-       struct drm_i915_private *dev_priv = to_i915(plane_state->base.plane->dev);
+       struct drm_i915_private *dev_priv = to_i915(plane_state->uapi.plane->dev);
        unsigned int pixel_rate = crtc_state->pixel_rate;
        unsigned int src_w, src_h, dst_w, dst_h;
        unsigned int num, den;
@@ -358,10 +359,10 @@ static int skl_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
        if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
                den *= 2;
 
-       src_w = drm_rect_width(&plane_state->base.src) >> 16;
-       src_h = drm_rect_height(&plane_state->base.src) >> 16;
-       dst_w = drm_rect_width(&plane_state->base.dst);
-       dst_h = drm_rect_height(&plane_state->base.dst);
+       src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
+       src_h = drm_rect_height(&plane_state->uapi.src) >> 16;
+       dst_w = drm_rect_width(&plane_state->uapi.dst);
+       dst_h = drm_rect_height(&plane_state->uapi.dst);
 
        /* Downscaling limits the maximum pixel rate */
        dst_w = min(src_w, dst_w);
@@ -395,24 +396,24 @@ skl_program_scaler(struct intel_plane *plane,
                   const struct intel_plane_state *plane_state)
 {
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        enum pipe pipe = plane->pipe;
        int scaler_id = plane_state->scaler_id;
        const struct intel_scaler *scaler =
                &crtc_state->scaler_state.scalers[scaler_id];
-       int crtc_x = plane_state->base.dst.x1;
-       int crtc_y = plane_state->base.dst.y1;
-       u32 crtc_w = drm_rect_width(&plane_state->base.dst);
-       u32 crtc_h = drm_rect_height(&plane_state->base.dst);
+       int crtc_x = plane_state->uapi.dst.x1;
+       int crtc_y = plane_state->uapi.dst.y1;
+       u32 crtc_w = drm_rect_width(&plane_state->uapi.dst);
+       u32 crtc_h = drm_rect_height(&plane_state->uapi.dst);
        u16 y_hphase, uv_rgb_hphase;
        u16 y_vphase, uv_rgb_vphase;
        int hscale, vscale;
 
-       hscale = drm_rect_calc_hscale(&plane_state->base.src,
-                                     &plane_state->base.dst,
+       hscale = drm_rect_calc_hscale(&plane_state->uapi.src,
+                                     &plane_state->uapi.dst,
                                      0, INT_MAX);
-       vscale = drm_rect_calc_vscale(&plane_state->base.src,
-                                     &plane_state->base.dst,
+       vscale = drm_rect_calc_vscale(&plane_state->uapi.src,
+                                     &plane_state->uapi.dst,
                                      0, INT_MAX);
 
        /* TODO: handle sub-pixel coordinates */
@@ -541,10 +542,10 @@ icl_program_input_csc(struct intel_plane *plane,
        };
        const u16 *csc;
 
-       if (plane_state->base.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
-               csc = input_csc_matrix[plane_state->base.color_encoding];
+       if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
+               csc = input_csc_matrix[plane_state->hw.color_encoding];
        else
-               csc = input_csc_matrix_lr[plane_state->base.color_encoding];
+               csc = input_csc_matrix_lr[plane_state->hw.color_encoding];
 
        I915_WRITE_FW(PLANE_INPUT_CSC_COEFF(pipe, plane_id, 0), ROFF(csc[0]) |
                      GOFF(csc[1]));
@@ -558,7 +559,7 @@ icl_program_input_csc(struct intel_plane *plane,
 
        I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 0),
                      PREOFF_YUV_TO_RGB_HI);
-       if (plane_state->base.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
+       if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
                I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1), 0);
        else
                I915_WRITE_FW(PLANE_INPUT_CSC_PREOFF(pipe, plane_id, 1),
@@ -574,7 +575,7 @@ static void
 skl_program_plane(struct intel_plane *plane,
                  const struct intel_crtc_state *crtc_state,
                  const struct intel_plane_state *plane_state,
-                 int color_plane, bool slave, u32 plane_ctl)
+                 int color_plane)
 {
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
        enum plane_id plane_id = plane->id;
@@ -583,18 +584,18 @@ skl_program_plane(struct intel_plane *plane,
        u32 surf_addr = plane_state->color_plane[color_plane].offset;
        u32 stride = skl_plane_stride(plane_state, color_plane);
        u32 aux_stride = skl_plane_stride(plane_state, 1);
-       int crtc_x = plane_state->base.dst.x1;
-       int crtc_y = plane_state->base.dst.y1;
+       int crtc_x = plane_state->uapi.dst.x1;
+       int crtc_y = plane_state->uapi.dst.y1;
        u32 x = plane_state->color_plane[color_plane].x;
        u32 y = plane_state->color_plane[color_plane].y;
-       u32 src_w = drm_rect_width(&plane_state->base.src) >> 16;
-       u32 src_h = drm_rect_height(&plane_state->base.src) >> 16;
-       struct intel_plane *linked = plane_state->planar_linked_plane;
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       u8 alpha = plane_state->base.alpha >> 8;
+       u32 src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
+       u32 src_h = drm_rect_height(&plane_state->uapi.src) >> 16;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       u8 alpha = plane_state->hw.alpha >> 8;
        u32 plane_color_ctl = 0;
        unsigned long irqflags;
        u32 keymsk, keymax;
+       u32 plane_ctl = plane_state->ctl;
 
        plane_ctl |= skl_plane_ctl_crtc(crtc_state);
 
@@ -626,26 +627,8 @@ skl_program_plane(struct intel_plane *plane,
        I915_WRITE_FW(PLANE_AUX_DIST(pipe, plane_id),
                      (plane_state->color_plane[1].offset - surf_addr) | aux_stride);
 
-       if (icl_is_hdr_plane(dev_priv, plane_id)) {
-               u32 cus_ctl = 0;
-
-               if (linked) {
-                       /* Enable and use MPEG-2 chroma siting */
-                       cus_ctl = PLANE_CUS_ENABLE |
-                               PLANE_CUS_HPHASE_0 |
-                               PLANE_CUS_VPHASE_SIGN_NEGATIVE |
-                               PLANE_CUS_VPHASE_0_25;
-
-                       if (linked->id == PLANE_SPRITE5)
-                               cus_ctl |= PLANE_CUS_PLANE_7;
-                       else if (linked->id == PLANE_SPRITE4)
-                               cus_ctl |= PLANE_CUS_PLANE_6;
-                       else
-                               MISSING_CASE(linked->id);
-               }
-
-               I915_WRITE_FW(PLANE_CUS_CTL(pipe, plane_id), cus_ctl);
-       }
+       if (icl_is_hdr_plane(dev_priv, plane_id))
+               I915_WRITE_FW(PLANE_CUS_CTL(pipe, plane_id), plane_state->cus_ctl);
 
        if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
                I915_WRITE_FW(PLANE_COLOR_CTL(pipe, plane_id), plane_color_ctl);
@@ -675,7 +658,7 @@ skl_program_plane(struct intel_plane *plane,
        I915_WRITE_FW(PLANE_SURF(pipe, plane_id),
                      intel_plane_ggtt_offset(plane_state) + surf_addr);
 
-       if (!slave && plane_state->scaler_id >= 0)
+       if (plane_state->scaler_id >= 0)
                skl_program_scaler(plane, crtc_state, plane_state);
 
        spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
@@ -688,24 +671,12 @@ skl_update_plane(struct intel_plane *plane,
 {
        int color_plane = 0;
 
-       if (plane_state->planar_linked_plane) {
-               /* Program the UV plane */
+       if (plane_state->planar_linked_plane && !plane_state->planar_slave)
+               /* Program the UV plane on planar master */
                color_plane = 1;
-       }
-
-       skl_program_plane(plane, crtc_state, plane_state,
-                         color_plane, false, plane_state->ctl);
-}
 
-static void
-icl_update_slave(struct intel_plane *plane,
-                const struct intel_crtc_state *crtc_state,
-                const struct intel_plane_state *plane_state)
-{
-       skl_program_plane(plane, crtc_state, plane_state, 0, true,
-                         plane_state->ctl | PLANE_CTL_YUV420_Y_PLANE);
+       skl_program_plane(plane, crtc_state, plane_state, color_plane);
 }
-
 static void
 skl_disable_plane(struct intel_plane *plane,
                  const struct intel_crtc_state *crtc_state)
@@ -765,9 +736,9 @@ static void i9xx_plane_linear_gamma(u16 gamma[8])
 static void
 chv_update_csc(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        enum plane_id plane_id = plane->id;
        /*
         * |r|   | c0 c1 c2 |   |cr|
@@ -793,7 +764,7 @@ chv_update_csc(const struct intel_plane_state *plane_state)
                            0, 4096,  7601,
                },
        };
-       const s16 *csc = csc_matrix[plane_state->base.color_encoding];
+       const s16 *csc = csc_matrix[plane_state->hw.color_encoding];
 
        /* Seems RGB data bypasses the CSC always */
        if (!fb->format->is_yuv)
@@ -824,15 +795,15 @@ chv_update_csc(const struct intel_plane_state *plane_state)
 static void
 vlv_update_clrc(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        enum pipe pipe = plane->pipe;
        enum plane_id plane_id = plane->id;
        int contrast, brightness, sh_scale, sh_sin, sh_cos;
 
        if (fb->format->is_yuv &&
-           plane_state->base.color_range == DRM_COLOR_YCBCR_LIMITED_RANGE) {
+           plane_state->hw.color_range == DRM_COLOR_YCBCR_LIMITED_RANGE) {
                /*
                 * Expand limited range to full range:
                 * Contrast is applied first and is used to expand Y range.
@@ -866,7 +837,7 @@ vlv_plane_ratio(const struct intel_crtc_state *crtc_state,
                unsigned int *num, unsigned int *den)
 {
        u8 active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        unsigned int cpp = fb->format->cpp[0];
 
        /*
@@ -952,8 +923,8 @@ static u32 vlv_sprite_ctl_crtc(const struct intel_crtc_state *crtc_state)
 static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
                          const struct intel_plane_state *plane_state)
 {
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       unsigned int rotation = plane_state->base.rotation;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       unsigned int rotation = plane_state->hw.rotation;
        const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
        u32 sprctl;
 
@@ -972,6 +943,9 @@ static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
        case DRM_FORMAT_VYUY:
                sprctl |= SP_FORMAT_YUV422 | SP_YUV_ORDER_VYUY;
                break;
+       case DRM_FORMAT_C8:
+               sprctl |= SP_FORMAT_8BPP;
+               break;
        case DRM_FORMAT_RGB565:
                sprctl |= SP_FORMAT_BGR565;
                break;
@@ -987,6 +961,12 @@ static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
        case DRM_FORMAT_ABGR2101010:
                sprctl |= SP_FORMAT_RGBA1010102;
                break;
+       case DRM_FORMAT_XRGB2101010:
+               sprctl |= SP_FORMAT_BGRX1010102;
+               break;
+       case DRM_FORMAT_ARGB2101010:
+               sprctl |= SP_FORMAT_BGRA1010102;
+               break;
        case DRM_FORMAT_XBGR8888:
                sprctl |= SP_FORMAT_RGBX8888;
                break;
@@ -998,7 +978,7 @@ static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
                return 0;
        }
 
-       if (plane_state->base.color_encoding == DRM_COLOR_YCBCR_BT709)
+       if (plane_state->hw.color_encoding == DRM_COLOR_YCBCR_BT709)
                sprctl |= SP_YUV_FORMAT_BT709;
 
        if (fb->modifier == I915_FORMAT_MOD_X_TILED)
@@ -1018,9 +998,9 @@ static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
 
 static void vlv_update_gamma(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        enum pipe pipe = plane->pipe;
        enum plane_id plane_id = plane->id;
        u16 gamma[8];
@@ -1052,10 +1032,10 @@ vlv_update_plane(struct intel_plane *plane,
        u32 sprsurf_offset = plane_state->color_plane[0].offset;
        u32 linear_offset;
        const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
-       int crtc_x = plane_state->base.dst.x1;
-       int crtc_y = plane_state->base.dst.y1;
-       u32 crtc_w = drm_rect_width(&plane_state->base.dst);
-       u32 crtc_h = drm_rect_height(&plane_state->base.dst);
+       int crtc_x = plane_state->uapi.dst.x1;
+       int crtc_y = plane_state->uapi.dst.y1;
+       u32 crtc_w = drm_rect_width(&plane_state->uapi.dst);
+       u32 crtc_h = drm_rect_height(&plane_state->uapi.dst);
        u32 x = plane_state->color_plane[0].x;
        u32 y = plane_state->color_plane[0].y;
        unsigned long irqflags;
@@ -1150,7 +1130,7 @@ static void ivb_plane_ratio(const struct intel_crtc_state *crtc_state,
                            unsigned int *num, unsigned int *den)
 {
        u8 active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        unsigned int cpp = fb->format->cpp[0];
 
        if (hweight8(active_planes) == 2) {
@@ -1186,7 +1166,7 @@ static void ivb_plane_ratio_scaling(const struct intel_crtc_state *crtc_state,
                                    const struct intel_plane_state *plane_state,
                                    unsigned int *num, unsigned int *den)
 {
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        unsigned int cpp = fb->format->cpp[0];
 
        switch (cpp) {
@@ -1244,8 +1224,8 @@ static int ivb_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
         */
        pixel_rate = crtc_state->pixel_rate;
 
-       src_w = drm_rect_width(&plane_state->base.src) >> 16;
-       dst_w = drm_rect_width(&plane_state->base.dst);
+       src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
+       dst_w = drm_rect_width(&plane_state->uapi.dst);
 
        if (src_w != dst_w)
                ivb_plane_ratio_scaling(crtc_state, plane_state, &num, &den);
@@ -1264,7 +1244,7 @@ static void hsw_plane_ratio(const struct intel_crtc_state *crtc_state,
                            unsigned int *num, unsigned int *den)
 {
        u8 active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        unsigned int cpp = fb->format->cpp[0];
 
        if (hweight8(active_planes) == 2) {
@@ -1319,8 +1299,8 @@ static u32 ivb_sprite_ctl_crtc(const struct intel_crtc_state *crtc_state)
 static bool ivb_need_sprite_gamma(const struct intel_plane_state *plane_state)
 {
        struct drm_i915_private *dev_priv =
-               to_i915(plane_state->base.plane->dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+               to_i915(plane_state->uapi.plane->dev);
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
 
        return fb->format->cpp[0] == 8 &&
                (IS_IVYBRIDGE(dev_priv) || IS_HASWELL(dev_priv));
@@ -1330,9 +1310,9 @@ static u32 ivb_sprite_ctl(const struct intel_crtc_state *crtc_state,
                          const struct intel_plane_state *plane_state)
 {
        struct drm_i915_private *dev_priv =
-               to_i915(plane_state->base.plane->dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       unsigned int rotation = plane_state->base.rotation;
+               to_i915(plane_state->uapi.plane->dev);
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       unsigned int rotation = plane_state->hw.rotation;
        const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
        u32 sprctl;
 
@@ -1348,6 +1328,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;
@@ -1374,10 +1360,10 @@ static u32 ivb_sprite_ctl(const struct intel_crtc_state *crtc_state,
        if (!ivb_need_sprite_gamma(plane_state))
                sprctl |= SPRITE_INT_GAMMA_DISABLE;
 
-       if (plane_state->base.color_encoding == DRM_COLOR_YCBCR_BT709)
+       if (plane_state->hw.color_encoding == DRM_COLOR_YCBCR_BT709)
                sprctl |= SPRITE_YUV_TO_RGB_CSC_FORMAT_BT709;
 
-       if (plane_state->base.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
+       if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
                sprctl |= SPRITE_YUV_RANGE_CORRECTION_DISABLE;
 
        if (fb->modifier == I915_FORMAT_MOD_X_TILED)
@@ -1421,7 +1407,7 @@ static void ivb_sprite_linear_gamma(const struct intel_plane_state *plane_state,
 
 static void ivb_update_gamma(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
        enum pipe pipe = plane->pipe;
        u16 gamma[18];
@@ -1460,14 +1446,14 @@ ivb_update_plane(struct intel_plane *plane,
        u32 sprsurf_offset = plane_state->color_plane[0].offset;
        u32 linear_offset;
        const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
-       int crtc_x = plane_state->base.dst.x1;
-       int crtc_y = plane_state->base.dst.y1;
-       u32 crtc_w = drm_rect_width(&plane_state->base.dst);
-       u32 crtc_h = drm_rect_height(&plane_state->base.dst);
+       int crtc_x = plane_state->uapi.dst.x1;
+       int crtc_y = plane_state->uapi.dst.y1;
+       u32 crtc_w = drm_rect_width(&plane_state->uapi.dst);
+       u32 crtc_h = drm_rect_height(&plane_state->uapi.dst);
        u32 x = plane_state->color_plane[0].x;
        u32 y = plane_state->color_plane[0].y;
-       u32 src_w = drm_rect_width(&plane_state->base.src) >> 16;
-       u32 src_h = drm_rect_height(&plane_state->base.src) >> 16;
+       u32 src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
+       u32 src_h = drm_rect_height(&plane_state->uapi.src) >> 16;
        u32 sprctl, sprscale = 0;
        unsigned long irqflags;
 
@@ -1566,7 +1552,7 @@ ivb_plane_get_hw_state(struct intel_plane *plane,
 static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
                                const struct intel_plane_state *plane_state)
 {
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        unsigned int hscale, pixel_rate;
        unsigned int limit, decimate;
 
@@ -1580,8 +1566,8 @@ static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
        pixel_rate = crtc_state->pixel_rate;
 
        /* Horizontal downscaling limits the maximum pixel rate */
-       hscale = drm_rect_calc_hscale(&plane_state->base.src,
-                                     &plane_state->base.dst,
+       hscale = drm_rect_calc_hscale(&plane_state->uapi.src,
+                                     &plane_state->uapi.dst,
                                      0, INT_MAX);
        if (hscale < 0x10000)
                return pixel_rate;
@@ -1635,9 +1621,9 @@ static u32 g4x_sprite_ctl(const struct intel_crtc_state *crtc_state,
                          const struct intel_plane_state *plane_state)
 {
        struct drm_i915_private *dev_priv =
-               to_i915(plane_state->base.plane->dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       unsigned int rotation = plane_state->base.rotation;
+               to_i915(plane_state->uapi.plane->dev);
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       unsigned int rotation = plane_state->hw.rotation;
        const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
        u32 dvscntr;
 
@@ -1653,6 +1639,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;
@@ -1676,10 +1668,10 @@ static u32 g4x_sprite_ctl(const struct intel_crtc_state *crtc_state,
                return 0;
        }
 
-       if (plane_state->base.color_encoding == DRM_COLOR_YCBCR_BT709)
+       if (plane_state->hw.color_encoding == DRM_COLOR_YCBCR_BT709)
                dvscntr |= DVS_YUV_FORMAT_BT709;
 
-       if (plane_state->base.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
+       if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
                dvscntr |= DVS_YUV_RANGE_CORRECTION_DISABLE;
 
        if (fb->modifier == I915_FORMAT_MOD_X_TILED)
@@ -1698,9 +1690,9 @@ static u32 g4x_sprite_ctl(const struct intel_crtc_state *crtc_state,
 
 static void g4x_update_gamma(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        enum pipe pipe = plane->pipe;
        u16 gamma[8];
        int i;
@@ -1730,9 +1722,9 @@ static void ilk_sprite_linear_gamma(u16 gamma[17])
 
 static void ilk_update_gamma(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        enum pipe pipe = plane->pipe;
        u16 gamma[17];
        int i;
@@ -1766,14 +1758,14 @@ g4x_update_plane(struct intel_plane *plane,
        u32 dvssurf_offset = plane_state->color_plane[0].offset;
        u32 linear_offset;
        const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
-       int crtc_x = plane_state->base.dst.x1;
-       int crtc_y = plane_state->base.dst.y1;
-       u32 crtc_w = drm_rect_width(&plane_state->base.dst);
-       u32 crtc_h = drm_rect_height(&plane_state->base.dst);
+       int crtc_x = plane_state->uapi.dst.x1;
+       int crtc_y = plane_state->uapi.dst.y1;
+       u32 crtc_w = drm_rect_width(&plane_state->uapi.dst);
+       u32 crtc_h = drm_rect_height(&plane_state->uapi.dst);
        u32 x = plane_state->color_plane[0].x;
        u32 y = plane_state->color_plane[0].y;
-       u32 src_w = drm_rect_width(&plane_state->base.src) >> 16;
-       u32 src_h = drm_rect_height(&plane_state->base.src) >> 16;
+       u32 src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
+       u32 src_h = drm_rect_height(&plane_state->uapi.src) >> 16;
        u32 dvscntr, dvsscale = 0;
        unsigned long irqflags;
 
@@ -1886,12 +1878,12 @@ static int
 g4x_sprite_check_scaling(struct intel_crtc_state *crtc_state,
                         struct intel_plane_state *plane_state)
 {
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       const struct drm_rect *src = &plane_state->base.src;
-       const struct drm_rect *dst = &plane_state->base.dst;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       const struct drm_rect *src = &plane_state->uapi.src;
+       const struct drm_rect *dst = &plane_state->uapi.dst;
        int src_x, src_w, src_h, crtc_w, crtc_h;
        const struct drm_display_mode *adjusted_mode =
-               &crtc_state->base.adjusted_mode;
+               &crtc_state->hw.adjusted_mode;
        unsigned int stride = plane_state->color_plane[0].stride;
        unsigned int cpp = fb->format->cpp[0];
        unsigned int width_bytes;
@@ -1947,13 +1939,13 @@ static int
 g4x_sprite_check(struct intel_crtc_state *crtc_state,
                 struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
        int min_scale = DRM_PLANE_HELPER_NO_SCALING;
        int max_scale = DRM_PLANE_HELPER_NO_SCALING;
        int ret;
 
-       if (intel_fb_scalable(plane_state->base.fb)) {
+       if (intel_fb_scalable(plane_state->hw.fb)) {
                if (INTEL_GEN(dev_priv) < 7) {
                        min_scale = 1;
                        max_scale = 16 << 16;
@@ -1963,8 +1955,8 @@ g4x_sprite_check(struct intel_crtc_state *crtc_state,
                }
        }
 
-       ret = drm_atomic_helper_check_plane_state(&plane_state->base,
-                                                 &crtc_state->base,
+       ret = drm_atomic_helper_check_plane_state(&plane_state->uapi,
+                                                 &crtc_state->uapi,
                                                  min_scale, max_scale,
                                                  true, true);
        if (ret)
@@ -1974,7 +1966,7 @@ g4x_sprite_check(struct intel_crtc_state *crtc_state,
        if (ret)
                return ret;
 
-       if (!plane_state->base.visible)
+       if (!plane_state->uapi.visible)
                return 0;
 
        ret = intel_plane_check_src_coordinates(plane_state);
@@ -1995,9 +1987,9 @@ g4x_sprite_check(struct intel_crtc_state *crtc_state,
 
 int chv_plane_check_rotation(const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       unsigned int rotation = plane_state->base.rotation;
+       unsigned int rotation = plane_state->hw.rotation;
 
        /* CHV ignores the mirror bit when the rotate bit is set :( */
        if (IS_CHERRYVIEW(dev_priv) &&
@@ -2020,8 +2012,8 @@ vlv_sprite_check(struct intel_crtc_state *crtc_state,
        if (ret)
                return ret;
 
-       ret = drm_atomic_helper_check_plane_state(&plane_state->base,
-                                                 &crtc_state->base,
+       ret = drm_atomic_helper_check_plane_state(&plane_state->uapi,
+                                                 &crtc_state->uapi,
                                                  DRM_PLANE_HELPER_NO_SCALING,
                                                  DRM_PLANE_HELPER_NO_SCALING,
                                                  true, true);
@@ -2032,7 +2024,7 @@ vlv_sprite_check(struct intel_crtc_state *crtc_state,
        if (ret)
                return ret;
 
-       if (!plane_state->base.visible)
+       if (!plane_state->uapi.visible)
                return 0;
 
        ret = intel_plane_check_src_coordinates(plane_state);
@@ -2047,10 +2039,10 @@ vlv_sprite_check(struct intel_crtc_state *crtc_state,
 static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
                              const struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       unsigned int rotation = plane_state->base.rotation;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       unsigned int rotation = plane_state->hw.rotation;
        struct drm_format_name_buf format_name;
 
        if (!fb)
@@ -2105,8 +2097,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
        }
 
        /* Y-tiling is not supported in IF-ID Interlace mode */
-       if (crtc_state->base.enable &&
-           crtc_state->base.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE &&
+       if (crtc_state->hw.enable &&
+           crtc_state->hw.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE &&
            (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
             fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
             fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
@@ -2122,9 +2114,9 @@ static int skl_plane_check_dst_coordinates(const struct intel_crtc_state *crtc_s
                                           const struct intel_plane_state *plane_state)
 {
        struct drm_i915_private *dev_priv =
-               to_i915(plane_state->base.plane->dev);
-       int crtc_x = plane_state->base.dst.x1;
-       int crtc_w = drm_rect_width(&plane_state->base.dst);
+               to_i915(plane_state->uapi.plane->dev);
+       int crtc_x = plane_state->uapi.dst.x1;
+       int crtc_w = drm_rect_width(&plane_state->uapi.dst);
        int pipe_src_w = crtc_state->pipe_src_w;
 
        /*
@@ -2150,9 +2142,9 @@ static int skl_plane_check_dst_coordinates(const struct intel_crtc_state *crtc_s
 
 static int skl_plane_check_nv12_rotation(const struct intel_plane_state *plane_state)
 {
-       const struct drm_framebuffer *fb = plane_state->base.fb;
-       unsigned int rotation = plane_state->base.rotation;
-       int src_w = drm_rect_width(&plane_state->base.src) >> 16;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
+       unsigned int rotation = plane_state->hw.rotation;
+       int src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
 
        /* Display WA #1106 */
        if (drm_format_info_is_yuv_semiplanar(fb->format) && src_w & 3 &&
@@ -2184,9 +2176,9 @@ static int skl_plane_max_scale(struct drm_i915_private *dev_priv,
 static int skl_plane_check(struct intel_crtc_state *crtc_state,
                           struct intel_plane_state *plane_state)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
-       const struct drm_framebuffer *fb = plane_state->base.fb;
+       const struct drm_framebuffer *fb = plane_state->hw.fb;
        int min_scale = DRM_PLANE_HELPER_NO_SCALING;
        int max_scale = DRM_PLANE_HELPER_NO_SCALING;
        int ret;
@@ -2201,8 +2193,8 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
                max_scale = skl_plane_max_scale(dev_priv, fb);
        }
 
-       ret = drm_atomic_helper_check_plane_state(&plane_state->base,
-                                                 &crtc_state->base,
+       ret = drm_atomic_helper_check_plane_state(&plane_state->uapi,
+                                                 &crtc_state->uapi,
                                                  min_scale, max_scale,
                                                  true, true);
        if (ret)
@@ -2212,7 +2204,7 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
        if (ret)
                return ret;
 
-       if (!plane_state->base.visible)
+       if (!plane_state->uapi.visible)
                return 0;
 
        ret = skl_plane_check_dst_coordinates(crtc_state, plane_state);
@@ -2228,8 +2220,8 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
                return ret;
 
        /* HW only has 8 bits pixel precision, disable plane if invisible */
-       if (!(plane_state->base.alpha >> 8))
-               plane_state->base.visible = false;
+       if (!(plane_state->hw.alpha >> 8))
+               plane_state->uapi.visible = false;
 
        plane_state->ctl = skl_plane_ctl(crtc_state, plane_state);
 
@@ -2237,6 +2229,15 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
                plane_state->color_ctl = glk_plane_color_ctl(crtc_state,
                                                             plane_state);
 
+       if (drm_format_info_is_yuv_semiplanar(fb->format) &&
+           icl_is_hdr_plane(dev_priv, plane->id))
+               /* Enable and use MPEG-2 chroma siting */
+               plane_state->cus_ctl = PLANE_CUS_ENABLE |
+                       PLANE_CUS_HPHASE_0 |
+                       PLANE_CUS_VPHASE_SIGN_NEGATIVE | PLANE_CUS_VPHASE_0_25;
+       else
+               plane_state->cus_ctl = 0;
+
        return 0;
 }
 
@@ -2248,7 +2249,7 @@ static bool has_dst_key_in_primary_plane(struct drm_i915_private *dev_priv)
 static void intel_plane_set_ckey(struct intel_plane_state *plane_state,
                                 const struct drm_intel_sprite_colorkey *set)
 {
-       struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
+       struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
        struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
        struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
 
@@ -2375,6 +2376,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,
@@ -2384,12 +2387,30 @@ static const u32 snb_plane_formats[] = {
 };
 
 static const u32 vlv_plane_formats[] = {
+       DRM_FORMAT_C8,
        DRM_FORMAT_RGB565,
-       DRM_FORMAT_ABGR8888,
-       DRM_FORMAT_ARGB8888,
+       DRM_FORMAT_XRGB8888,
        DRM_FORMAT_XBGR8888,
+       DRM_FORMAT_ARGB8888,
+       DRM_FORMAT_ABGR8888,
+       DRM_FORMAT_XBGR2101010,
+       DRM_FORMAT_ABGR2101010,
+       DRM_FORMAT_YUYV,
+       DRM_FORMAT_YVYU,
+       DRM_FORMAT_UYVY,
+       DRM_FORMAT_VYUY,
+};
+
+static const u32 chv_pipe_b_sprite_formats[] = {
+       DRM_FORMAT_C8,
+       DRM_FORMAT_RGB565,
        DRM_FORMAT_XRGB8888,
+       DRM_FORMAT_XBGR8888,
+       DRM_FORMAT_ARGB8888,
+       DRM_FORMAT_ABGR8888,
+       DRM_FORMAT_XRGB2101010,
        DRM_FORMAT_XBGR2101010,
+       DRM_FORMAT_ARGB2101010,
        DRM_FORMAT_ABGR2101010,
        DRM_FORMAT_YUYV,
        DRM_FORMAT_YVYU,
@@ -2462,6 +2483,8 @@ static const u32 icl_sdr_y_plane_formats[] = {
        DRM_FORMAT_ABGR8888,
        DRM_FORMAT_XRGB2101010,
        DRM_FORMAT_XBGR2101010,
+       DRM_FORMAT_ARGB2101010,
+       DRM_FORMAT_ABGR2101010,
        DRM_FORMAT_YUYV,
        DRM_FORMAT_YVYU,
        DRM_FORMAT_UYVY,
@@ -2483,6 +2506,8 @@ static const u32 icl_sdr_uv_plane_formats[] = {
        DRM_FORMAT_ABGR8888,
        DRM_FORMAT_XRGB2101010,
        DRM_FORMAT_XBGR2101010,
+       DRM_FORMAT_ARGB2101010,
+       DRM_FORMAT_ABGR2101010,
        DRM_FORMAT_YUYV,
        DRM_FORMAT_YVYU,
        DRM_FORMAT_UYVY,
@@ -2508,6 +2533,8 @@ static const u32 icl_hdr_plane_formats[] = {
        DRM_FORMAT_ABGR8888,
        DRM_FORMAT_XRGB2101010,
        DRM_FORMAT_XBGR2101010,
+       DRM_FORMAT_ARGB2101010,
+       DRM_FORMAT_ABGR2101010,
        DRM_FORMAT_XRGB16161616F,
        DRM_FORMAT_XBGR16161616F,
        DRM_FORMAT_ARGB16161616F,
@@ -2593,6 +2620,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:
@@ -2620,6 +2649,7 @@ static bool vlv_sprite_format_mod_supported(struct drm_plane *_plane,
        }
 
        switch (format) {
+       case DRM_FORMAT_C8:
        case DRM_FORMAT_RGB565:
        case DRM_FORMAT_ABGR8888:
        case DRM_FORMAT_ARGB8888:
@@ -2627,6 +2657,8 @@ static bool vlv_sprite_format_mod_supported(struct drm_plane *_plane,
        case DRM_FORMAT_XRGB8888:
        case DRM_FORMAT_XBGR2101010:
        case DRM_FORMAT_ABGR2101010:
+       case DRM_FORMAT_XRGB2101010:
+       case DRM_FORMAT_ARGB2101010:
        case DRM_FORMAT_YUYV:
        case DRM_FORMAT_YVYU:
        case DRM_FORMAT_UYVY:
@@ -2671,6 +2703,8 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
        case DRM_FORMAT_RGB565:
        case DRM_FORMAT_XRGB2101010:
        case DRM_FORMAT_XBGR2101010:
+       case DRM_FORMAT_ARGB2101010:
+       case DRM_FORMAT_ABGR2101010:
        case DRM_FORMAT_YUYV:
        case DRM_FORMAT_YVYU:
        case DRM_FORMAT_UYVY:
@@ -2723,6 +2757,8 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
        case DRM_FORMAT_RGB565:
        case DRM_FORMAT_XRGB2101010:
        case DRM_FORMAT_XBGR2101010:
+       case DRM_FORMAT_ARGB2101010:
+       case DRM_FORMAT_ABGR2101010:
        case DRM_FORMAT_YUYV:
        case DRM_FORMAT_YVYU:
        case DRM_FORMAT_UYVY:
@@ -2916,8 +2952,6 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
        plane->get_hw_state = skl_plane_get_hw_state;
        plane->check_plane = skl_plane_check;
        plane->min_cdclk = skl_plane_min_cdclk;
-       if (icl_is_nv12_y_plane(plane_id))
-               plane->update_slave = icl_update_slave;
 
        if (INTEL_GEN(dev_priv) >= 11)
                formats = icl_get_plane_formats(dev_priv, pipe,
@@ -3025,8 +3059,13 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
                plane->check_plane = vlv_sprite_check;
                plane->min_cdclk = vlv_plane_min_cdclk;
 
-               formats = vlv_plane_formats;
-               num_formats = ARRAY_SIZE(vlv_plane_formats);
+               if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B) {
+                       formats = chv_pipe_b_sprite_formats;
+                       num_formats = ARRAY_SIZE(chv_pipe_b_sprite_formats);
+               } else {
+                       formats = vlv_plane_formats;
+                       num_formats = ARRAY_SIZE(vlv_plane_formats);
+               }
                modifiers = i9xx_plane_format_modifiers;
 
                plane_funcs = &vlv_sprite_funcs;