From patchwork Sun Aug 19 19:12:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1344931 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 17D163FC33 for ; Sun, 19 Aug 2012 20:34:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E4CFA104E for ; Sun, 19 Aug 2012 13:34:38 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id F0C85A1024 for ; Sun, 19 Aug 2012 13:20:40 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id r3so3851112wey.36 for ; Sun, 19 Aug 2012 13:20:40 -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=eCBo4L3CWNlyKBoMb1iPFjp8xWsN2lFoJgIgLFcZWow=; b=bPLGl2dvWdEc9Ee3rI6yWRT46kR3UGNSHleC5EOS32GTGn4qeSR/5PpU56emV0Z9a5 1SKw07eWy/rqA0vfqd3n2pFA+dGSyBcrgHfYmxwPEE1ta2Ki+hkx5U0ZzJioymcLV0QT bl44IBQEfiv+kVH40b6qWq1Tzou4u2zgK+gwk= 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=eCBo4L3CWNlyKBoMb1iPFjp8xWsN2lFoJgIgLFcZWow=; b=JMFoYrT+gcTfRTUQqnJCaanN97fBwg+J57suEKW/D7OijSDgyu9aR/lOi2XQ0zh5Ct RmrciZ1jEnQM0GeSrQtewQ9XoQuLFpXmF5O1vncMKAudPzVBl2HX9QeYR9o4SA6DX2hm aAh0xPtYsh0sDRTAMahvS5N9ny5yVtJyLWvihWspBjdNd4Pqp9QrS5dh2rXeArKzBuo5 9loIzVBaCRlMO2F+OEtkOBuFpM1vvsQVVE3dlW/TBPXAqAZ/xDDWUPSYkNBf1tASsLKh R8QDtgCm+60CZ/GEO8bZLou2xVauzbisk0zasU8TY8lvXT6hVIuN0qA6huxELpKJZphK KIIw== Received: by 10.180.81.193 with SMTP id c1mr21985878wiy.12.1345407640589; Sun, 19 Aug 2012 13:20:40 -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 fu8sm24194367wib.5.2012.08.19.13.20.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 13:20:39 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 19 Aug 2012 21:12:37 +0200 Message-Id: <1345403595-9678-21-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> References: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQmzVxeSBIWy76u1Gyy+KBHmTwf42y/xXQS5FWtBTVQIAdjdBxzNkBEr+dWC1TbCNjp99vSO Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 20/58] 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 Reviewed-by: Jesse Barnes --- 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); }