drm/i915: Move rotation from intel_plane to drm_plane_state
[deliverable/linux.git] / drivers / gpu / drm / i915 / intel_display.c
index 61b123f1a6527a9de89836cbc37fb623529df873..a3fd64370c2600ec913fc86e17aa8b2195db31c6 100644 (file)
@@ -2188,11 +2188,12 @@ static bool need_vtd_wa(struct drm_device *dev)
        return false;
 }
 
-static int intel_align_height(struct drm_device *dev, int height, bool tiled)
+int
+intel_fb_align_height(struct drm_device *dev, int height, unsigned int tiling)
 {
        int tile_height;
 
-       tile_height = tiled ? (IS_GEN2(dev) ? 16 : 8) : 1;
+       tile_height = tiling ? (IS_GEN2(dev) ? 16 : 8) : 1;
        return ALIGN(height, tile_height);
 }
 
@@ -2315,7 +2316,7 @@ unsigned long intel_gen4_compute_page_offset(int *x, int *y,
        }
 }
 
-int intel_format_to_fourcc(int format)
+static int i9xx_format_to_fourcc(int format)
 {
        switch (format) {
        case DISPPLANE_8BPP:
@@ -2336,8 +2337,35 @@ int intel_format_to_fourcc(int format)
        }
 }
 
-static bool intel_alloc_plane_obj(struct intel_crtc *crtc,
-                                 struct intel_plane_config *plane_config)
+static int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)
+{
+       switch (format) {
+       case PLANE_CTL_FORMAT_RGB_565:
+               return DRM_FORMAT_RGB565;
+       default:
+       case PLANE_CTL_FORMAT_XRGB_8888:
+               if (rgb_order) {
+                       if (alpha)
+                               return DRM_FORMAT_ABGR8888;
+                       else
+                               return DRM_FORMAT_XBGR8888;
+               } else {
+                       if (alpha)
+                               return DRM_FORMAT_ARGB8888;
+                       else
+                               return DRM_FORMAT_XRGB8888;
+               }
+       case PLANE_CTL_FORMAT_XRGB_2101010:
+               if (rgb_order)
+                       return DRM_FORMAT_XBGR2101010;
+               else
+                       return DRM_FORMAT_XRGB2101010;
+       }
+}
+
+static bool
+intel_alloc_plane_obj(struct intel_crtc *crtc,
+                     struct intel_initial_plane_config *plane_config)
 {
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_gem_object *obj = NULL;
@@ -2352,10 +2380,9 @@ static bool intel_alloc_plane_obj(struct intel_crtc *crtc,
        if (!obj)
                return false;
 
-       if (plane_config->tiled) {
-               obj->tiling_mode = I915_TILING_X;
+       obj->tiling_mode = plane_config->tiling;
+       if (obj->tiling_mode == I915_TILING_X)
                obj->stride = crtc->base.primary->fb->pitches[0];
-       }
 
        mode_cmd.pixel_format = crtc->base.primary->fb->pixel_format;
        mode_cmd.width = crtc->base.primary->fb->width;
@@ -2382,8 +2409,9 @@ out_unref_obj:
        return false;
 }
 
-static void intel_find_plane_obj(struct intel_crtc *intel_crtc,
-                                struct intel_plane_config *plane_config)
+static void
+intel_find_plane_obj(struct intel_crtc *intel_crtc,
+                    struct intel_initial_plane_config *plane_config)
 {
        struct drm_device *dev = intel_crtc->base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
@@ -2532,7 +2560,7 @@ static void i9xx_update_primary_plane(struct drm_crtc *crtc,
                intel_crtc->dspaddr_offset = linear_offset;
        }
 
-       if (to_intel_plane(crtc->primary)->rotation == BIT(DRM_ROTATE_180)) {
+       if (crtc->primary->state->rotation == BIT(DRM_ROTATE_180)) {
                dspcntr |= DISPPLANE_ROTATE_180;
 
                x += (intel_crtc->config->pipe_src_w - 1);
@@ -2634,7 +2662,7 @@ static void ironlake_update_primary_plane(struct drm_crtc *crtc,
                                               pixel_size,
                                               fb->pitches[0]);
        linear_offset -= intel_crtc->dspaddr_offset;
-       if (to_intel_plane(crtc->primary)->rotation == BIT(DRM_ROTATE_180)) {
+       if (crtc->primary->state->rotation == BIT(DRM_ROTATE_180)) {
                dspcntr |= DISPPLANE_ROTATE_180;
 
                if (!IS_HASWELL(dev) && !IS_BROADWELL(dev)) {
@@ -2731,7 +2759,7 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
        }
 
        plane_ctl |= PLANE_CTL_PLANE_GAMMA_DISABLE;
-       if (to_intel_plane(crtc->primary)->rotation == BIT(DRM_ROTATE_180))
+       if (crtc->primary->state->rotation == BIT(DRM_ROTATE_180))
                plane_ctl |= PLANE_CTL_ROTATE_180;
 
        I915_WRITE(PLANE_CTL(pipe, 0), plane_ctl);
@@ -6545,8 +6573,9 @@ static void vlv_crtc_clock_get(struct intel_crtc *crtc,
        pipe_config->port_clock = clock.dot / 5;
 }
 
-static void i9xx_get_plane_config(struct intel_crtc *crtc,
-                                 struct intel_plane_config *plane_config)
+static void
+i9xx_get_initial_plane_config(struct intel_crtc *crtc,
+                             struct intel_initial_plane_config *plane_config)
 {
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
@@ -6554,27 +6583,30 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc,
        int pipe = crtc->pipe, plane = crtc->plane;
        int fourcc, pixel_format;
        int aligned_height;
+       struct drm_framebuffer *fb;
+       struct intel_framebuffer *intel_fb;
 
-       crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL);
-       if (!crtc->base.primary->fb) {
+       intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
+       if (!intel_fb) {
                DRM_DEBUG_KMS("failed to alloc fb\n");
                return;
        }
 
+       fb = &intel_fb->base;
+
        val = I915_READ(DSPCNTR(plane));
 
        if (INTEL_INFO(dev)->gen >= 4)
                if (val & DISPPLANE_TILED)
-                       plane_config->tiled = true;
+                       plane_config->tiling = I915_TILING_X;
 
        pixel_format = val & DISPPLANE_PIXFORMAT_MASK;
-       fourcc = intel_format_to_fourcc(pixel_format);
-       crtc->base.primary->fb->pixel_format = fourcc;
-       crtc->base.primary->fb->bits_per_pixel =
-               drm_format_plane_cpp(fourcc, 0) * 8;
+       fourcc = i9xx_format_to_fourcc(pixel_format);
+       fb->pixel_format = fourcc;
+       fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8;
 
        if (INTEL_INFO(dev)->gen >= 4) {
-               if (plane_config->tiled)
+               if (plane_config->tiling)
                        offset = I915_READ(DSPTILEOFF(plane));
                else
                        offset = I915_READ(DSPLINOFF(plane));
@@ -6585,25 +6617,23 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc,
        plane_config->base = base;
 
        val = I915_READ(PIPESRC(pipe));
-       crtc->base.primary->fb->width = ((val >> 16) & 0xfff) + 1;
-       crtc->base.primary->fb->height = ((val >> 0) & 0xfff) + 1;
+       fb->width = ((val >> 16) & 0xfff) + 1;
+       fb->height = ((val >> 0) & 0xfff) + 1;
 
        val = I915_READ(DSPSTRIDE(pipe));
-       crtc->base.primary->fb->pitches[0] = val & 0xffffffc0;
+       fb->pitches[0] = val & 0xffffffc0;
 
-       aligned_height = intel_align_height(dev, crtc->base.primary->fb->height,
-                                           plane_config->tiled);
+       aligned_height = intel_fb_align_height(dev, fb->height,
+                                              plane_config->tiling);
 
-       plane_config->size = PAGE_ALIGN(crtc->base.primary->fb->pitches[0] *
-                                       aligned_height);
+       plane_config->size = PAGE_ALIGN(fb->pitches[0] * aligned_height);
 
-       DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n",
-                     pipe, plane, crtc->base.primary->fb->width,
-                     crtc->base.primary->fb->height,
-                     crtc->base.primary->fb->bits_per_pixel, base,
-                     crtc->base.primary->fb->pitches[0],
+       DRM_DEBUG_KMS("pipe/plane %c/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n",
+                     pipe_name(pipe), plane, fb->width, fb->height,
+                     fb->bits_per_pixel, base, fb->pitches[0],
                      plane_config->size);
 
+       crtc->base.primary->fb = fb;
 }
 
 static void chv_crtc_clock_get(struct intel_crtc *crtc,
@@ -7575,6 +7605,78 @@ static void skylake_get_pfit_config(struct intel_crtc *crtc,
        }
 }
 
+static void
+skylake_get_initial_plane_config(struct intel_crtc *crtc,
+                                struct intel_initial_plane_config *plane_config)
+{
+       struct drm_device *dev = crtc->base.dev;
+       struct drm_i915_private *dev_priv = dev->dev_private;
+       u32 val, base, offset, stride_mult;
+       int pipe = crtc->pipe;
+       int fourcc, pixel_format;
+       int aligned_height;
+       struct drm_framebuffer *fb;
+       struct intel_framebuffer *intel_fb;
+
+       intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
+       if (!intel_fb) {
+               DRM_DEBUG_KMS("failed to alloc fb\n");
+               return;
+       }
+
+       fb = &intel_fb->base;
+
+       val = I915_READ(PLANE_CTL(pipe, 0));
+       if (val & PLANE_CTL_TILED_MASK)
+               plane_config->tiling = I915_TILING_X;
+
+       pixel_format = val & PLANE_CTL_FORMAT_MASK;
+       fourcc = skl_format_to_fourcc(pixel_format,
+                                     val & PLANE_CTL_ORDER_RGBX,
+                                     val & PLANE_CTL_ALPHA_MASK);
+       fb->pixel_format = fourcc;
+       fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8;
+
+       base = I915_READ(PLANE_SURF(pipe, 0)) & 0xfffff000;
+       plane_config->base = base;
+
+       offset = I915_READ(PLANE_OFFSET(pipe, 0));
+
+       val = I915_READ(PLANE_SIZE(pipe, 0));
+       fb->height = ((val >> 16) & 0xfff) + 1;
+       fb->width = ((val >> 0) & 0x1fff) + 1;
+
+       val = I915_READ(PLANE_STRIDE(pipe, 0));
+       switch (plane_config->tiling) {
+       case I915_TILING_NONE:
+               stride_mult = 64;
+               break;
+       case I915_TILING_X:
+               stride_mult = 512;
+               break;
+       default:
+               MISSING_CASE(plane_config->tiling);
+               goto error;
+       }
+       fb->pitches[0] = (val & 0x3ff) * stride_mult;
+
+       aligned_height = intel_fb_align_height(dev, fb->height,
+                                              plane_config->tiling);
+
+       plane_config->size = ALIGN(fb->pitches[0] * aligned_height, PAGE_SIZE);
+
+       DRM_DEBUG_KMS("pipe %c with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n",
+                     pipe_name(pipe), fb->width, fb->height,
+                     fb->bits_per_pixel, base, fb->pitches[0],
+                     plane_config->size);
+
+       crtc->base.primary->fb = fb;
+       return;
+
+error:
+       kfree(fb);
+}
+
 static void ironlake_get_pfit_config(struct intel_crtc *crtc,
                                     struct intel_crtc_state *pipe_config)
 {
@@ -7599,64 +7701,67 @@ static void ironlake_get_pfit_config(struct intel_crtc *crtc,
        }
 }
 
-static void ironlake_get_plane_config(struct intel_crtc *crtc,
-                                     struct intel_plane_config *plane_config)
+static void
+ironlake_get_initial_plane_config(struct intel_crtc *crtc,
+                                 struct intel_initial_plane_config *plane_config)
 {
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
        u32 val, base, offset;
-       int pipe = crtc->pipe, plane = crtc->plane;
+       int pipe = crtc->pipe;
        int fourcc, pixel_format;
        int aligned_height;
+       struct drm_framebuffer *fb;
+       struct intel_framebuffer *intel_fb;
 
-       crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL);
-       if (!crtc->base.primary->fb) {
+       intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
+       if (!intel_fb) {
                DRM_DEBUG_KMS("failed to alloc fb\n");
                return;
        }
 
-       val = I915_READ(DSPCNTR(plane));
+       fb = &intel_fb->base;
+
+       val = I915_READ(DSPCNTR(pipe));
 
        if (INTEL_INFO(dev)->gen >= 4)
                if (val & DISPPLANE_TILED)
-                       plane_config->tiled = true;
+                       plane_config->tiling = I915_TILING_X;
 
        pixel_format = val & DISPPLANE_PIXFORMAT_MASK;
-       fourcc = intel_format_to_fourcc(pixel_format);
-       crtc->base.primary->fb->pixel_format = fourcc;
-       crtc->base.primary->fb->bits_per_pixel =
-               drm_format_plane_cpp(fourcc, 0) * 8;
+       fourcc = i9xx_format_to_fourcc(pixel_format);
+       fb->pixel_format = fourcc;
+       fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8;
 
-       base = I915_READ(DSPSURF(plane)) & 0xfffff000;
+       base = I915_READ(DSPSURF(pipe)) & 0xfffff000;
        if (IS_HASWELL(dev) || IS_BROADWELL(dev)) {
-               offset = I915_READ(DSPOFFSET(plane));
+               offset = I915_READ(DSPOFFSET(pipe));
        } else {
-               if (plane_config->tiled)
-                       offset = I915_READ(DSPTILEOFF(plane));
+               if (plane_config->tiling)
+                       offset = I915_READ(DSPTILEOFF(pipe));
                else
-                       offset = I915_READ(DSPLINOFF(plane));
+                       offset = I915_READ(DSPLINOFF(pipe));
        }
        plane_config->base = base;
 
        val = I915_READ(PIPESRC(pipe));
-       crtc->base.primary->fb->width = ((val >> 16) & 0xfff) + 1;
-       crtc->base.primary->fb->height = ((val >> 0) & 0xfff) + 1;
+       fb->width = ((val >> 16) & 0xfff) + 1;
+       fb->height = ((val >> 0) & 0xfff) + 1;
 
        val = I915_READ(DSPSTRIDE(pipe));
-       crtc->base.primary->fb->pitches[0] = val & 0xffffffc0;
+       fb->pitches[0] = val & 0xffffffc0;
 
-       aligned_height = intel_align_height(dev, crtc->base.primary->fb->height,
-                                           plane_config->tiled);
+       aligned_height = intel_fb_align_height(dev, fb->height,
+                                              plane_config->tiling);
 
-       plane_config->size = PAGE_ALIGN(crtc->base.primary->fb->pitches[0] *
-                                       aligned_height);
+       plane_config->size = PAGE_ALIGN(fb->pitches[0] * aligned_height);
 
-       DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n",
-                     pipe, plane, crtc->base.primary->fb->width,
-                     crtc->base.primary->fb->height,
-                     crtc->base.primary->fb->bits_per_pixel, base,
-                     crtc->base.primary->fb->pitches[0],
+       DRM_DEBUG_KMS("pipe %c with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n",
+                     pipe_name(pipe), fb->width, fb->height,
+                     fb->bits_per_pixel, base, fb->pitches[0],
                      plane_config->size);
+
+       crtc->base.primary->fb = fb;
 }
 
 static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
@@ -7871,7 +7976,7 @@ static void hsw_restore_lcpll(struct drm_i915_private *dev_priv)
         * Make sure we're not on PC8 state before disabling PC8, otherwise
         * we'll hang the machine. To prevent PC8 state, just enable force_wake.
         */
-       gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL);
+       intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
 
        if (val & LCPLL_POWER_DOWN_ALLOW) {
                val &= ~LCPLL_POWER_DOWN_ALLOW;
@@ -7901,7 +8006,7 @@ static void hsw_restore_lcpll(struct drm_i915_private *dev_priv)
                        DRM_ERROR("Switching back to LCPLL failed\n");
        }
 
-       gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL);
+       intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 }
 
 /*
@@ -8227,7 +8332,7 @@ static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base)
                        cntl |= CURSOR_PIPE_CSC_ENABLE;
        }
 
-       if (to_intel_plane(crtc->cursor)->rotation == BIT(DRM_ROTATE_180))
+       if (crtc->cursor->state->rotation == BIT(DRM_ROTATE_180))
                cntl |= CURSOR_ROTATE_180;
 
        if (intel_crtc->cursor_cntl != cntl) {
@@ -8289,7 +8394,7 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
 
        /* ILK+ do this automagically */
        if (HAS_GMCH_DISPLAY(dev) &&
-               to_intel_plane(crtc->cursor)->rotation == BIT(DRM_ROTATE_180)) {
+           crtc->cursor->state->rotation == BIT(DRM_ROTATE_180)) {
                base += (intel_crtc->cursor_height *
                        intel_crtc->cursor_width - 1) * 4;
        }
@@ -11741,7 +11846,6 @@ intel_check_primary_plane(struct drm_plane *plane,
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct drm_crtc *crtc = state->base.crtc;
        struct intel_crtc *intel_crtc;
-       struct intel_plane *intel_plane = to_intel_plane(plane);
        struct drm_framebuffer *fb = state->base.fb;
        struct drm_rect *dest = &state->dst;
        struct drm_rect *src = &state->src;
@@ -11775,7 +11879,7 @@ intel_check_primary_plane(struct drm_plane *plane,
                if (intel_crtc->primary_enabled &&
                    INTEL_INFO(dev)->gen <= 4 && !IS_G4X(dev) &&
                    dev_priv->fbc.plane == intel_crtc->plane &&
-                   intel_plane->rotation != BIT(DRM_ROTATE_0)) {
+                   state->base.rotation != BIT(DRM_ROTATE_0)) {
                        intel_crtc->atomic.disable_fbc = true;
                }
 
@@ -11959,6 +12063,7 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
                                                    int pipe)
 {
        struct intel_plane *primary;
+       struct intel_plane_state *state;
        const uint32_t *intel_primary_formats;
        int num_formats;
 
@@ -11966,17 +12071,17 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
        if (primary == NULL)
                return NULL;
 
-       primary->base.state = intel_plane_duplicate_state(&primary->base);
-       if (primary->base.state == NULL) {
+       state = intel_create_plane_state(&primary->base);
+       if (!state) {
                kfree(primary);
                return NULL;
        }
+       primary->base.state = &state->base;
 
        primary->can_scale = false;
        primary->max_downscale = 1;
        primary->pipe = pipe;
        primary->plane = pipe;
-       primary->rotation = BIT(DRM_ROTATE_0);
        primary->check_plane = intel_check_primary_plane;
        primary->commit_plane = intel_commit_primary_plane;
        if (HAS_FBC(dev) && INTEL_INFO(dev)->gen < 4)
@@ -12004,7 +12109,7 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
                if (dev->mode_config.rotation_property)
                        drm_object_attach_property(&primary->base.base,
                                dev->mode_config.rotation_property,
-                               primary->rotation);
+                               state->base.rotation);
        }
 
        drm_plane_helper_add(&primary->base, &intel_plane_helper_funcs);
@@ -12132,22 +12237,23 @@ static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
                                                   int pipe)
 {
        struct intel_plane *cursor;
+       struct intel_plane_state *state;
 
        cursor = kzalloc(sizeof(*cursor), GFP_KERNEL);
        if (cursor == NULL)
                return NULL;
 
-       cursor->base.state = intel_plane_duplicate_state(&cursor->base);
-       if (cursor->base.state == NULL) {
+       state = intel_create_plane_state(&cursor->base);
+       if (!state) {
                kfree(cursor);
                return NULL;
        }
+       cursor->base.state = &state->base;
 
        cursor->can_scale = false;
        cursor->max_downscale = 1;
        cursor->pipe = pipe;
        cursor->plane = pipe;
-       cursor->rotation = BIT(DRM_ROTATE_0);
        cursor->check_plane = intel_check_cursor_plane;
        cursor->commit_plane = intel_commit_cursor_plane;
 
@@ -12166,7 +12272,7 @@ static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
                if (dev->mode_config.rotation_property)
                        drm_object_attach_property(&cursor->base.base,
                                dev->mode_config.rotation_property,
-                               cursor->rotation);
+                               state->base.rotation);
        }
 
        drm_plane_helper_add(&cursor->base, &intel_plane_helper_funcs);
@@ -12610,8 +12716,8 @@ static int intel_framebuffer_init(struct drm_device *dev,
        if (mode_cmd->offsets[0] != 0)
                return -EINVAL;
 
-       aligned_height = intel_align_height(dev, mode_cmd->height,
-                                           obj->tiling_mode);
+       aligned_height = intel_fb_align_height(dev, mode_cmd->height,
+                                              obj->tiling_mode);
        /* FIXME drm helper for size checks (especially planar formats)? */
        if (obj->base.size < aligned_height * mode_cmd->pitches[0])
                return -EINVAL;
@@ -12671,23 +12777,32 @@ static void intel_init_display(struct drm_device *dev)
        else
                dev_priv->display.find_dpll = i9xx_find_best_dpll;
 
-       if (HAS_DDI(dev)) {
+       if (INTEL_INFO(dev)->gen >= 9) {
                dev_priv->display.get_pipe_config = haswell_get_pipe_config;
-               dev_priv->display.get_plane_config = ironlake_get_plane_config;
+               dev_priv->display.get_initial_plane_config =
+                       skylake_get_initial_plane_config;
                dev_priv->display.crtc_compute_clock =
                        haswell_crtc_compute_clock;
                dev_priv->display.crtc_enable = haswell_crtc_enable;
                dev_priv->display.crtc_disable = haswell_crtc_disable;
                dev_priv->display.off = ironlake_crtc_off;
-               if (INTEL_INFO(dev)->gen >= 9)
-                       dev_priv->display.update_primary_plane =
-                               skylake_update_primary_plane;
-               else
-                       dev_priv->display.update_primary_plane =
-                               ironlake_update_primary_plane;
+               dev_priv->display.update_primary_plane =
+                       skylake_update_primary_plane;
+       } else if (HAS_DDI(dev)) {
+               dev_priv->display.get_pipe_config = haswell_get_pipe_config;
+               dev_priv->display.get_initial_plane_config =
+                       ironlake_get_initial_plane_config;
+               dev_priv->display.crtc_compute_clock =
+                       haswell_crtc_compute_clock;
+               dev_priv->display.crtc_enable = haswell_crtc_enable;
+               dev_priv->display.crtc_disable = haswell_crtc_disable;
+               dev_priv->display.off = ironlake_crtc_off;
+               dev_priv->display.update_primary_plane =
+                       ironlake_update_primary_plane;
        } else if (HAS_PCH_SPLIT(dev)) {
                dev_priv->display.get_pipe_config = ironlake_get_pipe_config;
-               dev_priv->display.get_plane_config = ironlake_get_plane_config;
+               dev_priv->display.get_initial_plane_config =
+                       ironlake_get_initial_plane_config;
                dev_priv->display.crtc_compute_clock =
                        ironlake_crtc_compute_clock;
                dev_priv->display.crtc_enable = ironlake_crtc_enable;
@@ -12697,7 +12812,8 @@ static void intel_init_display(struct drm_device *dev)
                        ironlake_update_primary_plane;
        } else if (IS_VALLEYVIEW(dev)) {
                dev_priv->display.get_pipe_config = i9xx_get_pipe_config;
-               dev_priv->display.get_plane_config = i9xx_get_plane_config;
+               dev_priv->display.get_initial_plane_config =
+                       i9xx_get_initial_plane_config;
                dev_priv->display.crtc_compute_clock = i9xx_crtc_compute_clock;
                dev_priv->display.crtc_enable = valleyview_crtc_enable;
                dev_priv->display.crtc_disable = i9xx_crtc_disable;
@@ -12706,7 +12822,8 @@ static void intel_init_display(struct drm_device *dev)
                        i9xx_update_primary_plane;
        } else {
                dev_priv->display.get_pipe_config = i9xx_get_pipe_config;
-               dev_priv->display.get_plane_config = i9xx_get_plane_config;
+               dev_priv->display.get_initial_plane_config =
+                       i9xx_get_initial_plane_config;
                dev_priv->display.crtc_compute_clock = i9xx_crtc_compute_clock;
                dev_priv->display.crtc_enable = i9xx_crtc_enable;
                dev_priv->display.crtc_disable = i9xx_crtc_disable;
@@ -13078,8 +13195,8 @@ void intel_modeset_init(struct drm_device *dev)
                 * can even allow for smooth boot transitions if the BIOS
                 * fb is large enough for the active pipe configuration.
                 */
-               if (dev_priv->display.get_plane_config) {
-                       dev_priv->display.get_plane_config(crtc,
+               if (dev_priv->display.get_initial_plane_config) {
+                       dev_priv->display.get_initial_plane_config(crtc,
                                                           &crtc->plane_config);
                        /*
                         * If the fb is shared between multiple heads, we'll
This page took 0.054336 seconds and 5 git commands to generate.