From patchwork Mon Nov 12 17:32:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Syrjala X-Patchwork-Id: 1729441 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 92C7DDFE80 for ; Mon, 12 Nov 2012 17:42:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 822419F315 for ; Mon, 12 Nov 2012 09:42:36 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 612A59F0BA for ; Mon, 12 Nov 2012 09:33:35 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 12 Nov 2012 09:33:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,764,1344236400"; d="scan'208";a="240805423" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.168]) by orsmga002.jf.intel.com with SMTP; 12 Nov 2012 09:33:33 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 12 Nov 2012 19:33:32 +0200 From: ville.syrjala@linux.intel.com To: dri-devel@lists.freedesktop.org Subject: [PATCH 09/22] drm/i915: Use intel_best_encoder() directly Date: Mon, 12 Nov 2012 19:32:47 +0200 Message-Id: <1352741580-12141-10-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1352741580-12141-1-git-send-email-ville.syrjala@linux.intel.com> References: <1352741580-12141-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Ville Syrjälä All connectors use intel_best_encoder() as their best_encoder() func, so just call it directly w/o the indirection. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_atomic.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index 6dd07fb..e58ec3f 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -152,8 +152,6 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i int i; for (i = 0; i < count_ids; i++) { - struct drm_encoder *encoder; - const struct drm_connector_helper_funcs *connector_funcs; struct drm_mode_object *obj; int j; @@ -169,9 +167,8 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i } connector = obj_to_connector(obj); - connector_funcs = connector->helper_private; - encoder = connector_funcs->best_encoder(connector); + encoder = intel_best_encoder(connector); if (!drm_encoder_crtc_ok(encoder, crtc)) return -EINVAL; @@ -180,9 +177,6 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i } list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - const struct drm_connector_helper_funcs *connector_funcs = - connector->helper_private; - for (i = 0; i < count_ids; i++) { if (connector == connectors[i]) break; @@ -196,7 +190,7 @@ static int process_connectors(struct intel_crtc_state *s, const uint32_t *ids, i continue; } - encoder = connector_funcs->best_encoder(connector); + encoder = intel_best_encoder(connector); connector->encoder = encoder; encoder->crtc = crtc;