From c7ccf19513e368b5c9045e35c7e50f71cc966c99 Mon Sep 17 00:00:00 2001 From: Felix Date: Fri, 24 Nov 2017 13:00:45 +0100 Subject: [PATCH 2/2] drm/i915: Dirty "fix" to allow compilation --- drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a2cb3a07da0a..6f36388d4fcc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9285,7 +9285,7 @@ static bool i845_cursor_size_ok(const struct intel_plane_state *plane_state) return intel_cursor_size_ok(plane_state) && IS_ALIGNED(width, 64); } -static int i845_check_cursor(struct intel_plane *plane, +static int i845_check_cursor(struct drm_plane *plane, struct intel_crtc_state *crtc_state, struct intel_plane_state *plane_state) { @@ -9325,11 +9325,11 @@ static int i845_check_cursor(struct intel_plane *plane, return 0; } -static void i845_update_cursor(struct intel_plane *plane, +static void i845_update_cursor(struct drm_plane *plane, const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state) { - struct drm_i915_private *dev_priv = to_i915(plane->base.dev); + struct drm_i915_private *dev_priv = to_i915(plane->dev); u32 cntl = 0, base = 0, pos = 0, size = 0; unsigned long irqflags; @@ -9349,18 +9349,18 @@ static void i845_update_cursor(struct intel_plane *plane, /* On these chipsets we can only modify the base/size/stride * whilst the cursor is disabled. */ - if (plane->cursor.base != base || - plane->cursor.size != size || - plane->cursor.cntl != cntl) { + if (to_intel_plane(plane)->cursor.base != base || + to_intel_plane(plane)->cursor.size != size || + to_intel_plane(plane)->cursor.cntl != cntl) { I915_WRITE_FW(CURCNTR(PIPE_A), 0); I915_WRITE_FW(CURBASE(PIPE_A), base); I915_WRITE_FW(CURSIZE, size); I915_WRITE_FW(CURPOS(PIPE_A), pos); I915_WRITE_FW(CURCNTR(PIPE_A), cntl); - plane->cursor.base = base; - plane->cursor.size = size; - plane->cursor.cntl = cntl; + to_intel_plane(plane)->cursor.base = base; + to_intel_plane(plane)->cursor.size = size; + to_intel_plane(plane)->cursor.cntl = cntl; } else { I915_WRITE_FW(CURPOS(PIPE_A), pos); } @@ -9370,8 +9370,8 @@ static void i845_update_cursor(struct intel_plane *plane, spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); } -static void i845_disable_cursor(struct intel_plane *plane, - struct intel_crtc *crtc) +static void i845_disable_cursor(struct drm_plane *plane, + struct drm_crtc *crtc) { i845_update_cursor(plane, NULL, NULL); } @@ -9450,13 +9450,13 @@ static bool i9xx_cursor_size_ok(const struct intel_plane_state *plane_state) return true; } -static int i9xx_check_cursor(struct intel_plane *plane, +static int i9xx_check_cursor(struct drm_plane *plane, struct intel_crtc_state *crtc_state, struct intel_plane_state *plane_state) { - struct drm_i915_private *dev_priv = to_i915(plane->base.dev); + struct drm_i915_private *dev_priv = to_i915(plane->dev); const struct drm_framebuffer *fb = plane_state->base.fb; - enum pipe pipe = plane->pipe; + enum pipe pipe = to_intel_plane(plane)->pipe; int ret; ret = intel_check_cursor(crtc_state, plane_state); @@ -9502,12 +9502,12 @@ static int i9xx_check_cursor(struct intel_plane *plane, return 0; } -static void i9xx_update_cursor(struct intel_plane *plane, +static void i9xx_update_cursor(struct drm_plane *plane, const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state) { - struct drm_i915_private *dev_priv = to_i915(plane->base.dev); - enum pipe pipe = plane->pipe; + struct drm_i915_private *dev_priv = to_i915(plane->dev); + enum pipe pipe = to_intel_plane(plane)->pipe; u32 cntl = 0, base = 0, pos = 0, fbc_ctl = 0; unsigned long irqflags; @@ -9541,18 +9541,18 @@ static void i9xx_update_cursor(struct intel_plane *plane, * CURCNTR and CUR_FBC_CTL are always * armed by the CURBASE write only. */ - if (plane->cursor.base != base || - plane->cursor.size != fbc_ctl || - plane->cursor.cntl != cntl) { + if (to_intel_plane(plane)->cursor.base != base || + to_intel_plane(plane)->cursor.size != fbc_ctl || + to_intel_plane(plane)->cursor.cntl != cntl) { I915_WRITE_FW(CURCNTR(pipe), cntl); if (HAS_CUR_FBC(dev_priv)) I915_WRITE_FW(CUR_FBC_CTL(pipe), fbc_ctl); I915_WRITE_FW(CURPOS(pipe), pos); I915_WRITE_FW(CURBASE(pipe), base); - plane->cursor.base = base; - plane->cursor.size = fbc_ctl; - plane->cursor.cntl = cntl; + to_intel_plane(plane)->cursor.base = base; + to_intel_plane(plane)->cursor.size = fbc_ctl; + to_intel_plane(plane)->cursor.cntl = cntl; } else { I915_WRITE_FW(CURPOS(pipe), pos); I915_WRITE_FW(CURBASE(pipe), base); @@ -9563,8 +9563,8 @@ static void i9xx_update_cursor(struct intel_plane *plane, spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); } -static void i9xx_disable_cursor(struct intel_plane *plane, - struct intel_crtc *crtc) +static void i9xx_disable_cursor(struct drm_plane *plane, + struct drm_crtc *crtc) { i9xx_update_cursor(plane, NULL, NULL); } -- 2.14.2