aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_display.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b21dc272bbac..71a2fc50ed87 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15236,9 +15236,8 @@ static void skl_init_scalers(struct drm_i915_private *dev_priv,
15236 scaler_state->scaler_id = -1; 15236 scaler_state->scaler_id = -1;
15237} 15237}
15238 15238
15239static int intel_crtc_init(struct drm_device *dev, enum pipe pipe) 15239static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
15240{ 15240{
15241 struct drm_i915_private *dev_priv = to_i915(dev);
15242 struct intel_crtc *intel_crtc; 15241 struct intel_crtc *intel_crtc;
15243 struct intel_crtc_state *crtc_state = NULL; 15242 struct intel_crtc_state *crtc_state = NULL;
15244 struct intel_plane *primary = NULL; 15243 struct intel_plane *primary = NULL;
@@ -15259,7 +15258,7 @@ static int intel_crtc_init(struct drm_device *dev, enum pipe pipe)
15259 crtc_state->base.crtc = &intel_crtc->base; 15258 crtc_state->base.crtc = &intel_crtc->base;
15260 15259
15261 /* initialize shared scalers */ 15260 /* initialize shared scalers */
15262 if (INTEL_INFO(dev)->gen >= 9) { 15261 if (INTEL_GEN(dev_priv) >= 9) {
15263 if (pipe == PIPE_C) 15262 if (pipe == PIPE_C)
15264 intel_crtc->num_scalers = 1; 15263 intel_crtc->num_scalers = 1;
15265 else 15264 else
@@ -15290,7 +15289,7 @@ static int intel_crtc_init(struct drm_device *dev, enum pipe pipe)
15290 goto fail; 15289 goto fail;
15291 } 15290 }
15292 15291
15293 ret = drm_crtc_init_with_planes(dev, &intel_crtc->base, 15292 ret = drm_crtc_init_with_planes(&dev_priv->drm, &intel_crtc->base,
15294 &primary->base, &cursor->base, 15293 &primary->base, &cursor->base,
15295 &intel_crtc_funcs, 15294 &intel_crtc_funcs,
15296 "pipe %c", pipe_name(pipe)); 15295 "pipe %c", pipe_name(pipe));
@@ -15303,7 +15302,7 @@ static int intel_crtc_init(struct drm_device *dev, enum pipe pipe)
15303 */ 15302 */
15304 intel_crtc->pipe = pipe; 15303 intel_crtc->pipe = pipe;
15305 intel_crtc->plane = (enum plane) pipe; 15304 intel_crtc->plane = (enum plane) pipe;
15306 if (HAS_FBC(dev) && INTEL_INFO(dev)->gen < 4) { 15305 if (HAS_FBC(dev_priv) && INTEL_GEN(dev_priv) < 4) {
15307 DRM_DEBUG_KMS("swapping pipes & planes for FBC\n"); 15306 DRM_DEBUG_KMS("swapping pipes & planes for FBC\n");
15308 intel_crtc->plane = !pipe; 15307 intel_crtc->plane = !pipe;
15309 } 15308 }
@@ -16487,7 +16486,7 @@ int intel_modeset_init(struct drm_device *dev)
16487 for_each_pipe(dev_priv, pipe) { 16486 for_each_pipe(dev_priv, pipe) {
16488 int ret; 16487 int ret;
16489 16488
16490 ret = intel_crtc_init(dev, pipe); 16489 ret = intel_crtc_init(dev_priv, pipe);
16491 if (ret) { 16490 if (ret) {
16492 drm_mode_config_cleanup(dev); 16491 drm_mode_config_cleanup(dev);
16493 return ret; 16492 return ret;