From patchwork Tue Jul 3 09:28:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1150411 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 887C140134 for ; Tue, 3 Jul 2012 10:58:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DAB59F7CD for ; Tue, 3 Jul 2012 03:58:38 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 0DDF99F752 for ; Tue, 3 Jul 2012 03:35:07 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hm11so2984141wib.12 for ; Tue, 03 Jul 2012 03:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=IEH4p27JhlE4lHBXTFXuso+BI1y0mo7GrhIWQpvujVs=; b=kn3m/NjN8m8Fs/Rczu9b86JsmXekSEZNCyh/s1Pc2ubjviP3X2TRkI5jb3PAGV3Lgo g2JjjgjsrGIDdelTmpvlE4KPYUWOAvqX/JuaxTVARt7afFli6ByDI3WtOTqwuqJplVQ5 Fwa/miuEQP3q6hqxdblAtyd1bMnMEhLegJiVs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=IEH4p27JhlE4lHBXTFXuso+BI1y0mo7GrhIWQpvujVs=; b=BNLNEqaQ7ZbTPfA8PNCMW5cS6WCmDFbjinsRrZrqIJE5akHeToe+engpA0W1gdNdty jiNIjzR9TVCEdDUyDwRuu5rtJXaLC8EH+ciIqeqE/0CQYNbIuhmTSCBZ9pMLkBv/OYUF gNOCV0ktsejjt6KxBp/BDPRBA3eqMWhTt+X7YcEKCSpz1ljJy2cP6vjfOG8S/ahNapCL Dnz6lxdoXT/illtpbydAM6UbJ8ahoSl7TOHqAGrje8BeymzSQOO8UT0xL+1+rLKpbK3E IFzuV+GJa9i6KeSBKSf4fSgoJJdzQaGci+KpqoW1zHts6ETvSnktv6sqe0wHG5gUv911 pfnA== Received: by 10.180.92.7 with SMTP id ci7mr5371217wib.1.1341311707723; Tue, 03 Jul 2012 03:35:07 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id e9sm14845138wiw.10.2012.07.03.03.35.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 03:35:07 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Tue, 3 Jul 2012 11:28:24 +0200 Message-Id: <1341307715-3886-33-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1341307715-3886-1-git-send-email-daniel.vetter@ffwll.ch> References: <1341307715-3886-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQktdSueBbfkUeMid0GLDnluqYGr5lDh8NLgpCXgkWNeTAJ5Bu9qPxyOEinXIyDOguxLUjLO Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 32/43] drm/i915: call crtc functions directly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Instead of going through the crtc helper function tables. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 4d31b30..0c4eca5 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6540,8 +6540,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, @@ -6611,8 +6609,8 @@ bool intel_crtc_set_mode(struct drm_crtc *crtc, 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; @@ -6654,7 +6652,7 @@ bool intel_crtc_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; } @@ -6662,12 +6660,12 @@ bool intel_crtc_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; @@ -6684,7 +6682,7 @@ bool intel_crtc_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; @@ -7019,9 +7017,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); intel_crtc->busy = false;