diff mbox

[20/58] drm/i915: call crtc functions directly

Message ID 1345403595-9678-21-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State Accepted
Headers show

Commit Message

Daniel Vetter Aug. 19, 2012, 7:12 p.m. UTC
Instead of going through the crtc helper function tables.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

Comments

Jesse Barnes Sept. 4, 2012, 8:22 p.m. UTC | #1
On Sun, 19 Aug 2012 21:12:37 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> Instead of going through the crtc helper function tables.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index d37a851..ca17010 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6578,8 +6578,6 @@ static void intel_crtc_reset(struct drm_crtc *crtc)
>  }
>  
>  static struct drm_crtc_helper_funcs intel_helper_funcs = {
> -	.mode_fixup = intel_crtc_mode_fixup,
> -	.mode_set = intel_crtc_mode_set,
>  	.mode_set_base_atomic = intel_pipe_set_base_atomic,
>  	.load_lut = intel_crtc_load_lut,
>  	.disable = intel_crtc_disable,
> @@ -6648,8 +6646,8 @@ bool intel_set_mode(struct drm_crtc *crtc,
>  		    int x, int y, struct drm_framebuffer *old_fb)
>  {
>  	struct drm_device *dev = crtc->dev;
> +	drm_i915_private_t *dev_priv = dev->dev_private;
>  	struct drm_display_mode *adjusted_mode, saved_mode, saved_hwmode;
> -	struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
>  	struct drm_encoder_helper_funcs *encoder_funcs;
>  	int saved_x, saved_y;
>  	struct drm_encoder *encoder;
> @@ -6691,7 +6689,7 @@ bool intel_set_mode(struct drm_crtc *crtc,
>  		}
>  	}
>  
> -	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
> +	if (!(ret = intel_crtc_mode_fixup(crtc, mode, adjusted_mode))) {
>  		DRM_DEBUG_KMS("CRTC fixup failed\n");
>  		goto done;
>  	}
> @@ -6699,12 +6697,12 @@ bool intel_set_mode(struct drm_crtc *crtc,
>  
>  	intel_crtc_prepare_encoders(dev);
>  
> -	crtc_funcs->prepare(crtc);
> +	dev_priv->display.crtc_disable(crtc);
>  
>  	/* Set up the DPLL and any encoders state that needs to adjust or depend
>  	 * on the DPLL.
>  	 */
> -	ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb);
> +	ret = !intel_crtc_mode_set(crtc, mode, adjusted_mode, x, y, old_fb);
>  	if (!ret)
>  	    goto done;
>  
> @@ -6721,7 +6719,7 @@ bool intel_set_mode(struct drm_crtc *crtc,
>  	}
>  
>  	/* Now enable the clocks, plane, pipe, and connectors that we set up. */
> -	crtc_funcs->commit(crtc);
> +	dev_priv->display.crtc_enable(crtc);
>  
>  	/* Store real post-adjustment hardware mode. */
>  	crtc->hwmode = *adjusted_mode;
> @@ -7055,9 +7053,6 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
>  	intel_crtc->active = true; /* force the pipe off on setup_init_config */
>  	intel_crtc->bpp = 24; /* default for pre-Ironlake */
>  
> -	intel_helper_funcs.prepare = dev_priv->display.crtc_disable;
> -	intel_helper_funcs.commit = dev_priv->display.crtc_enable;
> -
>  	drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
>  }
>  

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d37a851..ca17010 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6578,8 +6578,6 @@  static void intel_crtc_reset(struct drm_crtc *crtc)
 }
 
 static struct drm_crtc_helper_funcs intel_helper_funcs = {
-	.mode_fixup = intel_crtc_mode_fixup,
-	.mode_set = intel_crtc_mode_set,
 	.mode_set_base_atomic = intel_pipe_set_base_atomic,
 	.load_lut = intel_crtc_load_lut,
 	.disable = intel_crtc_disable,
@@ -6648,8 +6646,8 @@  bool intel_set_mode(struct drm_crtc *crtc,
 		    int x, int y, struct drm_framebuffer *old_fb)
 {
 	struct drm_device *dev = crtc->dev;
+	drm_i915_private_t *dev_priv = dev->dev_private;
 	struct drm_display_mode *adjusted_mode, saved_mode, saved_hwmode;
-	struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
 	struct drm_encoder_helper_funcs *encoder_funcs;
 	int saved_x, saved_y;
 	struct drm_encoder *encoder;
@@ -6691,7 +6689,7 @@  bool intel_set_mode(struct drm_crtc *crtc,
 		}
 	}
 
-	if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) {
+	if (!(ret = intel_crtc_mode_fixup(crtc, mode, adjusted_mode))) {
 		DRM_DEBUG_KMS("CRTC fixup failed\n");
 		goto done;
 	}
@@ -6699,12 +6697,12 @@  bool intel_set_mode(struct drm_crtc *crtc,
 
 	intel_crtc_prepare_encoders(dev);
 
-	crtc_funcs->prepare(crtc);
+	dev_priv->display.crtc_disable(crtc);
 
 	/* Set up the DPLL and any encoders state that needs to adjust or depend
 	 * on the DPLL.
 	 */
-	ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb);
+	ret = !intel_crtc_mode_set(crtc, mode, adjusted_mode, x, y, old_fb);
 	if (!ret)
 	    goto done;
 
@@ -6721,7 +6719,7 @@  bool intel_set_mode(struct drm_crtc *crtc,
 	}
 
 	/* Now enable the clocks, plane, pipe, and connectors that we set up. */
-	crtc_funcs->commit(crtc);
+	dev_priv->display.crtc_enable(crtc);
 
 	/* Store real post-adjustment hardware mode. */
 	crtc->hwmode = *adjusted_mode;
@@ -7055,9 +7053,6 @@  static void intel_crtc_init(struct drm_device *dev, int pipe)
 	intel_crtc->active = true; /* force the pipe off on setup_init_config */
 	intel_crtc->bpp = 24; /* default for pre-Ironlake */
 
-	intel_helper_funcs.prepare = dev_priv->display.crtc_disable;
-	intel_helper_funcs.commit = dev_priv->display.crtc_enable;
-
 	drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
 }